A class for grabing "range images" from a MESA imaging SwissRanger 3D cameras (SR-2, SR-3000, SR-4k). More...
#include <mrpt/hwdrivers/CSwissRanger3DCamera.h>


Public Member Functions | ||||
| CSwissRanger3DCamera () | ||||
| Default ctor. | ||||
| ~CSwissRanger3DCamera () | ||||
| Default ctor. | ||||
| virtual void | initialize () | |||
Initializes the 3D camera - should be invoked after calling loadConfig()
| ||||
| virtual void | doProcess () | |||
| To be called at a high rate (>XX Hz), this method populates the internal buffer of received observations. | ||||
| void | getNextObservation (mrpt::slam::CObservation3DRangeScan &out_obs, bool &there_is_obs, bool &hardware_error) | |||
| The main data retrieving function, to be called after calling loadConfig() and initialize(). | ||||
| bool | open () | |||
| return false on error - Called automatically from initialize(), no need normally for the user to call this. | ||||
| void | close () | |||
| bool | isOpen () const | |||
| whether the camera is open and comms work ok. To be called after initialize() | ||||
| size_t | getRowCount () const | |||
| Get the row count in the camera images, loaded automatically upon camera open(). | ||||
| size_t | getColCount () const | |||
| Get the col count in the camera images, loaded automatically upon camera open(). | ||||
| unsigned int | getCameraSerialNumber () const | |||
| Get the camera serial number, loaded automatically upon camera open(). | ||||
| double | getMaxRange () const | |||
| Returns the maximum camera range, as deduced from its operating frequency. | ||||
| bool | getMesaLibVersion (std::string &out_version) const | |||
| Get the version of the MESA library. | ||||
Capture configuration methods (apart from loadConfig) | ||||
| void | setOpenFromUSB (bool USB) | |||
| true: open from USB, false: open from ethernet. | ||||
| bool | getOpenFromUSBMode () const | |||
| void | setSave3D (bool save) | |||
| void | setSaveRangeImage (bool save) | |||
| void | setSaveIntensityImage (bool save) | |||
| void | setSaveConfidenceImage (bool save) | |||
| void | enableImageHistEqualization (bool enable) | |||
| bool | isEnabledImageHistEqualization () const | |||
| void | enableMedianFilter (bool enable) | |||
| bool | isEnabledMedianFilter () const | |||
| void | enableMedianCrossFilter (bool enable) | |||
| bool | isEnabledMedianCrossFilter () const | |||
| void | enableConvGray (bool enable) | |||
| bool | isEnabledConvGray () const | |||
| void | enableDenoiseANF (bool enable) | |||
| bool | isEnabledDenoiseANF () const | |||
| void | enablePreviewWindow (bool enable=true) | |||
| bool | isEnabledPreviewWindow () const | |||
Protected Member Functions | ||||
| virtual void | loadConfig_sensorSpecific (const mrpt::utils::CConfigFileBase &configSource, const std::string §ion) | |||
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)
| ||||
| void | internal_resendParamsToCamera () const | |||
Protected Attributes | ||||
| mrpt::poses::CPose3D | m_sensorPoseOnRobot | |||
| bool | m_save_3d | |||
| Save the 3D point cloud (default: true). | ||||
| bool | m_save_range_img | |||
| Save the 2D range image (default: true). | ||||
| bool | m_save_intensity_img | |||
| Save the 2D intensity image (default: true). | ||||
| bool | m_save_confidence | |||
| Save the estimated confidence 2D image (default: false). | ||||
| bool | m_enable_img_hist_equal | |||
| bool | m_enable_median_filter | |||
| bool | m_enable_mediancross_filter | |||
| bool | m_enable_conv_gray | |||
| bool | m_enable_denoise_anf | |||
| bool | m_open_from_usb | |||
| true: USB, false: ETH | ||||
| size_t | m_usb_serial | |||
| std::string | m_ip_address | |||
| size_t | m_rows | |||
| size_t | m_cols | |||
| Size of camera images, set on open(). | ||||
| unsigned int | m_cam_serial_num | |||
| Serial number of the camera, set on open(). | ||||
| double | m_maxRange | |||
| Max range, as deducted from the camera frequency. | ||||
| bool | m_preview_window | |||
| Show preview window while grabbing. | ||||
| mrpt::gui::CDisplayWindowPtr | m_win2d | |||
| std::string | m_sensorLabel | |||
| void * | m_cam | |||
| opaque handler to SRCAM. NULL means it's not open yet. | ||||
A class for grabing "range images" from a MESA imaging SwissRanger 3D cameras (SR-2, SR-3000, SR-4k).
NOTES:
As with any other CGenericSensor class, the normal sequence of methods to be called is:
PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS: ------------------------------------------------------- [supplied_section_name] sensorLabel = CAM3D // A text description preview_window = true // Show a window with a preview of the grabbed data in real-time open_USB = true // false means ethernet (default: true) USB_serial = 0x4000002f // only for open_USB=true. If not set, the first camera will be open. Serial is the last part of S/N (e.g. for the camera SN: 00-00-40-00-00-2F). IP_address = 192.168.2.14 // only for open_USB=false. The IP of the camera. // Options for the data to save in each CObservation3DRangeScan save_3d = true // Save the 3D point cloud (default: true) save_range_img = true // Save the 2D range image (default: true) save_intensity_img = true // Save the 2D intensity image (default: true) save_confidence = true // Save the estimated confidence 2D image (default: false) enable_img_hist_equal = false // Enable intensity image histogram equalization (default: false) enable_median_filter = true // Enable median filter in range data (default: true) enable_mediancross_filter = false // Enable median cross-filter (default: false) enable_conv_gray = false // Enable intensity image scale with range (default: false) enable_denoise_anf = true // Enable this noise filter (default: true) pose_x=0.21 // Camera position in the robot (meters) pose_y=0 pose_z=0.34 pose_yaw=0 // Angles in degrees pose_pitch=0 pose_roll=0
Definition at line 84 of file CSwissRanger3DCamera.h.
| mrpt::hwdrivers::CSwissRanger3DCamera::CSwissRanger3DCamera | ( | ) |
Default ctor.
| mrpt::hwdrivers::CSwissRanger3DCamera::~CSwissRanger3DCamera | ( | ) |
Default ctor.
| void mrpt::hwdrivers::CSwissRanger3DCamera::close | ( | ) |
| virtual void mrpt::hwdrivers::CSwissRanger3DCamera::doProcess | ( | ) | [virtual] |
To be called at a high rate (>XX Hz), this method populates the internal buffer of received observations.
This method is mainly intended for usage within rawlog-grabber or similar programs. For an alternative, see getNextObservation()
| This | method must throw an exception with a descriptive message if some critical error is found. |
Implements mrpt::hwdrivers::CGenericSensor.
| void mrpt::hwdrivers::CSwissRanger3DCamera::enableConvGray | ( | bool | enable | ) | [inline] |
Definition at line 153 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::enableDenoiseANF | ( | bool | enable | ) | [inline] |
Definition at line 156 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::enableImageHistEqualization | ( | bool | enable | ) | [inline] |
Definition at line 144 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::enableMedianCrossFilter | ( | bool | enable | ) | [inline] |
Definition at line 150 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::enableMedianFilter | ( | bool | enable | ) | [inline] |
Definition at line 147 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::enablePreviewWindow | ( | bool | enable = true |
) | [inline] |
Definition at line 159 of file CSwissRanger3DCamera.h.
| unsigned int mrpt::hwdrivers::CSwissRanger3DCamera::getCameraSerialNumber | ( | ) | const [inline] |
Get the camera serial number, loaded automatically upon camera open().
Definition at line 126 of file CSwissRanger3DCamera.h.
| size_t mrpt::hwdrivers::CSwissRanger3DCamera::getColCount | ( | ) | const [inline] |
Get the col count in the camera images, loaded automatically upon camera open().
Definition at line 123 of file CSwissRanger3DCamera.h.
| double mrpt::hwdrivers::CSwissRanger3DCamera::getMaxRange | ( | ) | const [inline] |
Returns the maximum camera range, as deduced from its operating frequency.
Definition at line 129 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::getMesaLibVersion | ( | std::string & | out_version | ) | const |
Get the version of the MESA library.
| void mrpt::hwdrivers::CSwissRanger3DCamera::getNextObservation | ( | mrpt::slam::CObservation3DRangeScan & | out_obs, | |
| bool & | there_is_obs, | |||
| bool & | hardware_error | |||
| ) |
The main data retrieving function, to be called after calling loadConfig() and initialize().
| out_obs | The output retrieved observation (only if there_is_obs=true). | |
| there_is_obs | If set to false, there was no new observation. | |
| hardware_error | True on hardware/comms error. |
| bool mrpt::hwdrivers::CSwissRanger3DCamera::getOpenFromUSBMode | ( | ) | const [inline] |
Definition at line 137 of file CSwissRanger3DCamera.h.
| size_t mrpt::hwdrivers::CSwissRanger3DCamera::getRowCount | ( | ) | const [inline] |
Get the row count in the camera images, loaded automatically upon camera open().
Definition at line 121 of file CSwissRanger3DCamera.h.
| virtual void mrpt::hwdrivers::CSwissRanger3DCamera::initialize | ( | ) | [virtual] |
Initializes the 3D camera - should be invoked after calling loadConfig()
| This | method must throw an exception with a descriptive message if some critical error is found. |
Reimplemented from mrpt::hwdrivers::CGenericSensor.
| void mrpt::hwdrivers::CSwissRanger3DCamera::internal_resendParamsToCamera | ( | ) | const [protected] |
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isEnabledConvGray | ( | ) | const [inline] |
Definition at line 154 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isEnabledDenoiseANF | ( | ) | const [inline] |
Definition at line 157 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isEnabledImageHistEqualization | ( | ) | const [inline] |
Definition at line 145 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isEnabledMedianCrossFilter | ( | ) | const [inline] |
Definition at line 151 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isEnabledMedianFilter | ( | ) | const [inline] |
Definition at line 148 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isEnabledPreviewWindow | ( | ) | const [inline] |
Definition at line 160 of file CSwissRanger3DCamera.h.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::isOpen | ( | ) | const |
whether the camera is open and comms work ok. To be called after initialize()
| virtual void mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific | ( | const mrpt::utils::CConfigFileBase & | configSource, | |
| const std::string & | section | |||
| ) | [protected, virtual] |
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)
| This | method must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value. |
Implements mrpt::hwdrivers::CGenericSensor.
| bool mrpt::hwdrivers::CSwissRanger3DCamera::open | ( | ) |
return false on error - Called automatically from initialize(), no need normally for the user to call this.
| void mrpt::hwdrivers::CSwissRanger3DCamera::setOpenFromUSB | ( | bool | USB | ) | [inline] |
true: open from USB, false: open from ethernet.
Definition at line 136 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::setSave3D | ( | bool | save | ) | [inline] |
Definition at line 139 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::setSaveConfidenceImage | ( | bool | save | ) | [inline] |
Definition at line 142 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::setSaveIntensityImage | ( | bool | save | ) | [inline] |
Definition at line 141 of file CSwissRanger3DCamera.h.
| void mrpt::hwdrivers::CSwissRanger3DCamera::setSaveRangeImage | ( | bool | save | ) | [inline] |
Definition at line 140 of file CSwissRanger3DCamera.h.
void* mrpt::hwdrivers::CSwissRanger3DCamera::m_cam [protected] |
opaque handler to SRCAM. NULL means it's not open yet.
Definition at line 210 of file CSwissRanger3DCamera.h.
unsigned int mrpt::hwdrivers::CSwissRanger3DCamera::m_cam_serial_num [protected] |
Serial number of the camera, set on open().
Definition at line 202 of file CSwissRanger3DCamera.h.
size_t mrpt::hwdrivers::CSwissRanger3DCamera::m_cols [protected] |
Size of camera images, set on open().
Definition at line 201 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_enable_conv_gray [protected] |
Definition at line 193 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_enable_denoise_anf [protected] |
Definition at line 194 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_enable_img_hist_equal [protected] |
Definition at line 190 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_enable_median_filter [protected] |
Definition at line 191 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_enable_mediancross_filter [protected] |
Definition at line 192 of file CSwissRanger3DCamera.h.
std::string mrpt::hwdrivers::CSwissRanger3DCamera::m_ip_address [protected] |
Definition at line 199 of file CSwissRanger3DCamera.h.
double mrpt::hwdrivers::CSwissRanger3DCamera::m_maxRange [protected] |
Max range, as deducted from the camera frequency.
Definition at line 203 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_open_from_usb [protected] |
true: USB, false: ETH
Definition at line 197 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_preview_window [protected] |
Show preview window while grabbing.
Definition at line 205 of file CSwissRanger3DCamera.h.
size_t mrpt::hwdrivers::CSwissRanger3DCamera::m_rows [protected] |
Definition at line 201 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_save_3d [protected] |
Save the 3D point cloud (default: true).
Definition at line 185 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_save_confidence [protected] |
Save the estimated confidence 2D image (default: false).
Definition at line 188 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_save_intensity_img [protected] |
Save the 2D intensity image (default: true).
Definition at line 187 of file CSwissRanger3DCamera.h.
bool mrpt::hwdrivers::CSwissRanger3DCamera::m_save_range_img [protected] |
Save the 2D range image (default: true).
Definition at line 186 of file CSwissRanger3DCamera.h.
std::string mrpt::hwdrivers::CSwissRanger3DCamera::m_sensorLabel [protected] |
Definition at line 208 of file CSwissRanger3DCamera.h.
Definition at line 183 of file CSwissRanger3DCamera.h.
size_t mrpt::hwdrivers::CSwissRanger3DCamera::m_usb_serial [protected] |
Definition at line 198 of file CSwissRanger3DCamera.h.
mrpt::gui::CDisplayWindowPtr mrpt::hwdrivers::CSwissRanger3DCamera::m_win2d [protected] |
Definition at line 206 of file CSwissRanger3DCamera.h.
| Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010 |