IRI ROS Specific Driver Class. More...
#include <dabo_arm_node_driver_node.h>
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)
Definition at line 62 of file dabo_arm_node_driver_node.h.
constructor
This constructor mainly creates and initializes the DaboArmNodeDriverNode 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:
http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber(c++) http://www.ros.org/wiki/ROS/Tutorials/WritingServiceClient(c++) http://wikiri.upc.es/index.php/Robotics_Lab
nh | a reference to the node handle object to manage all ROS topics. |
Definition at line 3 of file dabo_arm_node_driver_node.cpp.
Destructor.
This destructor is called when the object is about to be destroyed.
Definition at line 519 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::addNodeDiagnostics | ( | void | ) | [protected, virtual] |
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
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 498 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::addNodeOpenedTests | ( | void | ) | [protected, virtual] |
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/
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 503 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::addNodeRunningTests | ( | void | ) | [protected, virtual] |
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/
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 511 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::addNodeStoppedTests | ( | void | ) | [protected, virtual] |
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/
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 507 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::check_motion_sequence_status | ( | diagnostic_updater::DiagnosticStatusWrapper & | stat | ) | [protected] |
Definition at line 117 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::joint_motionGetFeedbackCallback | ( | control_msgs::FollowJointTrajectoryFeedbackPtr & | feedback | ) | [private] |
Definition at line 315 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::joint_motionGetResultCallback | ( | control_msgs::FollowJointTrajectoryResultPtr & | result | ) | [private] |
Definition at line 296 of file dabo_arm_node_driver_node.cpp.
bool DaboArmNodeDriverNode::joint_motionHasSucceedCallback | ( | void | ) | [private] |
Definition at line 277 of file dabo_arm_node_driver_node.cpp.
bool DaboArmNodeDriverNode::joint_motionIsFinishedCallback | ( | void | ) | [private] |
Definition at line 258 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::joint_motionStartCallback | ( | const control_msgs::FollowJointTrajectoryGoalConstPtr & | goal | ) | [private] |
Definition at line 150 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::joint_motionStopCallback | ( | void | ) | [private] |
Definition at line 239 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::mainNodeThread | ( | void | ) | [protected, virtual] |
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 by 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.
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 79 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::motion_sequenceGetFeedbackCallback | ( | tibi_dabo_msgs::sequenceFeedbackPtr & | feedback | ) | [private] |
Definition at line 453 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::motion_sequenceGetResultCallback | ( | tibi_dabo_msgs::sequenceResultPtr & | result | ) | [private] |
Definition at line 434 of file dabo_arm_node_driver_node.cpp.
bool DaboArmNodeDriverNode::motion_sequenceHasSucceedCallback | ( | void | ) | [private] |
Definition at line 415 of file dabo_arm_node_driver_node.cpp.
bool DaboArmNodeDriverNode::motion_sequenceIsFinishedCallback | ( | void | ) | [private] |
Definition at line 396 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::motion_sequenceStartCallback | ( | const tibi_dabo_msgs::sequenceGoalConstPtr & | goal | ) | [private] |
Definition at line 342 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::motion_sequenceStopCallback | ( | void | ) | [private] |
Definition at line 377 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::postNodeOpenHook | ( | void | ) | [private, virtual] |
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.
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 475 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::preNodeCloseHook | ( | void | ) | [private, virtual] |
Reimplemented from iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 483 of file dabo_arm_node_driver_node.cpp.
void DaboArmNodeDriverNode::reconfigureNodeHook | ( | int | level | ) | [protected, virtual] |
specific node dynamic reconfigure
This function is called reconfigureHook()
level | integer |
Implements iri_base_driver::IriBaseNodeDriver< DaboArmNodeDriver >.
Definition at line 515 of file dabo_arm_node_driver_node.cpp.
Definition at line 68 of file dabo_arm_node_driver_node.h.
IriActionServer<control_msgs::FollowJointTrajectoryAction> DaboArmNodeDriverNode::joint_motion_aserver_ [private] |
Definition at line 78 of file dabo_arm_node_driver_node.h.
sensor_msgs::JointState DaboArmNodeDriverNode::JointState_msg_ [private] |
Definition at line 69 of file dabo_arm_node_driver_node.h.
IriActionServer<tibi_dabo_msgs::sequenceAction> DaboArmNodeDriverNode::motion_sequence_aserver_ [private] |
Definition at line 85 of file dabo_arm_node_driver_node.h.
std::string DaboArmNodeDriverNode::side_id [private] |
Definition at line 65 of file dabo_arm_node_driver_node.h.