43constexpr double WAYPOINT_RADIAN_TOLERANCE = 0.2;
47 const moveit::core::RobotModelConstPtr& robot_model,
const std::string& group_name)
50 next_waypoint_index_ = 0;
51 joint_group_ = robot_model->getJointModelGroup(group_name);
55moveit_msgs::action::LocalPlanner::Feedback
74 next_waypoint_index_ = 0;
78moveit_msgs::action::LocalPlanner::Feedback
84 feedback_.feedback =
"unhandled_exception";
89 local_trajectory.
clear();
95 if (next_desired_goal_state.
distance(current_state, joint_group_) <= WAYPOINT_RADIAN_TOLERANCE)
98 next_waypoint_index_ = std::min(next_waypoint_index_ + 1,
reference_trajectory_->getWayPointCount() - 1);
120#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(cached_ik_kinematics_plugin::CachedIKKinematicsPlugin< kdl_kinematics_plugin::KDLKinematicsPlugin >, kinematics::KinematicsBase)
Representation of a robot's state. This includes position, velocity, acceleration and effort.
double distance(const RobotState &other) const
Return the sum of joint distances to "other" state. An L1 norm. Only considers active joints.
bool initialize(const rclcpp::Node::SharedPtr &node, const moveit::core::RobotModelConstPtr &robot_model, const std::string &group_name) override
moveit_msgs::action::LocalPlanner::Feedback addTrajectorySegment(const robot_trajectory::RobotTrajectory &new_trajectory) override
moveit_msgs::action::LocalPlanner::Feedback getLocalTrajectory(const moveit::core::RobotState ¤t_state, robot_trajectory::RobotTrajectory &local_trajectory) override
double getTrajectoryProgress(const moveit::core::RobotState ¤t_state) override
robot_trajectory::RobotTrajectoryPtr reference_trajectory_
Maintain a sequence of waypoints and the time durations between these waypoints.
RobotTrajectory & addSuffixWayPoint(const moveit::core::RobotState &state, double dt)
Add a point to the trajectory.
RobotTrajectory & clear()
bool computeTimeStamps(robot_trajectory::RobotTrajectory &trajectory, const double max_velocity_scaling_factor=1.0, const double max_acceleration_scaling_factor=1.0) const override
Compute a trajectory with waypoints spaced equally in time (according to resample_dt_)....