43 const rclcpp::Logger
LOGGER = rclcpp::get_logger(
"local_planner_component");
44 constexpr
double WAYPOINT_RADIAN_TOLERANCE = 0.2;
48 const moveit::core::RobotModelConstPtr& robot_model,
const std::string& group_name)
51 next_waypoint_index_ = 0;
52 joint_group_ = robot_model->getJointModelGroup(group_name);
56 moveit_msgs::action::LocalPlanner::Feedback
75 next_waypoint_index_ = 0;
79 moveit_msgs::action::LocalPlanner::Feedback
85 feedback_.feedback =
"unhandled_exception";
90 local_trajectory.
clear();
96 if (next_desired_goal_state.
distance(current_state, joint_group_) <= WAYPOINT_RADIAN_TOLERANCE)
99 next_waypoint_index_ = std::min(next_waypoint_index_ + 1,
reference_trajectory_->getWayPointCount() - 1);
121 #include <pluginlib/class_list_macros.hpp>
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([[maybe_unused]] const rclcpp::Node::SharedPtr &node, const moveit::core::RobotModelConstPtr &robot_model, const std::string &group_name) override
double getTrajectoryProgress([[maybe_unused]] const moveit::core::RobotState ¤t_state) 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
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
const rclcpp::Logger LOGGER
PLUGINLIB_EXPORT_CLASS(moveit::hybrid_planning::SimpleSampler, moveit::hybrid_planning::TrajectoryOperatorInterface)