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

RViz custom Tool that mimics "Publish Point" built-in Tool behavior?

asked 2019-12-11 15:05:15 -0600

iomh gravatar image

Hello all,

The Publish Point Tool publishes a PointStamped to /clicked_point when used to click some object in RViz. It publishes nothing when clicked on empty space. This is the behavior I want, but I wish to make multiple Tools have this same behavior and publish to different topics.

I have seen custom plugins that can publish a point where clicked in the XY-plane (or some arbitrary plane, surface, etc), but this misses the "Z" dimension, while the Publish Point Tool takes on the XYZ-point of the object it clicks.

I have yet to find a custom RViz Plugin that can communicate with the positions of all other Display objects.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-14 13:59:56 -0600

pbeeson gravatar image

If you look in your .rviz configuration file, you'll notice a Tools section.

 Tools:
    - Class: rviz/Interact
      Hide Inactive Objects: true
    - Class: rviz/MoveCamera
    - Class: rviz/Select
    - Class: rviz/FocusCamera
    - Class: rviz/Measure
    - Class: rviz/SetInitialPose
      Topic: /initialpose
    - Class: rviz/SetGoal
      Topic: /move_base_simple/goal
    - Class: rviz/PublishPoint
      Single click: false
      Topic: /clicked_point

You can most probably, cut/paste the Publish Point multiple times with different Topics. I haven't tried, but give it a shot and see if it works.

edit flag offensive delete link more

Comments

Thanks for the reply! I actually abandoned this idea since PublishPoint crashed RViz too frequently for my purposes. However, I did try your solution, and it does work, but you cannot change the tool's name (even if you add a name tag to the .rviz file), so you're left with multiple tools that publish to different topics in the RViz toolbar, all with the name "Publish Point". Pretty cluttered.

iomh gravatar image iomh  ( 2020-06-04 19:10:58 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-12-11 15:05:15 -0600

Seen: 682 times

Last updated: May 14 '20