Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
WamControllerDriverNode Class Reference

IRI ROS Specific Driver Class. More...

#include <wam_controller_driver_node.h>

Inheritance diagram for WamControllerDriverNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WamControllerDriverNode (ros::NodeHandle &nh)
 constructor
 ~WamControllerDriverNode (void)
 Destructor.

Protected Member Functions

void addNodeDiagnostics (void)
 node add diagnostics
void addNodeOpenedTests (void)
 open status driver tests
void addNodeRunningTests (void)
 run status driver tests
void addNodeStoppedTests (void)
 stop status driver tests
void mainNodeThread (void)
 main node thread
void reconfigureNodeHook (int level)
 specific node dynamic reconfigure

Private Member Functions

void follow_joint_trajectoryGetFeedbackCallback (control_msgs::FollowJointTrajectoryFeedbackPtr &feedback)
void follow_joint_trajectoryGetResultCallback (control_msgs::FollowJointTrajectoryResultPtr &result)
bool follow_joint_trajectoryHasSucceedCallback (void)
bool follow_joint_trajectoryIsFinishedCallback (void)
void follow_joint_trajectoryStartCallback (const control_msgs::FollowJointTrajectoryGoalConstPtr &goal)
void follow_joint_trajectoryStopCallback (void)
bool hold_onCallback (iri_wam_common_msgs::wamholdon::Request &req, iri_wam_common_msgs::wamholdon::Response &res)
bool joints_moveCallback (iri_wam_common_msgs::joints_move::Request &req, iri_wam_common_msgs::joints_move::Response &res)
void postNodeOpenHook (void)
 post open hook

Private Attributes

IriActionServer
< control_msgs::FollowJointTrajectoryAction
follow_joint_trajectory_aserver_
CMutex hold_on_mutex_
ros::ServiceServer hold_on_server_
ros::Publisher joint_states_publisher_
CMutex joints_move_mutex_
ros::ServiceServer joints_move_server_
sensor_msgs::JointState JointState_msg_
ros::Publisher libbarrett_link_tcp_publisher_
geometry_msgs::PoseStamped PoseStamped_msg_

Detailed Description

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 61 of file wam_controller_driver_node.h.


Constructor & Destructor Documentation

constructor

This constructor mainly creates and initializes the WamControllerDriverNode 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

Parameters:
nha reference to the node handle object to manage all ROS topics.

Definition at line 4 of file wam_controller_driver_node.cpp.

Destructor.

This destructor is called when the object is about to be destroyed.

Definition at line 271 of file wam_controller_driver_node.cpp.


Member Function Documentation

void WamControllerDriverNode::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< WamControllerDriver >.

Definition at line 251 of file wam_controller_driver_node.cpp.

void WamControllerDriverNode::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< WamControllerDriver >.

Definition at line 255 of file wam_controller_driver_node.cpp.

void WamControllerDriverNode::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< WamControllerDriver >.

Definition at line 263 of file wam_controller_driver_node.cpp.

void WamControllerDriverNode::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< WamControllerDriver >.

Definition at line 259 of file wam_controller_driver_node.cpp.

Definition at line 233 of file wam_controller_driver_node.cpp.

Definition at line 221 of file wam_controller_driver_node.cpp.

Definition at line 209 of file wam_controller_driver_node.cpp.

Definition at line 193 of file wam_controller_driver_node.cpp.

Definition at line 173 of file wam_controller_driver_node.cpp.

Definition at line 184 of file wam_controller_driver_node.cpp.

bool WamControllerDriverNode::hold_onCallback ( iri_wam_common_msgs::wamholdon::Request &  req,
iri_wam_common_msgs::wamholdon::Response &  res 
) [private]

Definition at line 100 of file wam_controller_driver_node.cpp.

bool WamControllerDriverNode::joints_moveCallback ( iri_wam_common_msgs::joints_move::Request &  req,
iri_wam_common_msgs::joints_move::Response &  res 
) [private]

Definition at line 133 of file wam_controller_driver_node.cpp.

void WamControllerDriverNode::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< WamControllerDriver >.

Definition at line 40 of file wam_controller_driver_node.cpp.

void WamControllerDriverNode::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< WamControllerDriver >.

Definition at line 247 of file wam_controller_driver_node.cpp.

void WamControllerDriverNode::reconfigureNodeHook ( int  level) [protected, virtual]

specific node dynamic reconfigure

This function is called reconfigureHook()

Parameters:
levelinteger

Implements iri_base_driver::IriBaseNodeDriver< WamControllerDriver >.

Definition at line 267 of file wam_controller_driver_node.cpp.


Member Data Documentation

Definition at line 83 of file wam_controller_driver_node.h.

Definition at line 75 of file wam_controller_driver_node.h.

Definition at line 73 of file wam_controller_driver_node.h.

Definition at line 67 of file wam_controller_driver_node.h.

Definition at line 78 of file wam_controller_driver_node.h.

Definition at line 76 of file wam_controller_driver_node.h.

sensor_msgs::JointState WamControllerDriverNode::JointState_msg_ [private]

Definition at line 68 of file wam_controller_driver_node.h.

Definition at line 65 of file wam_controller_driver_node.h.

geometry_msgs::PoseStamped WamControllerDriverNode::PoseStamped_msg_ [private]

Definition at line 66 of file wam_controller_driver_node.h.


The documentation for this class was generated from the following files:


iri_wam_controller
Author(s): galenya
autogenerated on Fri Dec 6 2013 20:08:29