37 static const std::string LOGNAME =
"collision_detection";
40 static const rclcpp::Logger
LOGGER = rclcpp::get_logger(
"collision_plugin_loader");
43 const planning_scene::PlanningScenePtr&
scene)
47 RCLCPP_WARN(LOGGER,
"Cannot setup scene, PlanningScenePtr is null.");
51 std::string param_name;
52 std::string collision_detector_name;
54 if (node->has_parameter(
"collision_detector"))
56 node->get_parameter(
"collision_detector", collision_detector_name);
58 else if (node->has_parameter((
"/move_group/collision_detector")))
62 node->get_parameter(
"/move_group/collision_detector", collision_detector_name);
69 if (collision_detector_name.empty())
76 RCLCPP_INFO(LOGGER,
"Using collision detector: %s",
scene->getCollisionDetectorName().c_str());
bool activate(const std::string &name, const planning_scene::PlanningScenePtr &scene)
Activate a specific collision plugin for the given planning scene instance.
void setupScene(const rclcpp::Node::SharedPtr &node, const planning_scene::PlanningScenePtr &scene)
Fetch plugin name from parameter server and activate the plugin for the given scene.
const rclcpp::Logger LOGGER