Implementation of ROS node for sdh. More...
Public Member Functions | |
void | executeCB (const control_msgs::FollowJointTrajectoryGoalConstPtr &goal) |
Executes the callback from the actionlib. | |
void | executeCB (const control_msgs::FollowJointTrajectoryGoalConstPtr &goal) |
Executes the callback from the actionlib. | |
bool | init () |
Initializes node to get parameters, subscribe and publish to topics. | |
bool | init () |
Initializes node to get parameters, subscribe and publish to topics. | |
bool | parseDegFromJointValue (const brics_actuator::JointValue &val, double °_val) |
bool | parseDegFromJointValue (const brics_actuator::JointValue &val, double °_val) |
SdhNode (std::string name) | |
Constructor for SdhNode class. | |
SdhNode (std::string name) | |
Constructor for SdhNode class. | |
bool | srvCallback_Init (cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res) |
Executes the service callback for init. | |
bool | srvCallback_Init (cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res) |
Executes the service callback for init. | |
bool | srvCallback_Recover (cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res) |
Executes the service callback for recover. | |
bool | srvCallback_Recover (cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res) |
Executes the service callback for recover. | |
bool | srvCallback_SetOperationMode (cob_srvs::SetOperationMode::Request &req, cob_srvs::SetOperationMode::Response &res) |
Executes the service callback for set_operation_mode. | |
bool | srvCallback_SetOperationMode (cob_srvs::SetOperationMode::Request &req, cob_srvs::SetOperationMode::Response &res) |
Executes the service callback for set_operation_mode. | |
bool | srvCallback_Stop (cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res) |
Executes the service callback for stop. | |
bool | srvCallback_Stop (cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res) |
Executes the service callback for stop. | |
void | topicCallback_setVelocities (const brics_actuator::JointVelocities::ConstPtr &msg) |
void | topicCallback_setVelocities (const brics_actuator::JointVelocities::ConstPtr &msg) |
void | topicCallback_setVelocitiesRaw (const std_msgs::Float32MultiArrayPtr &velocities) |
void | topicCallback_setVelocitiesRaw (const std_msgs::Float32MultiArrayPtr &velocities) |
void | updateDsa () |
Main routine to update dsa. | |
void | updateSdh () |
Main routine to update sdh. | |
void | updateSdh () |
Main routine to update sdh. | |
~SdhNode () | |
Destructor for SdhNode class. | |
~SdhNode () | |
Destructor for SdhNode class. | |
Public Attributes | |
ros::NodeHandle | nh_ |
create a handle for this node, initialize node | |
Private Attributes | |
std::string | action_name_ |
actionlib::SimpleActionServer < control_msgs::FollowJointTrajectoryAction > | as_ |
std::vector< int > | axes_ |
int | baudrate_ |
int | DOF_ |
SDH::cDSA * | dsa_ |
int | dsadevicenum_ |
std::string | dsadevicestring_ |
bool | hasNewGoal_ |
int | id_read_ |
int | id_write_ |
bool | isDSAInitialized_ |
bool | isError_ |
bool | isInitialized_ |
std::vector< std::string > | joint_names_ |
std::string | operationMode_ |
double | pi_ |
SDH::cSDH * | sdh_ |
int | sdhdevicenum_ |
std::string | sdhdevicestring_ |
std::string | sdhdevicetype_ |
ros::ServiceServer | srvServer_Init_ |
ros::ServiceServer | srvServer_Recover_ |
ros::ServiceServer | srvServer_SetOperationMode_ |
ros::ServiceServer | srvServer_Stop_ |
std::vector < SDH::cSDH::eAxisState > | state_ |
ros::Subscriber | subSetVelocities_ |
ros::Subscriber | subSetVelocitiesRaw_ |
std::vector< double > | targetAngles_ |
double | timeout_ |
ros::Publisher | topicPub_ControllerState_ |
ros::Publisher | topicPub_Diagnostics_ |
ros::Publisher | topicPub_JointState_ |
ros::Publisher | topicPub_TactileSensor_ |
trajectory_msgs::JointTrajectory | traj_ |
std::vector< double > | velocities_ |
Implementation of ROS node for sdh.
Offers actionlib and direct command interface.
SdhNode::SdhNode | ( | std::string | name | ) | [inline] |
SdhNode::~SdhNode | ( | ) | [inline] |
SdhNode::SdhNode | ( | std::string | name | ) | [inline] |
Constructor for SdhNode class.
name | Name for the actionlib server |
Definition at line 155 of file sdh_only.cpp.
SdhNode::~SdhNode | ( | ) | [inline] |
Destructor for SdhNode class.
Definition at line 171 of file sdh_only.cpp.
void SdhNode::executeCB | ( | const control_msgs::FollowJointTrajectoryGoalConstPtr & | goal | ) | [inline] |
Executes the callback from the actionlib.
Set the current goal to aborted after receiving a new goal and write new goal to a member variable. Wait for the goal to finish and set actionlib status to succeeded.
goal | JointTrajectoryGoal |
Definition at line 257 of file sdh_only.cpp.
void SdhNode::executeCB | ( | const control_msgs::FollowJointTrajectoryGoalConstPtr & | goal | ) | [inline] |
bool SdhNode::init | ( | ) | [inline] |
Initializes node to get parameters, subscribe and publish to topics.
Definition at line 182 of file sdh_only.cpp.
bool SdhNode::init | ( | ) | [inline] |
bool SdhNode::parseDegFromJointValue | ( | const brics_actuator::JointValue & | val, |
double & | deg_val | ||
) | [inline] |
Definition at line 365 of file sdh_only.cpp.
bool SdhNode::parseDegFromJointValue | ( | const brics_actuator::JointValue & | val, |
double & | deg_val | ||
) | [inline] |
bool SdhNode::srvCallback_Init | ( | cob_srvs::Trigger::Request & | req, |
cob_srvs::Trigger::Response & | res | ||
) | [inline] |
Executes the service callback for init.
Connects to the hardware and initialized it.
req | Service request |
res | Service response |
Definition at line 415 of file sdh_only.cpp.
bool SdhNode::srvCallback_Init | ( | cob_srvs::Trigger::Request & | req, |
cob_srvs::Trigger::Response & | res | ||
) | [inline] |
bool SdhNode::srvCallback_Recover | ( | cob_srvs::Trigger::Request & | req, |
cob_srvs::Trigger::Response & | res | ||
) | [inline] |
Executes the service callback for recover.
Recovers the hardware after an emergency stop.
req | Service request |
res | Service response |
Definition at line 517 of file sdh_only.cpp.
bool SdhNode::srvCallback_Recover | ( | cob_srvs::Trigger::Request & | req, |
cob_srvs::Trigger::Response & | res | ||
) | [inline] |
bool SdhNode::srvCallback_SetOperationMode | ( | cob_srvs::SetOperationMode::Request & | req, |
cob_srvs::SetOperationMode::Response & | res | ||
) | [inline] |
Executes the service callback for set_operation_mode.
Changes the operation mode.
req | Service request |
res | Service response |
Definition at line 533 of file sdh_only.cpp.
bool SdhNode::srvCallback_SetOperationMode | ( | cob_srvs::SetOperationMode::Request & | req, |
cob_srvs::SetOperationMode::Response & | res | ||
) | [inline] |
bool SdhNode::srvCallback_Stop | ( | cob_srvs::Trigger::Request & | req, |
cob_srvs::Trigger::Response & | res | ||
) | [inline] |
Executes the service callback for stop.
Stops all hardware movements.
req | Service request |
res | Service response |
Definition at line 489 of file sdh_only.cpp.
bool SdhNode::srvCallback_Stop | ( | cob_srvs::Trigger::Request & | req, |
cob_srvs::Trigger::Response & | res | ||
) | [inline] |
void SdhNode::topicCallback_setVelocities | ( | const brics_actuator::JointVelocities::ConstPtr & | msg | ) | [inline] |
Definition at line 377 of file sdh_only.cpp.
void SdhNode::topicCallback_setVelocities | ( | const brics_actuator::JointVelocities::ConstPtr & | msg | ) | [inline] |
void SdhNode::topicCallback_setVelocitiesRaw | ( | const std_msgs::Float32MultiArrayPtr & | velocities | ) | [inline] |
Definition at line 335 of file sdh_only.cpp.
void SdhNode::topicCallback_setVelocitiesRaw | ( | const std_msgs::Float32MultiArrayPtr & | velocities | ) | [inline] |
void SdhNode::updateDsa | ( | ) | [inline] |
void SdhNode::updateSdh | ( | ) | [inline] |
Main routine to update sdh.
Sends target to hardware and reads out current configuration.
Definition at line 564 of file sdh_only.cpp.
void SdhNode::updateSdh | ( | ) | [inline] |
std::string SdhNode::action_name_ [private] |
actionlib::SimpleActionServer< control_msgs::FollowJointTrajectoryAction > SdhNode::as_ [private] |
std::vector< int > SdhNode::axes_ [private] |
int SdhNode::baudrate_ [private] |
int SdhNode::DOF_ [private] |
SDH::cDSA* SdhNode::dsa_ [private] |
int SdhNode::dsadevicenum_ [private] |
std::string SdhNode::dsadevicestring_ [private] |
bool SdhNode::hasNewGoal_ [private] |
int SdhNode::id_read_ [private] |
int SdhNode::id_write_ [private] |
bool SdhNode::isDSAInitialized_ [private] |
bool SdhNode::isError_ [private] |
bool SdhNode::isInitialized_ [private] |
std::vector< std::string > SdhNode::joint_names_ [private] |
std::string SdhNode::operationMode_ [private] |
double SdhNode::pi_ [private] |
SDH::cSDH * SdhNode::sdh_ [private] |
int SdhNode::sdhdevicenum_ [private] |
std::string SdhNode::sdhdevicestring_ [private] |
std::string SdhNode::sdhdevicetype_ [private] |
ros::ServiceServer SdhNode::srvServer_Init_ [private] |
ros::ServiceServer SdhNode::srvServer_Stop_ [private] |
std::vector< SDH::cSDH::eAxisState > SdhNode::state_ [private] |
ros::Subscriber SdhNode::subSetVelocities_ [private] |
ros::Subscriber SdhNode::subSetVelocitiesRaw_ [private] |
std::vector< double > SdhNode::targetAngles_ [private] |
double SdhNode::timeout_ [private] |
ros::Publisher SdhNode::topicPub_Diagnostics_ [private] |
ros::Publisher SdhNode::topicPub_JointState_ [private] |
trajectory_msgs::JointTrajectory SdhNode::traj_ [private] |
std::vector< double > SdhNode::velocities_ [private] |