Ask Your Question
2

Change RViz tool display name

asked 2017-08-09 19:26:35 -0600

jayess gravatar image

Is it possible to change the display name of a tool in Rviz? I have two robots running at once and want to be able to use the 2D Pose Estimate and 2D Nav Goal for each robot, but would like to give them custom names so that I know which tool works with which robot.

I've tried playing around with a custom configuration file, but I've only been able to add multiple instances of the same tool and change what topic they publish too. For example:

Tools:
    ...
  - Class: rviz/SetInitialPose
    Topic: /robot1/initialpose
  - Class: rviz/SetGoal
    Topic: /robot1/move_base_simple/goal
  - Class: rviz/SetInitialPose
    Topic: /robot2/initialpose
  - Class: rviz/SetGoal
    Topic: /robot2/move_base_simple/goal

will give me two sets of 2D Pose Estimate and 2D Nav Goal buttons to use. However, I think that it is not so clear which is which and I could accidentally set the wrong pose or goal pose to the wrong robot. So, I'd like to make them say robot1 Pose Estimate, robot1 Nav Goal, robot2 Pose Estimate and robot2 Nav Goal via a configuration file or some other method that doesn't require me to hack the source.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-09 22:11:21 -0600

lucasw gravatar image

updated 2017-08-09 22:12:20 -0600

rviz ought to support renaming those tools- an issue on https://github.com/ros-visualization/... would be good for proposing it.

All the tools currently call setName() with hardcoded names, but a Name StringProperty could be added to the tools that should support custom names and call setName with it when updated. Then the names could then be edited with the right click Tool Properties menu- this would be a really easy pull-request to put together.

Also the + button shouldn't preclude adding the same type of tools that are already on the tool bar (though it doesn't make sense to add a second ruler or select tool, just the ones that can be configured differently). I haven't looked in the source to see where that is done.

edit flag offensive delete link more

Comments

I had seen that they were hardcoded names, but was hoping that there was a way to override them.

jayess gravatar imagejayess ( 2017-08-09 23:36:39 -0600 )edit
1

I filed an issue about this in the repo.

jayess gravatar imagejayess ( 2017-08-09 23:55:44 -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

3 followers

Stats

Asked: 2017-08-09 19:26:35 -0600

Seen: 384 times

Last updated: Aug 09 '17