Ask Your Question
0

why the text color of the frame's name in rviz is white?

asked 2020-07-15 07:32:09 -0500

Redhwan gravatar image

updated 2020-07-15 09:30:24 -0500

Why the text color of the frame's name in rviz is white?

Is it white because that background of the rviz is black? If yes, what if we change it to white? Can we change the text color of the frame's name in rviz to black? If yes, how?

I change background of the rviz from black to white easly, but the text color of the frame's name is impossible to change it from rviz screen. Which is file of configuration whose is responsible for it?

image description

update

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-07-15 09:04:07 -0500

mgruhler gravatar image

This is basically hard-coded in the tf display type plugin: https://github.com/ros-visualization/...

("basically", because in case of a timeout it will turn grey...)

So there is no way for you to change that except for changing the source code.

As to why it is white in the first place, my guess is as good as any, but I'd also say due to the default background being black...

edit flag offensive delete link more

Comments

I did not find tf_display.cpp in my computer, but I found tf_display.h which does not include color's lines.

I will add figure to my question as update. Will I need to build it as own visualization from source? If yes, does it need to modify something in launch file?

Redhwan gravatar image Redhwan  ( 2020-07-15 09:29:39 -0500 )edit

I downloaded it for kinetic from kinetic-devel and put it on my /catkin_ws/src/

I changed this line from

frame->name_text_->setColor(Ogre::ColourValue::White);

to

frame->name_text_->setColor(Ogre::ColourValue::Black);

and used catkin_make,

then used source ~/catkin_ws/devel/setup.bash

It works fine,

thank you so much for your help.

Note: all this modification is in the workstation part, not is in the robot part.

Redhwan gravatar image Redhwan  ( 2020-07-15 20:23:30 -0500 )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: 2020-07-15 07:32:09 -0500

Seen: 121 times

Last updated: Jul 15 '20