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

Hi just add #include "geometric_shapes/mesh_operations.h" in your code and try with these lines of code :

shapes::Mesh* c_mesh = shapes::createMeshFromResource("package://robot_config/wall.stl", b); shapes::ShapeMsg mesh_msg;
shapes::constructMsgFromShape(c_mesh, mesh_msg);
shape_msgs::Mesh custom_mesh = boost::get<shape_msgs::mesh>(mesh_msg);

click to hide/show revision 2
No.2 Revision

Hi just add

#include "geometric_shapes/mesh_operations.h" "geometric_shapes/mesh_operations.h"

in your code and try with these lines of code :

shapes::Mesh*  c_mesh =
  = shapes::createMeshFromResource("package://robot_config/wall.stl", b);
  b); shapes::ShapeMsg mesh_msg; 
shapes::constructMsgFromShape(c_mesh, shapes::constructMsgFromShape(c_mesh, mesh_msg);
shape_msgs::Mesh custom_mesh = boost::get<shape_msgs::mesh>(mesh_msg);

boost::get<shape_msgs::mesh>(mesh_msg);