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

I see a couple things wrong with the code here.

Redundant includes (minor issue)

#include <geometric_shapes/shape_operations.h>
#include "geometric_shapes/mesh_operations.h"
#include "geometric_shapes/shape_operations.h"

Pushing the mesh into element 1 rather than element 0:

co.meshes.resize(1);  // There is now 1 element
...
co.meshes.push_back(mesh_custom); // There are now 2 elements
co.mesh_poses[0].position.x = 2.0; // This is for the wrong element

I see a couple things wrong with the code here.

Redundant includes (minor issue)

#include <geometric_shapes/shape_operations.h>
#include "geometric_shapes/mesh_operations.h"
...
#include "geometric_shapes/shape_operations.h"

Pushing the mesh into element 1 rather than element 0:

co.meshes.resize(1);  // There is now 1 element
...
co.meshes.push_back(mesh_custom); // There are now 2 elements
co.mesh_poses[0].position.x = 2.0; // This is for the wrong element

I see a couple things wrong with the code here.

Redundant includes (minor issue)

#include <geometric_shapes/shape_operations.h>
...
#include "geometric_shapes/shape_operations.h"

Pushing the mesh into element 1 rather than element 0:

co.meshes.resize(1);  // There is now 1 element
...
co.meshes.push_back(mesh_custom); // There are now 2 elements
co.mesh_poses[0].position.x = 2.0; // This is for corresponds to the wrong element

I see a couple things wrong with the code here.

Redundant includes (minor issue)

#include <geometric_shapes/shape_operations.h>
...
#include "geometric_shapes/shape_operations.h"

Pushing the mesh into element 1 rather than element 0:

co.meshes.resize(1);  // There is now 1 element
...
co.meshes.push_back(mesh_custom); // There are now 2 elements
co.mesh_poses[0].position.x = 2.0; // This corresponds to the wrong element

Other than that, I would use rostopic list and rostopic echo to make sure you're publishing to a topic that has a subscriber.

I see a couple things wrong with the code here.

Redundant includes (minor issue)

#include <geometric_shapes/shape_operations.h>
...
#include "geometric_shapes/shape_operations.h"

Pushing the mesh into element 1 rather than element 0:

co.meshes.resize(1);  // There is now 1 element
...
co.meshes.push_back(mesh_custom); // There are now 2 elements
co.mesh_poses[0].position.x = 2.0; // This corresponds to the wrong element

Other than that, I would use rostopic listinfo and rostopic echo to make sure you're publishing to a topic that has a subscriber.

I see a couple things wrong with the code here.

Redundant includes (minor issue)

#include <geometric_shapes/shape_operations.h>
...
#include "geometric_shapes/shape_operations.h"

Pushing the mesh into element 1 rather than element 0:

co.meshes.resize(1);  // There is now 1 element
...
co.meshes.push_back(mesh_custom); // There are now 2 elements
co.mesh_poses[0].position.x = 2.0; // This corresponds to the wrong element

Also, the color of the mesh isn't defined. Maybe it doesn't show up because it's transparent by default.

Other than that, I would use rostopic info and rostopic echo to make sure you're publishing to a topic that has a subscriber.