0
$\begingroup$

Rosanswers logo

The doc says colors should have same size as points. But in case of LINE_LIST, there are 2n points, with n = number of lines. I tried both to resize colors to n and 2*n and setting every color twice for each line, but I always end up seeing only every second line segment and having several segments rendered black.


Originally posted by Sebastian Kasperski on ROS Answers with karma: 1658 on 2015-07-29

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

The wiki says:

http://wiki.ros.org/rviz/DisplayTypes/Marker#Line_List_.28LINE_LIST.3D5.29

In visualization 1.1+ will also optionally use the colors member for per-vertex color.

I would guess that means you need to specify a color for each point in the points list, so colors should be the number of points or two times the number of lines. But that sounds like what you're doing. Can you post (as an edit to your original post) what version of rviz you're using and what version of ROS and what your OS is?


Originally posted by William with karma: 17335 on 2015-07-29

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

The strange behaviour was due to a programming bug.

The correct solution is to have colors the same size as points. Indeed you are coloring the points, not the full line segments. The two colors (start point and end point) are interpolated along the line segment.


Originally posted by Sebastian Kasperski with karma: 1658 on 2015-08-03

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.