ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

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:

  - 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

2 Answers

Sort by ยป oldest newest most voted

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 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


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

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

I filed an issue about this in the repo.

jayess gravatar image jayess  ( 2017-08-09 23:55:44 -0600 )edit

answered 2020-11-14 08:31:42 -0600

quanghai gravatar image

updated 2020-11-14 08:32:08 -0600

1, Clone and catkin_make this repo

2, In Rviz, choose "Add new tool" - "rviz_navigation_plugin" - "LabelNavGoal"

3, In "Tool properties", change the topic "my_nav_goal" to "/robot1/move_base_simple/goal"

edit flag offensive delete link more

Question Tools



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

Seen: 1,106 times

Last updated: Nov 14 '20