PickNikRobotics / rviz_visual_tools

C++ API wrapper for displaying shapes and meshes in Rviz
774 stars 243 forks source link

Change the sphere marker type from SPHERE_LIST to SPHERE. #47

Closed miguelprada closed 8 years ago

miguelprada commented 8 years ago

This makes irregularly scaled spheres (i.e. ellipsoids) to be rendered correctly, which isn't the case when using SPHERE_LIST type markers.

See ros-visualization/rviz#1038.

davetcoleman commented 8 years ago

Its not clear to me how you make ellipsoids out of spheres. Perhaps a screenshot would show me the problem. Or add to the demo included in this package - though I think its only in jade/kinetic...

miguelprada commented 8 years ago

Using different values in the marker scale will render an ellipsoid if you publish a SPHERE type marker, and I was expecting just that when using RvizVisualTools::publishSphere (the overload with a vector as scale argument), but it didn't happen.

After tracking down the problem, I found that ellipsoids would be properly rendered when using the SPHERE marker type, but not when using SPHERE_LIST type, and that's why I opened ros-visualization/rviz#1038. You can see the difference in the image below.

Sphere vs ellipsoid render

The green sphere should also be rendered as a ellipsoid, but if I use SPHERE_LIST marker type instead of SPHERE this doesn't happen. See this test package if you want to try this yourself.

The problem has nothing to do with rviz_visual_tools, but you could avoid being affected by it by using the correct marker type when publishing a single sphere marker. The problem will persist when using publishSpheres, though.

davetcoleman commented 8 years ago

Thanks!

I've cherry-picked to jade/kinetic

miguelprada commented 8 years ago

Thanks, @davetcoleman!

Do you know how long should it take until this appears in the released packages?

davetcoleman commented 8 years ago

I tried just now but bloom appears to be broken for me: https://github.com/ros-infrastructure/bloom/issues/300#issuecomment-238030823

davetcoleman commented 8 years ago

Also https://github.com/ros-infrastructure/bloom/issues/396 :(