42#include <pluginlib/class_list_macros.hpp>
62 bool initialize(
const moveit::core::RobotModelConstPtr& model,
const rclcpp::Node::SharedPtr& node,
63 const std::string& )
override
65 for (
const std::string& group : model->getJointModelGroupNames())
67 planning_contexts_[group] = std::make_shared<CHOMPPlanningContext>(
"chomp_planning_context", group, model, node);
72 planning_interface::PlanningContextPtr
75 moveit_msgs::msg::MoveItErrorCodes& error_code)
const override
77 error_code.val = moveit_msgs::msg::MoveItErrorCodes::SUCCESS;
79 if (req.group_name.empty())
81 RCLCPP_ERROR(getLogger(),
"No group specified to plan for");
82 error_code.val = moveit_msgs::msg::MoveItErrorCodes::INVALID_GROUP_NAME;
83 return planning_interface::PlanningContextPtr();
88 RCLCPP_ERROR(getLogger(),
"No planning scene supplied as input");
89 error_code.val = moveit_msgs::msg::MoveItErrorCodes::FAILURE;
90 return planning_interface::PlanningContextPtr();
99 context->setPlanningScene(ps);
100 context->setMotionPlanRequest(req);
101 error_code.val = moveit_msgs::msg::MoveItErrorCodes::SUCCESS;
PLUGINLIB_EXPORT_CLASS(cached_ik_kinematics_plugin::CachedIKKinematicsPlugin< kdl_kinematics_plugin::KDLKinematicsPlugin >, kinematics::KinematicsBase)
std::string getDescription() const override
Get a short string that identifies the planning interface.
bool canServiceRequest(const planning_interface::MotionPlanRequest &) const override
Determine whether this plugin instance is able to represent this planning request.
void getPlanningAlgorithms(std::vector< std::string > &algs) const override
Get the names of the known planning algorithms (values that can be filled as planner_id in the planni...
std::map< std::string, CHOMPPlanningContextPtr > planning_contexts_
bool initialize(const moveit::core::RobotModelConstPtr &model, const rclcpp::Node::SharedPtr &node, const std::string &) override
planning_interface::PlanningContextPtr getPlanningContext(const planning_scene::PlanningSceneConstPtr &planning_scene, const planning_interface::MotionPlanRequest &req, moveit_msgs::msg::MoveItErrorCodes &error_code) const override
Construct a planning context given the current scene and a planning request. If a problem is encounte...
static CollisionDetectorAllocatorPtr create()
Base class for a MoveIt planner.
rclcpp::Logger getLogger()
rclcpp::Logger getLogger(const std::string &name)
Creates a namespaced logger.
This namespace includes the base class for MoveIt planners.
moveit_msgs::msg::MotionPlanRequest MotionPlanRequest
This namespace includes the central class for representing planning contexts.