Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How add color to vertex? #23

Open
SLAMWang opened this issue Sep 6, 2023 · 1 comment
Open

How add color to vertex? #23

SLAMWang opened this issue Sep 6, 2023 · 1 comment

Comments

@SLAMWang
Copy link

SLAMWang commented Sep 6, 2023

Hi, thanks your great work.
I am using mesh_tools for visualization.
According to the document:
MeshGeometry (Stamped) Defines the geometric structure of a triangle
mesh with 1.) an array of 3D vectors, which represents vertices in R3, 2.)
an array of indices, in which three indices each define a triangle by referring
220 to the array of vertices (vertex and index buffer), and 3.) an array of vertex
normal vectors.
MeshVertexColors (Stamped) Colors for the vertices are represented by an
array of std msgs/ColorRGBA and linked to a corresponding mesh by a string
representing a UUID.

I create a MeshGeometry ros_msg and a MeshVertexColors ros_msg, and push_back the same size items in them, give them the same UUIDs, however, the rviz says that Received vertex colors, but UUIDs dont match.

@aock
Copy link
Collaborator

aock commented May 16, 2024

Hi @SLAMWang, thanks for your interest! I don't know if this comes a bit late, but with our ROS2 port, I started a side project, https://github.com/aock/mesh_msgs_examples, that aims to explain the usage of the mesh_msgs. It's far from being finished, but it already contains mesh colors. So it might help you with your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants