Skip to content

Commit

Permalink
fix rainbow color, see ros-visualization#813
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Sep 17, 2014
1 parent 38d6d14 commit db7203c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rviz/default_plugin/effort_visual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ namespace rviz
if ( !(i&1) ) f = 1 - f; // if i is even
float n = 1 - f;

if (i <= 1) color[0] = 0, color[1] = n, color[2] = 1;
else if (i == 2) color[0] = 0, color[1] = 1, color[2] = n;
else if (i == 3) color[0] = n, color[1] = 1, color[2] = 0;
else if (i == 4) color[0] = 1, color[1] = n, color[2] = 0;
else if (i >= 5) color[0] = n, color[1] = 0, color[2] = 1;
if (i <= 1) color[0] = n, color[1] = 0, color[2] = 1;
else if (i == 2) color[0] = 0, color[1] = n, color[2] = 1;
else if (i == 3) color[0] = 0, color[1] = 1, color[2] = n;
else if (i == 4) color[0] = n, color[1] = 1, color[2] = 0;
else if (i >= 5) color[0] = 1, color[1] = n, color[2] = 0;
}

void EffortVisual::setMessage( const sensor_msgs::JointStateConstPtr& msg )
Expand Down

0 comments on commit db7203c

Please sign in to comment.