26 #ifndef STOMP_MOVEIT_STOMP_PLANNER_H_ 27 #define STOMP_MOVEIT_STOMP_PLANNER_H_ 33 #include <boost/thread.hpp> 39 using StompOptimizationTaskPtr = std::shared_ptr<StompOptimizationTask>;
83 virtual void clear()
override;
107 static moveit_msgs::TrajectoryConstraints
encodeSeedTrajectory(
const trajectory_msgs::JointTrajectory& seed);
157 bool extractSeedTrajectory(
const moveit_msgs::MotionPlanRequest& req, trajectory_msgs::JointTrajectory& seed)
const;
162 std::shared_ptr< stomp_core::Stomp> stomp_;
163 StompOptimizationTaskPtr task_;
168 moveit::core::RobotModelConstPtr robot_model_;
169 utils::kinematics::IKSolverPtr ik_solver_;
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
virtual bool solve(planning_interface::MotionPlanResponse &res) override
Solve the motion planning problem as defined in the motion request passed before hand.
void setup()
planner setup
virtual void clear() override
Clears results from previous plan.
static moveit_msgs::TrajectoryConstraints encodeSeedTrajectory(const trajectory_msgs::JointTrajectory &seed)
From a trajectory_msgs::JointTrajectory create a set of trajectory constraints that stomp can use lat...
virtual bool terminate() override
Thread-safe method that request early termination, if a solve() function is currently computing plans...
StompPlanner(const std::string &group, const XmlRpc::XmlRpcValue &config, const moveit::core::RobotModelConstPtr &model)
StompPlanner constructor.
bool getSeedParameters(Eigen::MatrixXd ¶meters) const
This function 1) gets the seed trajectory from the active motion plan request, 2) checks to see if th...
bool canServiceRequest(const moveit_msgs::MotionPlanRequest &req) const
Checks some conditions to determine whether it is able to plan given for this planning request...
This defines kinematic related utilities.
bool jointTrajectorytoParameters(const trajectory_msgs::JointTrajectory &traj, Eigen::MatrixXd ¶meters) const
Converts from a joint trajectory to an Eigen Matrix.
bool extractSeedTrajectory(const moveit_msgs::MotionPlanRequest &req, trajectory_msgs::JointTrajectory &seed) const
Populates a seed joint trajectory from the 'trajectory_constraints' moveit_msgs::Constraints[] array...
static bool getConfigData(ros::NodeHandle &nh, std::map< std::string, XmlRpc::XmlRpcValue > &config, std::string param=std::string("stomp"))
Convenience method to load extract the parameters for each supported planning group.
This defines stomp's optimization task.
bool parametersToJointTrajectory(const Eigen::MatrixXd ¶meters, trajectory_msgs::JointTrajectory &traj)
Converts from an Eigen Matrix to to a joint trajectory.
bool getStartAndGoal(Eigen::VectorXd &start, Eigen::VectorXd &goal)
Gets the start and goal joint values from the motion plan request passed.
The PlanningContext specialization that wraps the STOMP algorithm.