Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes
SdhNode Class Reference

Implementation of ROS node for sdh. More...

List of all members.

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.
 SdhNode ()
 Constructor for SdhNode class.
 SdhNode (std::string name)
 Constructor for SdhNode class.
bool srvCallback_Disconnect (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for disconnect.
bool srvCallback_EmergencyStop (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for emergency_stop.
bool srvCallback_Init (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for init.
bool srvCallback_Init (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for init.
bool srvCallback_MotorPowerOff (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Disable motor power.
bool srvCallback_MotorPowerOn (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Enable motor power.
bool srvCallback_Recover (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for recover.
bool srvCallback_SetOperationMode (cob_srvs::SetString::Request &req, cob_srvs::SetString::Response &res)
 Executes the service callback for set_operation_mode.
bool srvCallback_SetOperationMode (cob_srvs::SetString::Request &req, cob_srvs::SetString::Response &res)
 Executes the service callback for set_operation_mode.
bool srvCallback_Stop (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for stop.
bool srvCallback_Stop (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 Executes the service callback for stop.
bool switchOperationMode (const std::string &mode)
 Switches operation mode if possible.
bool switchOperationMode (const std::string &mode)
 Switches operation mode if possible.
void topicCallback_setVelocitiesRaw (const std_msgs::Float64MultiArrayPtr &velocities)
void topicCallback_setVelocitiesRaw (const std_msgs::Float64MultiArrayPtr &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
ros::NodeHandle nh_private_

Private Attributes

std::string action_name_
actionlib::SimpleActionServer
< control_msgs::FollowJointTrajectoryAction > 
as_
std::vector< int > axes_
int baudrate_
int DOF_
SDH::cDSA * dsa_
double dsa_calib_pressure_
double dsa_calib_voltage_
int dsa_dbg_level_
double dsa_sensitivity_
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_Disconnect_
ros::ServiceServer srvServer_EmergencyStop_
ros::ServiceServer srvServer_Init_
ros::ServiceServer srvServer_MotorOff_
ros::ServiceServer srvServer_MotorOn_
ros::ServiceServer srvServer_Recover_
ros::ServiceServer srvServer_SetOperationMode_
ros::ServiceServer srvServer_Stop_
std::vector
< SDH::cSDH::eAxisState > 
state_
ros::Subscriber subSetVelocitiesRaw_
std::vector< double > targetAngles_
double timeout_
ros::Publisher topicPub_ControllerState_
ros::Publisher topicPub_Diagnostics_
ros::Publisher topicPub_JointState_
ros::Publisher topicPub_Pressure_
ros::Publisher topicPub_TactileSensor_
ros::Publisher topicPub_Temperature_
trajectory_msgs::JointTrajectory traj_
std::vector< double > velocities_

Static Private Attributes

static const std::vector
< std::string > 
finger_names_
static const std::vector
< std::string > 
temperature_names_

Detailed Description

Implementation of ROS node for sdh.

Offers actionlib and direct command interface.

Definition at line 58 of file sdh.cpp.


Constructor & Destructor Documentation

SdhNode::SdhNode ( std::string  name) [inline]

Constructor for SdhNode class.

Parameters:
nameName for the actionlib server

Definition at line 133 of file sdh.cpp.

SdhNode::~SdhNode ( ) [inline]

Destructor for SdhNode class.

Definition at line 147 of file sdh.cpp.

SdhNode::SdhNode ( ) [inline]

Constructor for SdhNode class.

Parameters:
nameName for the actionlib server

Definition at line 112 of file sdh_only.cpp.

SdhNode::~SdhNode ( ) [inline]

Destructor for SdhNode class.

Definition at line 126 of file sdh_only.cpp.


Member Function Documentation

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.

Parameters:
goalJointTrajectoryGoal

Definition at line 250 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.

Parameters:
goalJointTrajectoryGoal

Definition at line 288 of file sdh.cpp.

bool SdhNode::init ( ) [inline]

Initializes node to get parameters, subscribe and publish to topics.

Definition at line 136 of file sdh_only.cpp.

bool SdhNode::init ( ) [inline]

Initializes node to get parameters, subscribe and publish to topics.

Definition at line 159 of file sdh.cpp.

bool SdhNode::srvCallback_Disconnect ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for disconnect.

Disconnect from SDH and DSA and disable motors to prevent overheating.

Parameters:
reqService request
resService response

Definition at line 618 of file sdh.cpp.

bool SdhNode::srvCallback_EmergencyStop ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for emergency_stop.

Performs an emergency stop.

Parameters:
reqService request
resService response

Definition at line 592 of file sdh.cpp.

bool SdhNode::srvCallback_Init ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for init.

Connects to the hardware and initialized it.

Parameters:
reqService request
resService response

Definition at line 372 of file sdh_only.cpp.

bool SdhNode::srvCallback_Init ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for init.

Connects to the hardware and initialized it.

Parameters:
reqService request
resService response

Definition at line 415 of file sdh.cpp.

bool SdhNode::srvCallback_MotorPowerOff ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Disable motor power.

Parameters:
reqService request
resService response

Definition at line 669 of file sdh.cpp.

bool SdhNode::srvCallback_MotorPowerOn ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Enable motor power.

Parameters:
reqService request
resService response

Definition at line 647 of file sdh.cpp.

bool SdhNode::srvCallback_Recover ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for recover.

Recovers the hardware after an emergency stop.

Parameters:
reqService request
resService response

Definition at line 477 of file sdh_only.cpp.

bool SdhNode::srvCallback_SetOperationMode ( cob_srvs::SetString::Request &  req,
cob_srvs::SetString::Response &  res 
) [inline]

Executes the service callback for set_operation_mode.

Changes the operation mode.

Parameters:
reqService request
resService response

Definition at line 492 of file sdh_only.cpp.

bool SdhNode::srvCallback_SetOperationMode ( cob_srvs::SetString::Request &  req,
cob_srvs::SetString::Response &  res 
) [inline]

Executes the service callback for set_operation_mode.

Changes the operation mode.

Parameters:
reqService request
resService response

Definition at line 553 of file sdh.cpp.

bool SdhNode::srvCallback_Stop ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for stop.

Stops all hardware movements.

Parameters:
reqService request
resService response

Definition at line 450 of file sdh_only.cpp.

bool SdhNode::srvCallback_Stop ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
) [inline]

Executes the service callback for stop.

Stops all hardware movements.

Parameters:
reqService request
resService response

Definition at line 525 of file sdh.cpp.

bool SdhNode::switchOperationMode ( const std::string &  mode) [inline]

Switches operation mode if possible.

Parameters:
modenew mode

Definition at line 211 of file sdh_only.cpp.

bool SdhNode::switchOperationMode ( const std::string &  mode) [inline]

Switches operation mode if possible.

Parameters:
modenew mode

Definition at line 249 of file sdh.cpp.

void SdhNode::topicCallback_setVelocitiesRaw ( const std_msgs::Float64MultiArrayPtr &  velocities) [inline]

Definition at line 332 of file sdh_only.cpp.

void SdhNode::topicCallback_setVelocitiesRaw ( const std_msgs::Float64MultiArrayPtr &  velocities) [inline]

Definition at line 375 of file sdh.cpp.

void SdhNode::updateDsa ( ) [inline]

Main routine to update dsa.

Reads out current values.

Definition at line 914 of file sdh.cpp.

void SdhNode::updateSdh ( ) [inline]

Main routine to update sdh.

Sends target to hardware and reads out current configuration.

Definition at line 526 of file sdh_only.cpp.

void SdhNode::updateSdh ( ) [inline]

Main routine to update sdh.

Sends target to hardware and reads out current configuration.

Definition at line 691 of file sdh.cpp.


Member Data Documentation

std::string SdhNode::action_name_ [private]

Definition at line 87 of file sdh.cpp.

actionlib::SimpleActionServer< control_msgs::FollowJointTrajectoryAction > SdhNode::as_ [private]

Definition at line 86 of file sdh.cpp.

std::vector< int > SdhNode::axes_ [private]

Definition at line 118 of file sdh.cpp.

int SdhNode::baudrate_ [private]

Definition at line 106 of file sdh.cpp.

int SdhNode::DOF_ [private]

Definition at line 112 of file sdh.cpp.

SDH::cDSA* SdhNode::dsa_ [private]

Definition at line 94 of file sdh.cpp.

double SdhNode::dsa_calib_pressure_ [private]

Definition at line 103 of file sdh.cpp.

double SdhNode::dsa_calib_voltage_ [private]

Definition at line 104 of file sdh.cpp.

int SdhNode::dsa_dbg_level_ [private]

Definition at line 101 of file sdh.cpp.

double SdhNode::dsa_sensitivity_ [private]

Definition at line 102 of file sdh.cpp.

int SdhNode::dsadevicenum_ [private]

Definition at line 105 of file sdh.cpp.

std::string SdhNode::dsadevicestring_ [private]

Definition at line 100 of file sdh.cpp.

const std::vector< std::string > SdhNode::finger_names_ [static, private]
Initial value:
 {
  "finger_2", "thumb_", "finger_1"
}

Definition at line 125 of file sdh.cpp.

bool SdhNode::hasNewGoal_ [private]

Definition at line 121 of file sdh.cpp.

int SdhNode::id_read_ [private]

Definition at line 106 of file sdh.cpp.

int SdhNode::id_write_ [private]

Definition at line 106 of file sdh.cpp.

Definition at line 110 of file sdh.cpp.

bool SdhNode::isError_ [private]

Definition at line 111 of file sdh.cpp.

bool SdhNode::isInitialized_ [private]

Definition at line 109 of file sdh.cpp.

std::vector< std::string > SdhNode::joint_names_ [private]

Definition at line 117 of file sdh.cpp.

create a handle for this node, initialize node

Definition at line 62 of file sdh.cpp.

Definition at line 58 of file sdh_only.cpp.

std::string SdhNode::operationMode_ [private]

Definition at line 122 of file sdh.cpp.

double SdhNode::pi_ [private]

Definition at line 113 of file sdh.cpp.

SDH::cSDH * SdhNode::sdh_ [private]

Definition at line 93 of file sdh.cpp.

int SdhNode::sdhdevicenum_ [private]

Definition at line 99 of file sdh.cpp.

std::string SdhNode::sdhdevicestring_ [private]

Definition at line 98 of file sdh.cpp.

std::string SdhNode::sdhdevicetype_ [private]

Definition at line 97 of file sdh.cpp.

Definition at line 81 of file sdh.cpp.

Definition at line 80 of file sdh.cpp.

Definition at line 76 of file sdh.cpp.

Definition at line 83 of file sdh.cpp.

Definition at line 82 of file sdh.cpp.

Definition at line 78 of file sdh.cpp.

Definition at line 79 of file sdh.cpp.

Definition at line 77 of file sdh.cpp.

std::vector< SDH::cSDH::eAxisState > SdhNode::state_ [private]

Definition at line 95 of file sdh.cpp.

Definition at line 73 of file sdh.cpp.

std::vector< double > SdhNode::targetAngles_ [private]

Definition at line 119 of file sdh.cpp.

const std::vector< std::string > SdhNode::temperature_names_ [static, private]
Initial value:
 {
    "root",
    "proximal_finger_1", "distal_finger_1",
    "proximal_finger_2", "distal_finger_2",
    "proximal_finger_3", "distal_finger_3",
    "controller", "pcb"
}

Definition at line 124 of file sdh.cpp.

double SdhNode::timeout_ [private]

Definition at line 107 of file sdh.cpp.

Definition at line 66 of file sdh.cpp.

Definition at line 68 of file sdh.cpp.

Definition at line 65 of file sdh.cpp.

Definition at line 70 of file sdh.cpp.

Definition at line 67 of file sdh.cpp.

Definition at line 69 of file sdh.cpp.

trajectory_msgs::JointTrajectory SdhNode::traj_ [private]

Definition at line 115 of file sdh.cpp.

std::vector< double > SdhNode::velocities_ [private]

Definition at line 120 of file sdh.cpp.


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


schunk_sdh
Author(s): Mathias Luedtke , Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:21