IRI ROS Specific Driver Class. More...
|HokuyoLaser3dDriverNode (ros::NodeHandle &nh)|
|node add diagnostics |
|open status driver tests |
|run status driver tests |
|stop status driver tests |
|void||createPointCloud2 (const PointCloudTimeStamped &cld, sensor_msgs::PointCloud2 &pointcloud)|
|main node thread |
|void||reconfigureNodeHook (int level)|
|specific node dynamic reconfigure |
|bool||get_3d_scanCallback (iri_hokuyo_laser3d::Get3DScan::Request &req, iri_hokuyo_laser3d::Get3DScan::Response &res)|
|post open hook |
IRI ROS Specific Driver Class.
This class inherits from the IRI Core class IriBaseNodeDriver<IriBaseDriver>, to provide an execution thread to the driver object. A complete framework with utilites to test the node functionallity or to add diagnostics to specific situations is also given. The inherit template design form allows complete access to any IriBaseDriver object implementation.
As mentioned, tests in the different driver states can be performed through class methods such as addNodeOpenedTests() or addNodeRunningTests(). Tests common to all nodes may be also executed in the pattern class IriBaseNodeDriver. Similarly to the tests, diagnostics can easyly be added. See ROS Wiki for more details: http://www.ros.org/wiki/diagnostics/ (Tutorials: Creating a Diagnostic Analyzer) http://www.ros.org/wiki/self_test/ (Example: Self Test)
This constructor mainly creates and initializes the HokuyoLaser3dDriverNode topics through the given public_node_handle object. IriBaseNodeDriver attributes may be also modified to suit node specifications.
All kind of ROS topics (publishers, subscribers, servers or clients) can be easyly generated with the scripts in the iri_ros_scripts package. Refer to ROS and IRI Wiki pages for more details:
|nh||a reference to the node handle object to manage all ROS topics.|
node add diagnostics
In this function ROS diagnostics applied to this specific node may be added. Common use diagnostics for all nodes are already called from IriBaseNodeDriver::addDiagnostics(), which also calls this function. Information of how ROS diagnostics work can be readen here: http://www.ros.org/wiki/diagnostics/ http://www.ros.org/doc/api/diagnostic_updater/html/example_8cpp-source.html
open status driver tests
In this function tests checking driver's functionallity when driver_base status=open can be added. Common use tests for all nodes are already called from IriBaseNodeDriver tests methods. For more details on how ROS tests work, please refer to the Self Test example in: http://www.ros.org/wiki/self_test/
run status driver tests
In this function tests checking driver's functionallity when driver_base status=run can be added. Common use tests for all nodes are already called from IriBaseNodeDriver tests methods. For more details on how ROS tests work, please refer to the Self Test example in: http://www.ros.org/wiki/self_test/
stop status driver tests
In this function tests checking driver's functionallity when driver_base status=stop can be added. Common use tests for all nodes are already called from IriBaseNodeDriver tests methods. For more details on how ROS tests work, please refer to the Self Test example in: http://www.ros.org/wiki/self_test/
|void HokuyoLaser3dDriverNode::createPointCloud2||(||const PointCloudTimeStamped &||cld,|
|bool HokuyoLaser3dDriverNode::get_3d_scanCallback||(||iri_hokuyo_laser3d::Get3DScan::Request &||req,|
main node thread
This is the main thread node function. Code written here will be executed in every node loop while the driver is on running state. Loop frequency can be tuned my modifying loop_rate attribute.
Here data related to the process loop or to ROS topics (mainly data structs related to the MSG and SRV files) must be updated. ROS publisher objects must publish their data in this process. ROS client servers may also request data to the corresponding server topics.
post open hook
This function is called by IriBaseNodeDriver::postOpenHook(). In this function specific parameters from the driver must be added so the ROS dynamic reconfigure application can update them.
specific node dynamic reconfigure