Public Member Functions | Private Types | Private Member Functions | Private Attributes
katana::JointTrajectoryActionController Class Reference

#include <joint_trajectory_action_controller.h>

List of all members.

Public Member Functions

 JointTrajectoryActionController (boost::shared_ptr< AbstractKatana > katana)
void reset_trajectory_and_stop ()
void update ()
virtual ~JointTrajectoryActionController ()

Private Types

enum  { PREEMPT_REQUESTED = -1000 }
typedef
actionlib::SimpleActionServer
< control_msgs::FollowJointTrajectoryAction > 
FJTAS
typedef
actionlib::SimpleActionClient
< control_msgs::JointTrajectoryAction > 
JTAC
typedef
actionlib::SimpleActionServer
< control_msgs::JointTrajectoryAction > 
JTAS

Private Member Functions

bool allJointsStopped ()
boost::shared_ptr
< SpecifiedTrajectory
calculateTrajectory (const trajectory_msgs::JointTrajectory &msg)
void commandCB (const trajectory_msgs::JointTrajectory::ConstPtr &msg)
void executeCB (const JTAS::GoalConstPtr &goal)
void executeCBFollow (const FJTAS::GoalConstPtr &goal)
int executeCommon (const trajectory_msgs::JointTrajectory &trajectory, boost::function< bool()> isPreemptRequested)
bool goalReached ()
std::vector< int > makeJointsLookup (const trajectory_msgs::JointTrajectory &msg)
bool queryStateService (control_msgs::QueryTrajectoryState::Request &req, control_msgs::QueryTrajectoryState::Response &resp)
bool validJoints (std::vector< std::string > new_joint_names)
bool validTrajectory (const SpecifiedTrajectory &traj)

Private Attributes

JTAS action_server_
FJTAS action_server_follow_
ros::Publisher controller_state_publisher_
boost::shared_ptr
< SpecifiedTrajectory
current_trajectory_
std::vector< double > goal_constraints_
std::vector< std::string > joints_
boost::shared_ptr< AbstractKatanakatana_
ros::ServiceServer serve_query_state_
double stopped_velocity_tolerance_
ros::Subscriber sub_command_

Detailed Description

Definition at line 49 of file joint_trajectory_action_controller.h.


Member Typedef Documentation

typedef actionlib::SimpleActionServer<control_msgs::FollowJointTrajectoryAction> katana::JointTrajectoryActionController::FJTAS [private]

Definition at line 57 of file joint_trajectory_action_controller.h.

typedef actionlib::SimpleActionClient<control_msgs::JointTrajectoryAction> katana::JointTrajectoryActionController::JTAC [private]

Definition at line 54 of file joint_trajectory_action_controller.h.

typedef actionlib::SimpleActionServer<control_msgs::JointTrajectoryAction> katana::JointTrajectoryActionController::JTAS [private]

Definition at line 53 of file joint_trajectory_action_controller.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
PREEMPT_REQUESTED 

Definition at line 68 of file joint_trajectory_action_controller.h.


Constructor & Destructor Documentation

Definition at line 36 of file joint_trajectory_action_controller.cpp.

Definition at line 71 of file joint_trajectory_action_controller.cpp.


Member Function Documentation

Checks that all joint velocities are zero.

Definition at line 610 of file joint_trajectory_action_controller.cpp.

boost::shared_ptr< SpecifiedTrajectory > katana::JointTrajectoryActionController::calculateTrajectory ( const trajectory_msgs::JointTrajectory &  msg) [private]

Definition at line 207 of file joint_trajectory_action_controller.cpp.

void katana::JointTrajectoryActionController::commandCB ( const trajectory_msgs::JointTrajectory::ConstPtr &  msg) [private]

Callback for the "command" topic. There are two ways of sending a trajectory: 1. by publishing a message to the "command" topic (this is what happens here) 2. by using the action server (see executeCB)

Definition at line 191 of file joint_trajectory_action_controller.cpp.

void katana::JointTrajectoryActionController::executeCB ( const JTAS::GoalConstPtr &  goal) [private]

Definition at line 422 of file joint_trajectory_action_controller.cpp.

void katana::JointTrajectoryActionController::executeCBFollow ( const FJTAS::GoalConstPtr &  goal) [private]

Definition at line 445 of file joint_trajectory_action_controller.cpp.

int katana::JointTrajectoryActionController::executeCommon ( const trajectory_msgs::JointTrajectory &  trajectory,
boost::function< bool()>  isPreemptRequested 
) [private]
Returns:
either one of control_msgs::FollowJointTrajectoryResult, or PREEMPT_REQUESTED

Definition at line 471 of file joint_trajectory_action_controller.cpp.

Checks that we have ended inside the goal constraints.

Definition at line 591 of file joint_trajectory_action_controller.cpp.

std::vector< int > katana::JointTrajectoryActionController::makeJointsLookup ( const trajectory_msgs::JointTrajectory &  msg) [private]

Definition at line 621 of file joint_trajectory_action_controller.cpp.

bool katana::JointTrajectoryActionController::queryStateService ( control_msgs::QueryTrajectoryState::Request &  req,
control_msgs::QueryTrajectoryState::Response &  resp 
) [private]

provides the "query_state" service

Definition at line 363 of file joint_trajectory_action_controller.cpp.

Sets the current trajectory to a simple "hold position" trajectory

Definition at line 80 of file joint_trajectory_action_controller.cpp.

Definition at line 99 of file joint_trajectory_action_controller.cpp.

bool katana::JointTrajectoryActionController::validJoints ( std::vector< std::string >  new_joint_names) [private]

Checks if the given KNI trajectory fulfills all constraints.

Parameters:
trajthe KNI trajectory to sample
Returns:

Definition at line 651 of file joint_trajectory_action_controller.cpp.


Member Data Documentation

Definition at line 92 of file joint_trajectory_action_controller.h.

Definition at line 93 of file joint_trajectory_action_controller.h.

Definition at line 89 of file joint_trajectory_action_controller.h.

Definition at line 98 of file joint_trajectory_action_controller.h.

Definition at line 77 of file joint_trajectory_action_controller.h.

std::vector<std::string> katana::JointTrajectoryActionController::joints_ [private]

Definition at line 71 of file joint_trajectory_action_controller.h.

Definition at line 72 of file joint_trajectory_action_controller.h.

Definition at line 86 of file joint_trajectory_action_controller.h.

Definition at line 76 of file joint_trajectory_action_controller.h.

Definition at line 81 of file joint_trajectory_action_controller.h.


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


katana
Author(s): Martin Günther
autogenerated on Thu Aug 27 2015 13:40:35