how to point and click on rviz map and output the position.
Can any one tell me how to use mouse to click on a map in Rviz and get the position of this area. Then output it.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Can any one tell me how to use mouse to click on a map in Rviz and get the position of this area. Then output it.
If you add a grid and click on with 2D Nav Goal or 2D Pose Estimate. The result is wrote in the terminal and in the topic /initialpose or /move_base_simple/goal. It's only a 2D select but it can be useful. I don't know if a better way exists.
more specifically, you can do this
rostopic echo /initialpose
OR
rostopic echo /move_base_simple/goal
Go to the Top menu in RVIZ and click on Panels. Under the Panels, tick Selection. Once Selection is enabled, it adds a new Panel called Selection. Then on the RVIZ gui press on select option which is beside Move Camera option.
Then whatever points you select on the point cloud will displayed in the Selection panel.
but, the coordinate is only the relative position wrt the vehicle?
Open a new terminal and type rostopic echo /clicked_point
Open Rviz and use Publish a point tool .
Click anywhere on the map .
The result should be instantaneously displayed in the terminal where we have echoed /clicked_point
I have been trying this. I could see that when I select the Publish Point tool, the cursor gets a pin location and when I click a point, it publishes the coordinates in that frame. But most times, the pin location does not appear on my screen. When I am clicking any point, the point does not get published. Am I missing out something?
@viswa_1211 Unfortunately you need to be able to click on something, to publish that position as a point (i.e., you can't publish points in empty space). One way is to enable the grid. You can then click on the corners. It seems the points are given in the fixed frame that is currently used.
Asked: 2013-07-25 10:33:21 -0600
Seen: 22,146 times
Last updated: May 08 '17
Publish an length unknown vector message on a topic
basic question in understanding publishing and subscribing
Can I "overload" topic names in ROS? (Different versions by datatype)
Is it possible to change "msg" and "srv" folder position in a package ?
Subscribing to the odometry topic
Problem using subscribed motor position topic
publish arrays to a topic on the command line
How to create a global listener for any ROS topic and extract all data from any message?