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

Revision history [back]

click to hide/show revision 1
initial version

Start from the first error:

/home/mvish7/ws_panda_gazebo_moveit/src/robot_moveit_config/src/moveit_interface.cpp: In function ‘void addCollisionObjects(moveit::planning_interface::PlanningSceneInterface&)’:
/home/mvish7/ws_panda_gazebo_moveit/src/robot_moveit_config/src/moveit_interface.cpp:35:18: error: ‘class std::vector<moveit_msgs::CollisionObject_<std::allocator<void> > >’ has no member named ‘meshes’
 collision_object.meshes.resize(1);
                  ^

Read the error message carefully: class std::vector<moveit_msgs::CollisionObject_<std::allocator<void> > >’ has no member named ‘meshes’.

Does it make sense? Why is the compiler complaining?

You're using a container, std::vector, that contains multiple moveit_msgs::CollisionObject type objects. This last type does have a member named meshes, but std::vector doesn't.

The solution: access one of the members, changing collision_object.meshes.resize(1); into collision_object[0].meshes.resize(1); or collision_object.at(0).meshes.resize(1); for example.

This is a C++ problem, not a ROS problem though.