51 for (
int i=1; i<=n; i++)
53 powers[i] = powers[i-1]*x;
58 double end_pos,
double end_vel,
double end_acc,
double time, std::vector<double>& coefficients)
60 coefficients.resize(6);
64 coefficients[0] = end_pos;
65 coefficients[1] = end_vel;
66 coefficients[2] = 0.5*end_acc;
67 coefficients[3] = 0.0;
68 coefficients[4] = 0.0;
69 coefficients[5] = 0.0;
76 coefficients[0] = start_pos;
77 coefficients[1] = start_vel;
78 coefficients[2] = 0.5*start_acc;
79 coefficients[3] = (-20.0*start_pos + 20.0*end_pos - 3.0*start_acc*T[2] + end_acc*T[2] -
80 12.0*start_vel*T[1] - 8.0*end_vel*T[1]) / (2.0*T[3]);
81 coefficients[4] = (30.0*start_pos - 30.0*end_pos + 3.0*start_acc*T[2] - 2.0*end_acc*T[2] +
82 16.0*start_vel*T[1] + 14.0*end_vel*T[1]) / (2.0*T[4]);
83 coefficients[5] = (-12.0*start_pos + 12.0*end_pos - start_acc*T[2] + end_acc*T[2] -
84 6.0*start_vel*T[1] - 6.0*end_vel*T[1]) / (2.0*T[5]);
92 double& position,
double& velocity,
double& acceleration)
98 position = t[0]*coefficients[0] +
99 t[1]*coefficients[1] +
100 t[2]*coefficients[2] +
101 t[3]*coefficients[3] +
102 t[4]*coefficients[4] +
103 t[5]*coefficients[5];
105 velocity = t[0]*coefficients[1] +
106 2.0*t[1]*coefficients[2] +
107 3.0*t[2]*coefficients[3] +
108 4.0*t[3]*coefficients[4] +
109 5.0*t[4]*coefficients[5];
111 acceleration = 2.0*t[0]*coefficients[2] +
112 6.0*t[1]*coefficients[3] +
113 12.0*t[2]*coefficients[4] +
114 20.0*t[3]*coefficients[5];
118 double end_pos,
double end_vel,
double time, std::vector<double>& coefficients)
120 coefficients.resize(4);
124 coefficients[0] = end_pos;
125 coefficients[1] = end_vel;
126 coefficients[2] = 0.0;
127 coefficients[3] = 0.0;
134 coefficients[0] = start_pos;
135 coefficients[1] = start_vel;
136 coefficients[2] = (-3.0*start_pos + 3.0*end_pos - 2.0*start_vel*T[1] - end_vel*T[1]) / T[2];
137 coefficients[3] = (2.0*start_pos - 2.0*end_pos + start_vel*T[1] + end_vel*T[1]) / T[3];
142 JointTrajectoryActionController::JointTrajectoryActionController()
143 : loop_count_(0), robot_(NULL)
173 for (
int i = 0; i < joint_names.
size(); ++i)
176 if (name_value.
getType() != XmlRpcValue::TypeString)
178 ROS_ERROR(
"Array of joint names should contain all strings. (namespace: %s)",
185 ROS_ERROR(
"Joint not found: %s. (namespace: %s)",
193 for (
size_t i = 0; i <
joints_.size(); ++i)
197 ROS_ERROR(
"Joint %s was not calibrated (namespace: %s)",
204 std::string gains_ns;
209 for (
size_t i = 0; i <
joints_.size(); ++i)
220 for (
size_t i = 0; i <
joints_.size(); ++i)
225 joint_nh.
param(
"proxy/lambda",
proxies_[i].lambda_proxy_, 1.0);
226 joint_nh.
param(
"proxy/acc_converge",
proxies_[i].acc_converge_, 0.0);
227 joint_nh.
param(
"proxy/vel_limit",
proxies_[i].vel_limit_, 0.0);
228 joint_nh.
param(
"proxy/effort_limit",
proxies_[i].effort_limit_, 0.0);
242 double stopped_velocity_tolerance;
243 node_.
param(
"joint_trajectory_action_node/constraints/stopped_velocity_tolerance", stopped_velocity_tolerance, 0.01);
246 for (
size_t i = 0; i <
joints_.size(); ++i)
248 std::string ns = std::string(
"joint_trajectory_action_node/constraints") +
joints_[i]->joint_->name;
255 for (
size_t i = 0; i <
joints_.size(); ++i)
257 std::string p =
"output_filters/" +
joints_[i]->joint_->name;
270 traj[0].duration = 0.0;
271 traj[0].splines.resize(
joints_.size());
272 for (
size_t j = 0; j <
joints_.size(); ++j)
273 traj[0].splines[j].coef[0] = 0.0;
286 (
node_,
"state", 1));
288 for (
size_t j = 0; j <
joints_.size(); ++j)
317 for (
size_t i = 0; i <
pids_.size(); ++i) {
326 hold[0].duration = 0.0;
327 hold[0].splines.resize(
joints_.size());
328 for (
size_t j = 0; j <
joints_.size(); ++j)
329 hold[0].splines[j].coef[0] =
joints_[j]->position_;
346 ROS_FATAL(
"The current trajectory can never be null");
355 while (seg + 1 < (
int)traj.size() &&
356 traj[seg+1].start_time < time.
toSec())
363 if (traj.size() == 0)
364 ROS_ERROR(
"No segments in the trajectory");
366 ROS_ERROR(
"No earlier segments. First segment starts at %.3lf (now = %.3lf)", traj[0].start_time, time.
toSec());
372 for (
size_t i = 0; i <
q.size(); ++i)
375 time.
toSec() - traj[seg].start_time,
382 std::vector<double> v_error(
joints_.size());
383 for (
size_t i = 0; i <
joints_.size(); ++i)
391 v_error[i] =
qd[i] -
joints_[i]->velocity_;
400 effort =
pids_[i].computeCommand(
error[i], v_error[i], dt);
402 double effort_unfiltered = effort;
408 joints_[i]->commanded_effort_ = effort;
413 if ((traj[seg].gh && traj[seg].gh == current_active_goal) ||
414 (traj[seg].gh_follow && traj[seg].gh_follow == current_active_goal_follow))
416 ros::Time end_time(traj[seg].start_time + traj[seg].duration);
417 if (time <= end_time)
420 for (
size_t j = 0; j <
joints_.size(); ++j)
422 if (traj[seg].trajectory_tolerance[j].violated(
error[j], v_error[j]))
425 traj[seg].gh->setAborted();
426 else if (traj[seg].gh_follow) {
427 traj[seg].gh_follow->preallocated_result_->error_code =
428 control_msgs::FollowJointTrajectoryResult::PATH_TOLERANCE_VIOLATED;
429 traj[seg].gh_follow->setAborted(traj[seg].gh_follow->preallocated_result_);
435 else if (seg == (
int)traj.size() - 1)
438 bool inside_goal_constraints =
true;
439 for (
size_t i = 0; i <
joints_.size() && inside_goal_constraints; ++i)
441 if (traj[seg].goal_tolerance[i].violated(
error[i], v_error[i]))
442 inside_goal_constraints =
false;
445 if (inside_goal_constraints)
450 traj[seg].gh->setSucceeded();
451 else if (traj[seg].gh_follow) {
452 traj[seg].gh_follow->preallocated_result_->error_code = control_msgs::FollowJointTrajectoryResult::SUCCESSFUL;
453 traj[seg].gh_follow->setSucceeded(traj[seg].gh_follow->preallocated_result_);
457 else if (time < end_time +
ros::Duration(traj[seg].goal_time_tolerance))
467 traj[seg].gh->setAborted();
468 else if (traj[seg].gh_follow) {
469 traj[seg].gh_follow->preallocated_result_->error_code = control_msgs::FollowJointTrajectoryResult::GOAL_TOLERANCE_VIOLATED;
470 traj[seg].gh_follow->setAborted(traj[seg].gh_follow->preallocated_result_);
483 for (
size_t j = 0; j <
joints_.size(); ++j)
495 if (current_active_goal_follow)
497 current_active_goal_follow->preallocated_feedback_->header.stamp = time;
498 current_active_goal_follow->preallocated_feedback_->joint_names.resize(
joints_.size());
499 current_active_goal_follow->preallocated_feedback_->desired.positions.resize(
joints_.size());
500 current_active_goal_follow->preallocated_feedback_->desired.velocities.resize(
joints_.size());
501 current_active_goal_follow->preallocated_feedback_->desired.accelerations.resize(
joints_.size());
502 current_active_goal_follow->preallocated_feedback_->actual.positions.resize(
joints_.size());
503 current_active_goal_follow->preallocated_feedback_->actual.velocities.resize(
joints_.size());
504 current_active_goal_follow->preallocated_feedback_->error.positions.resize(
joints_.size());
505 current_active_goal_follow->preallocated_feedback_->error.velocities.resize(
joints_.size());
506 for (
size_t j = 0; j <
joints_.size(); ++j)
508 current_active_goal_follow->preallocated_feedback_->joint_names[j] =
joints_[j]->joint_->name;
509 current_active_goal_follow->preallocated_feedback_->desired.positions[j] =
q[j];
510 current_active_goal_follow->preallocated_feedback_->desired.velocities[j] =
qd[j];
511 current_active_goal_follow->preallocated_feedback_->desired.accelerations[j] =
qdd[j];
512 current_active_goal_follow->preallocated_feedback_->actual.positions[j] =
joints_[j]->position_;
513 current_active_goal_follow->preallocated_feedback_->actual.velocities[j] =
joints_[j]->velocity_;
514 current_active_goal_follow->preallocated_feedback_->error.positions[j] =
error[j];
515 current_active_goal_follow->preallocated_feedback_->error.velocities[j] =
joints_[j]->velocity_ -
qd[j];
517 const actionlib_msgs::GoalID goalID = current_active_goal_follow->gh_.getGoalID();
519 current_active_goal_follow->preallocated_feedback_->desired.time_from_start = time_from_start;
520 current_active_goal_follow->preallocated_feedback_->actual.time_from_start = time_from_start;
521 current_active_goal_follow->preallocated_feedback_->error.time_from_start = time_from_start;
522 current_active_goal_follow->gh_.publishFeedback(*current_active_goal_follow->preallocated_feedback_);
540 assert(!gh || !gh_follow);
542 ROS_DEBUG(
"Figuring out new trajectory at %.3lf, with data from %.3lf",
543 time.
toSec(), msg->header.stamp.toSec());
550 if (msg->points.empty())
564 for (
size_t j = 0; j <
joints_.size(); ++j)
567 for (
size_t k = 0; k < gh_follow->gh_.getGoal()->path_tolerance.size(); ++k)
569 const control_msgs::JointTolerance &tol = gh_follow->gh_.getGoal()->path_tolerance[k];
570 if (
joints_[j]->joint_->name == tol.name)
577 if (tol.position > 0)
578 trajectory_tolerance[j].position = tol.position;
579 else if (tol.position < 0)
580 trajectory_tolerance[j].position = 0.0;
582 if (tol.velocity > 0)
583 trajectory_tolerance[j].velocity = tol.velocity;
584 else if (tol.velocity < 0)
585 trajectory_tolerance[j].velocity = 0.0;
587 if (tol.acceleration > 0)
588 trajectory_tolerance[j].acceleration = tol.acceleration;
589 else if (tol.acceleration < 0)
590 trajectory_tolerance[j].acceleration = 0.0;
597 for (
size_t k = 0; k < gh_follow->gh_.getGoal()->goal_tolerance.size(); ++k)
599 const control_msgs::JointTolerance &tol = gh_follow->gh_.getGoal()->goal_tolerance[k];
600 if (
joints_[j]->joint_->name == tol.name)
607 if (tol.position > 0)
608 goal_tolerance[j].position = tol.position;
609 else if (tol.position < 0)
610 goal_tolerance[j].position = 0.0;
612 if (tol.velocity > 0)
613 goal_tolerance[j].velocity = tol.velocity;
614 else if (tol.velocity < 0)
615 goal_tolerance[j].velocity = 0.0;
617 if (tol.acceleration > 0)
618 goal_tolerance[j].acceleration = tol.acceleration;
619 else if (tol.acceleration < 0)
620 goal_tolerance[j].acceleration = 0.0;
627 const ros::Duration &tol = gh_follow->gh_.getGoal()->goal_time_tolerance;
628 if (tol < ros::Duration(0.0))
629 goal_time_tolerance = 0.0;
630 else if (tol > ros::Duration(0.0))
631 goal_time_tolerance = tol.
toSec();
636 std::vector<int> lookup(
joints_.size(), -1);
637 for (
size_t j = 0; j <
joints_.size(); ++j)
639 for (
size_t k = 0; k < msg->joint_names.size(); ++k)
641 if (msg->joint_names[k] ==
joints_[j]->joint_->name)
650 ROS_ERROR(
"Unable to locate joint %s in the commanded trajectory.",
joints_[j]->joint_->name.c_str());
653 else if (gh_follow) {
654 gh_follow->preallocated_result_->error_code = control_msgs::FollowJointTrajectoryResult::INVALID_JOINTS;
655 gh_follow->setAborted(gh_follow->preallocated_result_);
667 ROS_FATAL(
"The current trajectory can never be null");
675 int first_useful = -1;
676 while (first_useful + 1 < (
int)prev_traj.size() &&
677 prev_traj[first_useful + 1].start_time <= time.
toSec())
683 int last_useful = -1;
684 double msg_start_time;
686 msg_start_time = time.
toSec();
688 msg_start_time = msg->header.stamp.toSec();
694 while (last_useful + 1 < (
int)prev_traj.size() &&
695 prev_traj[last_useful + 1].start_time < msg_start_time)
700 if (last_useful < first_useful)
701 first_useful = last_useful;
704 for (
int i = std::max(first_useful,0); i <= last_useful; ++i)
706 new_traj.push_back(prev_traj[i]);
711 if (new_traj.size() == 0)
712 new_traj.push_back(prev_traj[prev_traj.size() - 1]);
717 Segment &last = new_traj[new_traj.size() - 1];
718 std::vector<double> prev_positions(
joints_.size());
719 std::vector<double> prev_velocities(
joints_.size());
720 std::vector<double> prev_accelerations(
joints_.size());
722 double t = (msg->header.stamp ==
ros::Time(0.0) ? time.
toSec() : msg->header.stamp.toSec())
724 ROS_DEBUG(
"Initial conditions at %.3f for new set of splines:", t);
725 for (
size_t i = 0; i <
joints_.size(); ++i)
729 prev_positions[i], prev_velocities[i], prev_accelerations[i]);
730 ROS_DEBUG(
" %.2lf, %.2lf, %.2lf (%s)", prev_positions[i], prev_velocities[i],
731 prev_accelerations[i],
joints_[i]->joint_->name.c_str());
736 std::vector<double> positions;
737 std::vector<double> velocities;
738 std::vector<double> accelerations;
740 std::vector<double> durations(msg->points.size());
741 if (msg->points.size() > 0)
742 durations[0] = msg->points[0].time_from_start.toSec();
743 for (
size_t i = 1; i < msg->points.size(); ++i)
744 durations[i] = (msg->points[i].time_from_start - msg->points[i-1].time_from_start).toSec();
747 std::vector<double> wrap(
joints_.size(), 0.0);
748 assert(!msg->points[0].positions.empty());
749 for (
size_t j = 0; j <
joints_.size(); ++j)
751 if (
joints_[j]->joint_->type == urdf::Joint::CONTINUOUS)
754 wrap[j] = (prev_positions[j] + dist) - msg->points[0].positions[lookup[j]];
758 for (
size_t i = 0; i < msg->points.size(); ++i)
763 seg.
start_time = (time + msg->points[i].time_from_start).toSec() - durations[i];
765 seg.
start_time = (msg->header.stamp + msg->points[i].time_from_start).toSec() - durations[i];
773 if (msg->points[i].accelerations.size() != 0 && msg->points[i].accelerations.size() !=
joints_.size())
775 ROS_ERROR(
"Command point %d has %d elements for the accelerations", (
int)i, (
int)msg->points[i].accelerations.size());
778 if (msg->points[i].velocities.size() != 0 && msg->points[i].velocities.size() !=
joints_.size())
780 ROS_ERROR(
"Command point %d has %d elements for the velocities", (
int)i, (
int)msg->points[i].velocities.size());
783 if (msg->points[i].positions.size() !=
joints_.size())
785 ROS_ERROR(
"Command point %d has %d elements for the positions", (
int)i, (
int)msg->points[i].positions.size());
791 accelerations.resize(msg->points[i].accelerations.size());
792 velocities.resize(msg->points[i].velocities.size());
793 positions.resize(msg->points[i].positions.size());
794 for (
size_t j = 0; j <
joints_.size(); ++j)
796 if (!accelerations.empty()) accelerations[j] = msg->points[i].accelerations[lookup[j]];
797 if (!velocities.empty()) velocities[j] = msg->points[i].velocities[lookup[j]];
798 if (!positions.empty()) positions[j] = msg->points[i].positions[lookup[j]] + wrap[j];
803 for (
size_t j = 0; j <
joints_.size(); ++j)
805 if (prev_accelerations.size() > 0 && accelerations.size() > 0)
808 prev_positions[j], prev_velocities[j], prev_accelerations[j],
809 positions[j], velocities[j], accelerations[j],
813 else if (prev_velocities.size() > 0 && velocities.size() > 0)
816 prev_positions[j], prev_velocities[j],
817 positions[j], velocities[j],
820 seg.
splines[j].coef.resize(6, 0.0);
824 seg.
splines[j].coef[0] = prev_positions[j];
825 if (durations[i] == 0.0)
828 seg.
splines[j].coef[1] = (positions[j] - prev_positions[j]) / durations[i];
843 new_traj.push_back(seg);
847 prev_positions = positions;
848 prev_velocities = velocities;
849 prev_accelerations = accelerations;
858 ROS_ERROR(
"The new trajectory was null!");
863 ROS_DEBUG(
"The new trajectory has %d segments", (
int)new_traj.size());
865 for (
size_t i = 0; i < std::min((
size_t)20,new_traj.size()); ++i)
867 ROS_DEBUG(
"Segment %2d: %.3lf for %.3lf", i, new_traj[i].start_time, new_traj[i].duration);
868 for (
size_t j = 0; j < new_traj[i].splines.size(); ++j)
870 ROS_DEBUG(
" %.2lf %.2lf %.2lf %.2lf , %.2lf %.2lf(%s)",
871 new_traj[i].splines[j].coef[0],
872 new_traj[i].splines[j].coef[1],
873 new_traj[i].splines[j].coef[2],
874 new_traj[i].splines[j].coef[3],
875 new_traj[i].splines[j].coef[4],
876 new_traj[i].splines[j].coef[5],
877 joints_[j]->joint_->name_.c_str());
884 pr2_controllers_msgs::QueryTrajectoryState::Request &req,
885 pr2_controllers_msgs::QueryTrajectoryState::Response &resp)
891 ROS_FATAL(
"The current trajectory can never be null");
898 while (seg + 1 < (
int)traj.size() &&
899 traj[seg+1].start_time < req.time.toSec())
906 for (
size_t i = 0; i <
q.size(); ++i)
911 resp.name.resize(
joints_.size());
912 resp.position.resize(
joints_.size());
913 resp.velocity.resize(
joints_.size());
914 resp.acceleration.resize(
joints_.size());
915 for (
size_t j = 0; j <
joints_.size(); ++j)
917 resp.name[j] =
joints_[j]->joint_->name;
919 req.time.toSec() - traj[seg].start_time,
920 resp.position[j], resp.velocity[j], resp.acceleration[j]);
927 const std::vector<double>& coefficients,
double duration,
double time,
928 double& position,
double& velocity,
double& acceleration)
937 else if (time > duration)
947 position, velocity, acceleration);
951 static bool setsEqual(
const std::vector<std::string> &a,
const std::vector<std::string> &b)
953 if (a.size() != b.size())
956 for (
size_t i = 0; i < a.size(); ++i)
958 if (count(b.begin(), b.end(), a[i]) != 1)
961 for (
size_t i = 0; i < b.size(); ++i)
963 if (count(a.begin(), a.end(), b[i]) != 1)
976 if (current_active_goal)
980 current_active_goal->gh_.setCanceled();
982 if (current_active_goal_follow)
985 current_active_goal_follow->gh_.setCanceled();
990 template <
class Enclosure,
class Member>
1000 std::vector<std::string> joint_names(
joints_.size());
1001 for (
size_t j = 0; j <
joints_.size(); ++j)
1002 joint_names[j] =
joints_[j]->joint_->name;
1007 ROS_ERROR(
"Joints on incoming goal don't match our joints");
1026 std::vector<std::string> joint_names(
joints_.size());
1027 for (
size_t j = 0; j <
joints_.size(); ++j)
1028 joint_names[j] =
joints_[j]->joint_->name;
1033 ROS_ERROR(
"Joints on incoming goal don't match our joints");
1034 control_msgs::FollowJointTrajectoryResult result;
1035 result.error_code = control_msgs::FollowJointTrajectoryResult::INVALID_JOINTS;
1057 if (current_active_goal && current_active_goal->gh_ == gh)
1061 trajectory_msgs::JointTrajectory::Ptr empty(
new trajectory_msgs::JointTrajectory);
1062 empty->joint_names.resize(
joints_.size());
1063 for (
size_t j = 0; j <
joints_.size(); ++j)
1064 empty->joint_names[j] =
joints_[j]->joint_->name;
1068 current_active_goal->gh_.setCanceled();
1075 if (current_active_goal && current_active_goal->gh_ == gh)
1079 trajectory_msgs::JointTrajectory::Ptr empty(
new trajectory_msgs::JointTrajectory);
1080 empty->joint_names.resize(
joints_.size());
1081 for (
size_t j = 0; j <
joints_.size(); ++j)
1082 empty->joint_names[j] =
joints_[j]->joint_->name;
1086 current_active_goal->gh_.setCanceled();
PLUGINLIB_EXPORT_CLASS(my_controller_ns::MyControllerClass, pr2_controller_interface::Controller)
std::vector< Spline > splines
RTServerGoalHandle< pr2_controllers_msgs::JointTrajectoryAction > RTGoalHandle
realtime_tools::RealtimeBox< boost::shared_ptr< const SpecifiedTrajectory > > current_trajectory_box_
static void sampleSplineWithTimeBounds(const std::vector< double > &coefficients, double duration, double time, double &position, double &velocity, double &acceleration)
static bool setsEqual(const std::vector< std::string > &a, const std::vector< std::string > &b)
std::vector< bool > proxies_enabled_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void commandCB(const trajectory_msgs::JointTrajectory::ConstPtr &msg)
std::string resolveName(const std::string &name, bool remap=true) const
std::vector< JointTolerance > default_goal_tolerance_
bool init(pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
static void sampleQuinticSpline(const std::vector< double > &coefficients, double time, double &position, double &velocity, double &acceleration)
Samples a quintic spline segment at a particular time.
void goalCBFollow(GoalHandleFollow gh)
void setRejected(const Result &result=Result(), const std::string &text=std::string(""))
static boost::shared_ptr< Member > share_member(boost::shared_ptr< Enclosure > enclosure, Member &member)
boost::shared_ptr< const Goal > getGoal() const
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
std::vector< JointTolerance > default_trajectory_tolerance_
static void getQuinticSplineCoefficients(double start_pos, double start_vel, double start_acc, double end_pos, double end_vel, double end_acc, double time, std::vector< double > &coefficients)
Type const & getType() const
~JointTrajectoryActionController()
std::vector< control_toolbox::Pid > pids_
std::vector< JointTolerance > goal_tolerance
void setAccepted(const std::string &text=std::string(""))
boost::scoped_ptr< realtime_tools::RealtimePublisher< pr2_controllers_msgs::JointTrajectoryControllerState > > controller_state_publisher_
boost::scoped_ptr< FJTAS > action_server_follow_
std::vector< double > masses_
void cancelCB(GoalHandle gh)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
static void getCubicSplineCoefficients(double start_pos, double start_vel, double end_pos, double end_vel, double time, std::vector< double > &coefficients)
void cancelCBFollow(GoalHandleFollow gh)
void goalCB(GoalHandle gh)
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
static void generatePowers(int n, double x, double *powers)
const std::string & getNamespace() const
pr2_mechanism_model::RobotState * robot_
JointState * getJointState(const std::string &name)
boost::shared_ptr< RTGoalHandleFollow > rt_active_goal_follow_
actionlib::ActionServer< control_msgs::FollowJointTrajectoryAction > FJTAS
boost::shared_ptr< RTGoalHandle > gh
std::vector< Segment > SpecifiedTrajectory
boost::shared_ptr< RTGoalHandle > rt_active_goal_
actionlib::ActionServer< pr2_controllers_msgs::JointTrajectoryAction > JTAS
bool getParam(const std::string &key, std::string &s) const
boost::shared_ptr< RTGoalHandleFollow > gh_follow
RTServerGoalHandle< control_msgs::FollowJointTrajectoryAction > RTGoalHandleFollow
void commandTrajectory(const trajectory_msgs::JointTrajectory::ConstPtr &traj, boost::shared_ptr< RTGoalHandle > gh=boost::shared_ptr< RTGoalHandle >((RTGoalHandle *) NULL), boost::shared_ptr< RTGoalHandleFollow > gh_follow=boost::shared_ptr< RTGoalHandleFollow >((RTGoalHandleFollow *) NULL))
std::vector< double > qdd
std::vector< control_toolbox::LimitedProxy > proxies_
ros::Timer goal_handle_timer_
ros::ServiceServer serve_query_state_
std::vector< JointTolerance > trajectory_tolerance
std::vector< boost::shared_ptr< filters::FilterChain< double > > > output_filters_
double default_goal_time_constraint_
bool hasParam(const std::string &key) const
boost::scoped_ptr< JTAS > action_server_
bool queryStateService(pr2_controllers_msgs::QueryTrajectoryState::Request &req, pr2_controllers_msgs::QueryTrajectoryState::Response &resp)
double goal_time_tolerance
if((endptr==val_str)||(endptr< (val_str+strlen(val_str))))
ros::Subscriber sub_command_
def shortest_angular_distance(from_angle, to_angle)
std::vector< pr2_mechanism_model::JointState * > joints_
void runNonRT(const ros::TimerEvent &te)