ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

MoveIt create PlanningSceneInterface

asked 2021-06-23 09:44:38 -0600

sdbonhof gravatar image

updated 2021-06-25 04:37:53 -0600

gvdhoorn gravatar image

I am trying to retrieve a collision object that is present in the moveit planning scene to then attach it to a robot link. To do this, I thought of getting the object by its ID using the getObjects method of the PlanningSceneInterface class. However, when I try to create an object of the PlanningSceneInterface class I get the following error:

error: ‘moveit::planning_interface’ has not been declared
 moveit::planning_interface::PlanningSceneInterface scene_interface;

I am including the class with the following line:

#include <moveit/planning_interface/planning_interface.h>

I am running ROS Melodic on Ubuntu 18.04, with gcc 7.5.0.

Thanks in advance!

edit retag flag offensive close merge delete



@sdbonhof: please do not edit titles to add things like solved or answered to them. Just marking the question as answered by clicking the checkmark is enough. It will clearly show the question as answered.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-25 04:38:32 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-06-24 10:11:31 -0600

pvl gravatar image

The header is actually: moveit/planning_scene_interface/planning_scene_interface.h. It is part of the planning_scene_interface package, which is in the planning_interface folder of moveit_ros. That is probably where the namespace comes from.

See the header at the Github repository.

edit flag offensive delete link more


This worked, thanks!

sdbonhof gravatar image sdbonhof  ( 2021-06-25 02:44:33 -0600 )edit

Question Tools

1 follower


Asked: 2021-06-23 09:44:38 -0600

Seen: 141 times

Last updated: Jun 25 '21