Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
industrial_robot_client::joint_trajectory_action::JointTrajectoryAction Class Reference

#include <joint_trajectory_action.h>

Public Member Functions

 JointTrajectoryAction ()
 Constructor. More...
 
void run ()
 Begin processing messages and publishing topics. More...
 
 ~JointTrajectoryAction ()
 Destructor. More...
 

Private Types

typedef actionlib::ActionServer< control_msgs::FollowJointTrajectoryAction > JointTractoryActionServer
 

Private Member Functions

void abortGoal ()
 Aborts the current action goal and sends a stop command (empty message) to the robot driver. More...
 
void cancelCB (JointTractoryActionServer::GoalHandle gh)
 Action server cancel callback method. More...
 
void controllerStateCB (const control_msgs::FollowJointTrajectoryFeedbackConstPtr &msg)
 Controller state callback (executed when feedback message received) More...
 
void goalCB (JointTractoryActionServer::GoalHandle gh)
 Action server goal callback method. More...
 
void robotStatusCB (const industrial_msgs::RobotStatusConstPtr &msg)
 Controller status callback (executed when robot status message received) More...
 
void watchdog (const ros::TimerEvent &e)
 Watch dog callback, used to detect robot driver failures. More...
 
bool withinGoalConstraints (const control_msgs::FollowJointTrajectoryFeedbackConstPtr &msg, const trajectory_msgs::JointTrajectory &traj)
 Controller status callback (executed when robot status message received) More...
 

Private Attributes

JointTractoryActionServer action_server_
 Internal action server. More...
 
JointTractoryActionServer::GoalHandle active_goal_
 Cache of the current active goal. More...
 
bool controller_alive_
 Controller was alive during the last watchdog interval. More...
 
trajectory_msgs::JointTrajectory current_traj_
 Cache of the current active trajectory. More...
 
double goal_threshold_
 The goal joint threshold used for determining if a robot is near it final destination. A single value is used for all joints. More...
 
bool has_active_goal_
 Indicates action has an active goal. More...
 
bool has_moved_once_
 Indicates that the robot has been in a moving state at least once since starting the current active trajectory. More...
 
std::vector< std::string > joint_names_
 The joint names associated with the robot the action is interfacing with. The joint names must be the same as expected by the robot driver. More...
 
industrial_msgs::RobotStatusConstPtr last_robot_status_
 Cache of the last subscribed status message. More...
 
control_msgs::FollowJointTrajectoryFeedbackConstPtr last_trajectory_state_
 Cache of the last subscribed feedback message. More...
 
std::string name_
 Name of this class, for logging namespacing. More...
 
ros::NodeHandle node_
 Internal ROS node handle. More...
 
ros::Publisher pub_trajectory_command_
 Publishes desired trajectory (typically to the robot driver) More...
 
ros::Subscriber sub_robot_status_
 Subscribes to the robot status (typically published by the robot driver). More...
 
ros::Subscriber sub_trajectory_state_
 Subscribes to trajectory feedback (typically published by the robot driver). More...
 
ros::Time time_to_check_
 Time at which to start checking for completion of current goal, if one is active. More...
 
ros::Timer watchdog_timer_
 Watchdog time used to fail the action request if the robot driver is not responding. More...
 

Static Private Attributes

static const double DEFAULT_GOAL_THRESHOLD_ = 0.01
 The default goal joint threshold see(goal_threshold). Unit are joint specific (i.e. radians or meters). More...
 
static const double WATCHDOG_PERIOD_ = 1.0
 The watchdog period (seconds) More...
 

Detailed Description

Definition at line 48 of file joint_trajectory_action.h.

Member Typedef Documentation

Definition at line 71 of file joint_trajectory_action.h.

Constructor & Destructor Documentation

industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::JointTrajectoryAction ( )

Constructor.

Definition at line 45 of file joint_trajectory_action.cpp.

industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::~JointTrajectoryAction ( )

Destructor.

Definition at line 70 of file joint_trajectory_action.cpp.

Member Function Documentation

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::abortGoal ( )
private

Aborts the current action goal and sends a stop command (empty message) to the robot driver.

Definition at line 276 of file joint_trajectory_action.cpp.

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::cancelCB ( JointTractoryActionServer::GoalHandle  gh)
private

Action server cancel callback method.

Parameters
ghgoal handle

Definition at line 183 of file joint_trajectory_action.cpp.

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::controllerStateCB ( const control_msgs::FollowJointTrajectoryFeedbackConstPtr &  msg)
private

Controller state callback (executed when feedback message received)

Parameters
msgjoint trajectory feedback message

Definition at line 203 of file joint_trajectory_action.cpp.

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::goalCB ( JointTractoryActionServer::GoalHandle  gh)
private

Action server goal callback method.

Parameters
ghgoal handle

Definition at line 110 of file joint_trajectory_action.cpp.

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::robotStatusCB ( const industrial_msgs::RobotStatusConstPtr &  msg)
private

Controller status callback (executed when robot status message received)

Parameters
msgrobot status message

Definition at line 74 of file joint_trajectory_action.cpp.

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::run ( )
inline

Begin processing messages and publishing topics.

Definition at line 67 of file joint_trajectory_action.h.

void industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::watchdog ( const ros::TimerEvent e)
private

Watch dog callback, used to detect robot driver failures.

Parameters
etime event information

Definition at line 80 of file joint_trajectory_action.cpp.

bool industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::withinGoalConstraints ( const control_msgs::FollowJointTrajectoryFeedbackConstPtr &  msg,
const trajectory_msgs::JointTrajectory &  traj 
)
private

Controller status callback (executed when robot status message received)

Parameters
msgtrajectory feedback message
trajtrajectory to test against feedback
Returns
true if all joints are within goal contraints

Definition at line 287 of file joint_trajectory_action.cpp.

Member Data Documentation

JointTractoryActionServer industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::action_server_
private

Internal action server.

Definition at line 86 of file joint_trajectory_action.h.

JointTractoryActionServer::GoalHandle industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::active_goal_
private

Cache of the current active goal.

Definition at line 130 of file joint_trajectory_action.h.

bool industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::controller_alive_
private

Controller was alive during the last watchdog interval.

Definition at line 114 of file joint_trajectory_action.h.

trajectory_msgs::JointTrajectory industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::current_traj_
private

Cache of the current active trajectory.

Definition at line 134 of file joint_trajectory_action.h.

const double industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::DEFAULT_GOAL_THRESHOLD_ = 0.01
staticprivate

The default goal joint threshold see(goal_threshold). Unit are joint specific (i.e. radians or meters).

Definition at line 140 of file joint_trajectory_action.h.

double industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::goal_threshold_
private

The goal joint threshold used for determining if a robot is near it final destination. A single value is used for all joints.

NOTE: This value is used in conjunction with the robot inMotion status (see industrial_msgs::RobotStatus) if it exists.

Definition at line 149 of file joint_trajectory_action.h.

bool industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::has_active_goal_
private

Indicates action has an active goal.

Definition at line 119 of file joint_trajectory_action.h.

bool industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::has_moved_once_
private

Indicates that the robot has been in a moving state at least once since starting the current active trajectory.

Definition at line 125 of file joint_trajectory_action.h.

std::vector<std::string> industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::joint_names_
private

The joint names associated with the robot the action is interfacing with. The joint names must be the same as expected by the robot driver.

Definition at line 156 of file joint_trajectory_action.h.

industrial_msgs::RobotStatusConstPtr industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::last_robot_status_
private

Cache of the last subscribed status message.

Definition at line 166 of file joint_trajectory_action.h.

control_msgs::FollowJointTrajectoryFeedbackConstPtr industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::last_trajectory_state_
private

Cache of the last subscribed feedback message.

Definition at line 161 of file joint_trajectory_action.h.

std::string industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::name_
private

Name of this class, for logging namespacing.

Definition at line 76 of file joint_trajectory_action.h.

ros::NodeHandle industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::node_
private

Internal ROS node handle.

Definition at line 81 of file joint_trajectory_action.h.

ros::Publisher industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::pub_trajectory_command_
private

Publishes desired trajectory (typically to the robot driver)

Definition at line 91 of file joint_trajectory_action.h.

ros::Subscriber industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::sub_robot_status_
private

Subscribes to the robot status (typically published by the robot driver).

Definition at line 103 of file joint_trajectory_action.h.

ros::Subscriber industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::sub_trajectory_state_
private

Subscribes to trajectory feedback (typically published by the robot driver).

Definition at line 97 of file joint_trajectory_action.h.

ros::Time industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::time_to_check_
private

Time at which to start checking for completion of current goal, if one is active.

Definition at line 172 of file joint_trajectory_action.h.

const double industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::WATCHDOG_PERIOD_ = 1.0
staticprivate

The watchdog period (seconds)

Definition at line 177 of file joint_trajectory_action.h.

ros::Timer industrial_robot_client::joint_trajectory_action::JointTrajectoryAction::watchdog_timer_
private

Watchdog time used to fail the action request if the robot driver is not responding.

Definition at line 109 of file joint_trajectory_action.h.


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


industrial_robot_client
Author(s): Jeremy Zoss
autogenerated on Sat Sep 21 2019 03:30:13