Ask Your Question
0

how to change color of name of frame in rviz as shown in figures?

asked 2019-05-28 00:48:36 -0600

Redhwan gravatar image

updated 2019-05-28 02:03:35 -0600

gvdhoorn gravatar image

I need to change the color of names of frames from white to black, see figure 1, the background and name are white color while in figure 2 the background color is black and the name is white in rviz.

I need to alter between them

C:\fakepath\2.png

and

C:\fakepath\1.png

please help me

thank you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-28 10:22:52 -0600

Orhan gravatar image

updated 2019-05-28 10:23:21 -0600

You may need to download the code and change this line, then build your own RViz: https://github.com/ros-visualization/rviz/blob/melodic-devel/src/rviz/default_plugin/tf_display.cpp#L570

frame->axes_->setToDefaultColors();
frame->name_text_->setColor(Ogre::ColourValue::White); // <--
frame->parent_arrow_->setHeadColor(ARROW_HEAD_COLOR);
frame->parent_arrow_->setShaftColor(ARROW_SHAFT_COLOR);

Line number can be different based on your ROS distro. You'll be needing the version of source code that was used to supply your distro's binaries.

edit flag offensive delete link more

Comments

Thank you, I will try to download it

Redhwan gravatar imageRedhwan ( 2019-05-28 19:42:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-05-28 00:48:36 -0600

Seen: 92 times

Last updated: May 28