43#include <class_loader/class_loader.hpp>
44#include <moveit_msgs/msg/move_it_error_codes.hpp>
63 return std::string(
"AddRuckigTrajectorySmoothing");
66 void adapt(
const planning_scene::PlanningSceneConstPtr& ,
75 "Cannot apply response adapter '%s' because MotionPlanResponse does not contain a trajectory to smooth.",
77 res.
error_code = moveit::core::MoveItErrorCode::INVALID_MOTION_PLAN;
83 res.
error_code = moveit::core::MoveItErrorCode::SUCCESS;
87 RCLCPP_ERROR(logger_,
"Response adapter '%s' failed to smooth trajectory.",
getDescription().c_str());
88 res.
error_code = moveit::core::MoveItErrorCode::FAILURE;
66 void adapt(
const planning_scene::PlanningSceneConstPtr& , {
…}
94 rclcpp::Logger logger_;
Use ruckig (https://github.com/pantor/ruckig) to adapt the trajectory to be jerk-constrained and time...
std::string getDescription() const override
Get a description of this adapter.
AddRuckigTrajectorySmoothing()
void adapt(const planning_scene::PlanningSceneConstPtr &, const planning_interface::MotionPlanRequest &req, planning_interface::MotionPlanResponse &res) const override
Adapt the planning response.
~AddRuckigTrajectorySmoothing() override=default
Concept in MoveIt which can be used to modify the planning solution (post-processing) in a planning p...
static bool applySmoothing(robot_trajectory::RobotTrajectory &trajectory, const double max_velocity_scaling_factor=1.0, const double max_acceleration_scaling_factor=1.0, const bool mitigate_overshoot=false, const double overshoot_threshold=0.01)
Apply smoothing to a time-parameterized trajectory so that jerk limits are not violated.
Main namespace for MoveIt.
moveit_msgs::msg::MotionPlanRequest MotionPlanRequest
CLASS_LOADER_REGISTER_CLASS(default_planning_request_adapters::ResolveConstraintFrames, planning_interface::PlanningRequestAdapter)
Response to a planning query.
moveit::core::MoveItErrorCode error_code
robot_trajectory::RobotTrajectoryPtr trajectory