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

Incorrect marker(Mesh Resource) Visualization

asked 2021-10-10 12:06:24 -0500

misty gravatar image

updated 2021-10-14 05:22:13 -0500

Hi, I am trying to visualize the following image as a marker(mesh resource) in the Rviz.

image description

But, in rviz it appears as:

image description

Can anyone please guide me on how can make my marker similar to the image above? Why am I losing all the details and RGB values in my marker? The houses on the left (appearing in the picture) cannot be seen in the marker at all.

I did set the mesh_use_embedded_materials flag to true and all the r,g,b, values are set to zero. Also, I used online tools to convert my png image into .dae file.

edit retag flag offensive close merge delete

Comments

Have you tried setting r, g, b, and a to non-zero? The Marker page says that setting r, g, b, and a to non-zero will add color.

http://wiki.ros.org/rviz/DisplayTypes...

miura gravatar image miura  ( 2021-10-10 18:25:55 -0500 )edit

I tried. That doesn't help.

misty gravatar image misty  ( 2021-10-11 02:48:00 -0500 )edit

How about displaying the dae with a tool other than rviz? This will help you to distinguish whether it is a defect in the dae file (problem in converting from png) or a problem on the rviz side.

miura gravatar image miura  ( 2021-10-11 18:43:14 -0500 )edit
1

Pls take a look at this question: #q322457

osilva gravatar image osilva  ( 2021-10-14 18:57:37 -0500 )edit
2

Specifically at this repo: https://github.com/lucasw/rviz_textur... looks that allows you to do what you are looking for

osilva gravatar image osilva  ( 2021-10-14 19:03:13 -0500 )edit

@osilva, thank you so much. The repository worked for me. If it's possible for you, please put your comment as an answer so that I may accept it and close the issue.

misty gravatar image misty  ( 2021-10-15 11:02:00 -0500 )edit

Glad it helped. I’ll add as answer

osilva gravatar image osilva  ( 2021-10-15 11:25:01 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2021-10-15 11:43:01 -0500

osilva gravatar image

There is Rviz plugin called Rviz Texture Quadsthat allows you to display textured images (realtime or static sensor_msgs/Image topics) as a marker in 3D space. In addition there is a cool demo by: https://github.com/lucasw/rviz_textur... that shows how to use it.

As mentioned in my comments, I found this info from prior question #q322457 so I hate to take any credit.

However, I'd like to add more info to this answer. The message is structured as follows:

sensor_msgs/Image   image           # texture 
geometry_msgs/Pose  pose            # 6DOF pose of the center of the quad to be displayed
float32             width           # physical width of the quad in Rviz unit (usually meters) 
float32             height          # physical height of the quad in Rviz unit (usually meters) 
string              caption         # [OPTIONAL] text description to appear below the quad
float32             border_size     # [OPTIONAL] size of the quad border
float32[]           border_color    # [OPTIONAL] (r,g,b,a) color value of the quad border (Size = 4)

And please review the source code to understand how this is achieved in case someone else may want to apply similar concept but for different application, such as AR.

edit flag offensive delete link more

Comments

Best. Thanks a lot.

misty gravatar image misty  ( 2021-10-15 11:45:06 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-10-10 12:06:24 -0500

Seen: 232 times

Last updated: Oct 15 '21