0
$\begingroup$

Rosanswers logo

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.


Originally posted by jayess on ROS Answers with karma: 6155 on 2017-08-09

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

rviz ought to support renaming those tools- an issue on https://github.com/ros-visualization/rviz/issues 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.


Originally posted by lucasw with karma: 8729 on 2017-08-09

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jayess on 2017-08-09:
I had seen that they were hardcoded names, but was hoping that there was a way to override them.

Comment by jayess on 2017-08-09:
I filed an issue about this in the repo.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.