FX8 driver nodelet class. More...
#include <fx8_driver_nodelet.h>
Classes | |
struct | FX8Info |
Struct of fx8 information. More... | |
struct | FX8Scan |
Struct of fx8 scan data. More... | |
Public Member Functions | |
FX8DriverNodelet () | |
Constructer. More... | |
virtual | ~FX8DriverNodelet () |
Destructor. More... | |
Public Member Functions inherited from nodelet::Nodelet | |
void | init (const std::string &name, const M_string &remapping_args, const V_string &my_argv, ros::CallbackQueueInterface *st_queue=NULL, ros::CallbackQueueInterface *mt_queue=NULL) |
Nodelet () | |
virtual | ~Nodelet () |
Private Types | |
typedef FX8Info | Config |
Configurations of FX8. More... | |
typedef std::pair< ros::Time, std::string > | ErrorInfo |
Error information. More... | |
typedef fx8_bool | FX8Bool |
Boolean of libfx8. More... | |
typedef fx8_handle | FX8Handle |
Device handle. More... | |
typedef fx8_measure_mode | FX8MeasureMode |
Device measure mode. More... | |
typedef fx8_sensor_info | FX8SensorInfo |
Sensor information. More... | |
typedef fx8_xy_data | FX8XyData |
Device xy data. More... | |
typedef fx8_xy_data_element | FX8XyDataElement |
Element of device xy data. More... | |
typedef fx8_xy_data_surface | FX8XyDataSurface |
Surface of device xy data. More... | |
typedef std::pair< ros::Time, std::vector< unsigned char > > | ReceivedErrorCodePackets |
Received FX8 error code. More... | |
typedef dynamic_reconfigure::Server< infinisoleil::FX8Config > | ReconfigureServer |
Dynamic reconfigure server. More... | |
typedef FX8Scan | Scan |
Scan data of FX8. More... | |
typedef std::vector< unsigned char > | ScanDataPackets |
Received FX8 scan data packets. More... | |
typedef diagnostic_updater::HeaderlessTopicDiagnostic | TopicDiagnostic |
Topic diagnostic. More... | |
typedef boost::shared_ptr< TopicDiagnostic > | TopicDiagnosticPtr |
Shared pointer of topic diagnostic. More... | |
Private Member Functions | |
void | addDiagnostics (const unsigned char *error_data, size_t size) |
Add obtained error data. More... | |
sensor_msgs::ImagePtr | createIRImageMessage () |
Create message for ir_image topic. More... | |
sensor_msgs::PointCloud2Ptr | createPointCloudMessage () |
Create message for point_cloud topic. More... | |
sensor_msgs::ImagePtr | createRangeImageMessage () |
Create message for range_image topic. More... | |
void | driverThreadFunc () |
FX8 driver thread. More... | |
void | extractRangeAndIntensityFromScanData (int index, const unsigned char *scan_data, unsigned short *range, unsigned short *intensity) |
Extract range and intensity data from scan data packets. More... | |
void | fillDiagnosticStatusByErrorInfo (diagnostic_updater::DiagnosticStatusWrapper &status) |
Fill diagnostic status by error information of FX8. More... | |
void | fillDiagnosticStatusByReceivedErrorCode (diagnostic_updater::DiagnosticStatusWrapper &status) |
Fill diagnostic status by received error code of FX8. More... | |
bool | getDeviceSensorInfo (const FX8Handle device, FX8SensorInfo *sensor_info, FX8XyData *xy_data) |
Get FX8SensorInfo and set these. More... | |
bool | initializeDevice () |
Initialize and connect to FX8. More... | |
void | initializeNodelet () |
Initialize nodelet. More... | |
void | initializeReconfigureServer (ros::NodeHandle param_nh) |
Initialize reconfigure server. More... | |
virtual void | onInit () |
Initialize FX8 driver. More... | |
void | outputDeviceParameters () |
Output FX8 parameters to parameter server. More... | |
void | publishScanData (const unsigned char *scan_data, size_t size) |
Publish scan data. More... | |
void | reconfigureFX8Callback (FX8Config config, uint32_t level) |
Reconfigure FX8. More... | |
bool | setDeviceMeasureMode (const FX8Handle device, const FX8MeasureMode measure_mode, FX8SensorInfo *sensor_info, FX8XyData *xy_data) |
Set measure mode of FX8. More... | |
void | setMessageData (sensor_msgs::ImagePtr range_msg, sensor_msgs::ImagePtr ir_msg, sensor_msgs::PointCloud2Ptr point_cloud_msg, unsigned char surface_number) |
Set data of range image, IR image and point cloud. More... | |
void | setupDiagnostics () |
Setup diagnostics. More... | |
void | shutdownDevice () |
Shut down device. More... | |
void | shutdownNodelet () |
Shut down nodelet. More... | |
void | shutdownReconfigureServer () |
Shut down reconfigure server. More... | |
void | spin () |
Spin driver thread. More... | |
bool | startScan () |
Start FX8 scan. More... | |
void | updateTime () |
Update timestamp. More... | |
Static Private Member Functions | |
static void | receiveErrorCodeCallback (const unsigned char *error_data, size_t size, void *user_data) |
Receive FX8 Error code. More... | |
static void | receiveScanDataCallback (const unsigned char *scan_data, size_t size, void *user_data) |
Receive FX8 scan data. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from nodelet::Nodelet | |
ros::CallbackQueueInterface & | getMTCallbackQueue () const |
ros::NodeHandle & | getMTNodeHandle () const |
ros::NodeHandle & | getMTPrivateNodeHandle () const |
const V_string & | getMyArgv () const |
const std::string & | getName () const |
ros::NodeHandle & | getNodeHandle () const |
ros::NodeHandle & | getPrivateNodeHandle () const |
const M_string & | getRemappingArgs () const |
ros::CallbackQueueInterface & | getSTCallbackQueue () const |
std::string | getSuffixedName (const std::string &suffix) const |
FX8 driver nodelet class.
Definition at line 59 of file fx8_driver_nodelet.h.
|
private |
Configurations of FX8.
Definition at line 100 of file fx8_driver_nodelet.h.
|
private |
Error information.
Definition at line 71 of file fx8_driver_nodelet.h.
|
private |
Boolean of libfx8.
Definition at line 63 of file fx8_driver_nodelet.h.
|
private |
Device handle.
Definition at line 61 of file fx8_driver_nodelet.h.
|
private |
Device measure mode.
Definition at line 62 of file fx8_driver_nodelet.h.
|
private |
Sensor information.
Definition at line 64 of file fx8_driver_nodelet.h.
|
private |
Device xy data.
Definition at line 67 of file fx8_driver_nodelet.h.
|
private |
Element of device xy data.
Definition at line 65 of file fx8_driver_nodelet.h.
|
private |
Surface of device xy data.
Definition at line 66 of file fx8_driver_nodelet.h.
|
private |
Received FX8 error code.
Definition at line 70 of file fx8_driver_nodelet.h.
|
private |
Dynamic reconfigure server.
Definition at line 68 of file fx8_driver_nodelet.h.
|
private |
Scan data of FX8.
Definition at line 101 of file fx8_driver_nodelet.h.
|
private |
Received FX8 scan data packets.
Definition at line 69 of file fx8_driver_nodelet.h.
|
private |
Topic diagnostic.
Definition at line 72 of file fx8_driver_nodelet.h.
|
private |
Shared pointer of topic diagnostic.
Definition at line 73 of file fx8_driver_nodelet.h.
infinisoleil::FX8DriverNodelet::FX8DriverNodelet | ( | ) |
Constructer.
Definition at line 47 of file fx8_driver_nodelet.cpp.
|
virtual |
Destructor.
Definition at line 65 of file fx8_driver_nodelet.cpp.
|
private |
Add obtained error data.
[in] | error_data | Error data from FX8. |
[in] | size | Size of error data. |
Definition at line 802 of file fx8_driver_nodelet.cpp.
|
private |
Create message for ir_image topic.
Definition at line 605 of file fx8_driver_nodelet.cpp.
|
private |
Create message for point_cloud topic.
Definition at line 623 of file fx8_driver_nodelet.cpp.
|
private |
Create message for range_image topic.
Definition at line 587 of file fx8_driver_nodelet.cpp.
|
private |
FX8 driver thread.
Definition at line 177 of file fx8_driver_nodelet.cpp.
|
inlineprivate |
Extract range and intensity data from scan data packets.
[in] | index | Index of scan data packets. |
[in] | scan_data | Scan data. |
[out] | range | Range data. |
[out] | intensity | Intensity data. |
Definition at line 697 of file fx8_driver_nodelet.cpp.
|
private |
Fill diagnostic status by error information of FX8.
[in] | status | Diagnostic status of FX8. |
Definition at line 724 of file fx8_driver_nodelet.cpp.
|
private |
Fill diagnostic status by received error code of FX8.
[in] | status | Diagnostic status of FX8. |
Definition at line 746 of file fx8_driver_nodelet.cpp.
|
private |
Get FX8SensorInfo and set these.
[in] | device | FX8 handle. |
[out] | sensor_info | Sensor information of FX8. |
[out] | xy_data | XY data of FX8. |
Definition at line 405 of file fx8_driver_nodelet.cpp.
|
private |
Initialize and connect to FX8.
Definition at line 211 of file fx8_driver_nodelet.cpp.
|
private |
Initialize nodelet.
Definition at line 84 of file fx8_driver_nodelet.cpp.
|
private |
Initialize reconfigure server.
[in] | param_nh | Private node handle of FX8DriverNodelet. |
Definition at line 144 of file fx8_driver_nodelet.cpp.
|
privatevirtual |
Initialize FX8 driver.
Implements nodelet::Nodelet.
Definition at line 58 of file fx8_driver_nodelet.cpp.
|
private |
Output FX8 parameters to parameter server.
Definition at line 426 of file fx8_driver_nodelet.cpp.
|
private |
Publish scan data.
[in] | scan_data | FX8 scan data. |
[in] | size | Size of scan data. |
Definition at line 515 of file fx8_driver_nodelet.cpp.
|
staticprivate |
Receive FX8 Error code.
[in] | error_data | Error data. |
[in] | size | Size of error data. |
[in] | user_data | User-defined data. |
Definition at line 908 of file fx8_driver_nodelet.cpp.
|
staticprivate |
Receive FX8 scan data.
[in] | scan_data | Scan data. |
[in] | size | Size of scan data. |
[in] | user_data | User-defined data. |
Definition at line 901 of file fx8_driver_nodelet.cpp.
|
private |
Reconfigure FX8.
[in] | config | Parameters for reconfiguration. |
[in] | level | Bitmask for changed parameters. |
Definition at line 812 of file fx8_driver_nodelet.cpp.
|
private |
Set measure mode of FX8.
[in] | device | FX8 handle. |
[in] | measure_mode | Measure mode of FX8. |
[out] | sensor_info | Sensor information of FX8. |
[out] | xy_data | XY data of FX8. |
Definition at line 365 of file fx8_driver_nodelet.cpp.
|
private |
Set data of range image, IR image and point cloud.
[in] | range_msg | Message for range_image topic. |
[in] | ir_msg | Message for ir_image topic. |
[in] | point_cloud_msg | Message for point_cloud topic. |
[in] | surface_number | Surface number of xy data. |
Definition at line 655 of file fx8_driver_nodelet.cpp.
|
private |
Setup diagnostics.
Definition at line 155 of file fx8_driver_nodelet.cpp.
|
private |
Shut down device.
Definition at line 351 of file fx8_driver_nodelet.cpp.
|
private |
Shut down nodelet.
Definition at line 108 of file fx8_driver_nodelet.cpp.
|
private |
Shut down reconfigure server.
Definition at line 150 of file fx8_driver_nodelet.cpp.
|
private |
Spin driver thread.
Definition at line 504 of file fx8_driver_nodelet.cpp.
|
private |
Start FX8 scan.
Definition at line 463 of file fx8_driver_nodelet.cpp.
|
inlineprivate |
Update timestamp.
Definition at line 896 of file fx8_driver_nodelet.cpp.
|
private |
Configurations of FX8.
Definition at line 260 of file fx8_driver_nodelet.h.
|
private |
Handle of FX8.
Definition at line 258 of file fx8_driver_nodelet.h.
|
private |
Flag of running device.
Definition at line 265 of file fx8_driver_nodelet.h.
|
private |
Diagnostic updater.
Definition at line 275 of file fx8_driver_nodelet.h.
|
private |
Flag to enable diagnostics.
Definition at line 280 of file fx8_driver_nodelet.h.
|
private |
FX8 driver thread.
Definition at line 264 of file fx8_driver_nodelet.h.
|
private |
Received error code from FX8.
Definition at line 261 of file fx8_driver_nodelet.h.
|
private |
Error information of FX8.
Definition at line 262 of file fx8_driver_nodelet.h.
|
private |
Topic diagnostic for IR image.
Definition at line 277 of file fx8_driver_nodelet.h.
|
private |
Publisher of IR image.
Definition at line 269 of file fx8_driver_nodelet.h.
|
private |
Timestamp for topics.
Definition at line 272 of file fx8_driver_nodelet.h.
|
private |
Mutex for diagnostics.
Definition at line 279 of file fx8_driver_nodelet.h.
|
private |
Mutex for scan data.
Definition at line 271 of file fx8_driver_nodelet.h.
|
private |
Topic diagnostic for point cloud.
Definition at line 278 of file fx8_driver_nodelet.h.
|
private |
Publisher of point cloud.
Definition at line 270 of file fx8_driver_nodelet.h.
|
private |
Topic diagnostic for range image.
Definition at line 276 of file fx8_driver_nodelet.h.
|
private |
Publisher of range image.
Definition at line 268 of file fx8_driver_nodelet.h.
|
private |
Server for reconfiguration.
Definition at line 284 of file fx8_driver_nodelet.h.
|
private |
Scan data from FX8.
Definition at line 259 of file fx8_driver_nodelet.h.
|
private |
Target frame rate of topics.
Definition at line 281 of file fx8_driver_nodelet.h.