#include <joint_trajectory_action_controller.h>
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< AbstractKatana > | katana_ |
ros::ServiceServer | serve_query_state_ |
double | stopped_velocity_tolerance_ |
ros::Subscriber | sub_command_ |
Definition at line 49 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 57 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 54 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 53 of file joint_trajectory_action_controller.h.
|
private |
Enumerator | |
---|---|
PREEMPT_REQUESTED |
Definition at line 68 of file joint_trajectory_action_controller.h.
katana::JointTrajectoryActionController::JointTrajectoryActionController | ( | boost::shared_ptr< AbstractKatana > | katana | ) |
Definition at line 36 of file joint_trajectory_action_controller.cpp.
|
virtual |
Definition at line 71 of file joint_trajectory_action_controller.cpp.
|
private |
Checks that all joint velocities are zero.
Definition at line 610 of file joint_trajectory_action_controller.cpp.
|
private |
Definition at line 207 of file joint_trajectory_action_controller.cpp.
|
private |
Callback for the "command" topic. There are two ways of sending a trajectory:
Definition at line 191 of file joint_trajectory_action_controller.cpp.
|
private |
Definition at line 422 of file joint_trajectory_action_controller.cpp.
|
private |
Definition at line 445 of file joint_trajectory_action_controller.cpp.
|
private |
Definition at line 471 of file joint_trajectory_action_controller.cpp.
|
private |
Checks that we have ended inside the goal constraints.
Definition at line 591 of file joint_trajectory_action_controller.cpp.
|
private |
Definition at line 621 of file joint_trajectory_action_controller.cpp.
|
private |
provides the "query_state" service
Definition at line 363 of file joint_trajectory_action_controller.cpp.
void katana::JointTrajectoryActionController::reset_trajectory_and_stop | ( | ) |
Sets the current trajectory to a simple "hold position" trajectory
Definition at line 80 of file joint_trajectory_action_controller.cpp.
void katana::JointTrajectoryActionController::update | ( | ) |
Definition at line 99 of file joint_trajectory_action_controller.cpp.
|
private |
|
private |
Checks if the given KNI trajectory fulfills all constraints.
traj | the KNI trajectory to sample |
Definition at line 651 of file joint_trajectory_action_controller.cpp.
|
private |
Definition at line 92 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 93 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 89 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 98 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 77 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 71 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 72 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 86 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 76 of file joint_trajectory_action_controller.h.
|
private |
Definition at line 81 of file joint_trajectory_action_controller.h.