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

The first 6 lines of your code should be:

moveit_msgs::CollisionObject co;
shapes::Mesh* m = shapes::createMeshFromResource("file://...");
shape_msgs::Mesh co_mesh;
shapes::ShapeMsg co_mesh_msg;
shapes::constructMsgFromShape(m,co_mesh_msg);
co_mesh = boost::get<shape_msgs::Mesh>(co_mesh_msg);

I had the same problem when I followed the buggy response in this topic: http://answers.ros.org/question/147886/creating-a-collisionobject-from-a-mesh-in-hydro/