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

How to designate a certain point by simple mouse-click?

asked 2020-10-09 09:40:42 -0500

kane_choigo gravatar image

updated 2022-03-04 06:34:24 -0500

lucasw gravatar image

Hello, I'm using ROS kinetic with Ubuntu 16.04.

If someone who has used amcl_node ever before here, I think you would be familiar with designating certain points by mouse-click ('2D Nav Goal' button) in rviz interface.

The following is my works:

  1. Launch simulation of an agent robot.

  2. Launch a certain node with regard to rviz API. (view_navigation.launch)

  3. To give a goal point to the robot, designate a certain goal point of 2D Nav Goal in rviz interface by mouse-click.

And I have no idea how to get a certain goal point I designate by mouse-click.

How can I set that kind of work and subscribe to the goal point?

The only one I want to do is to get a goal point I clicked in rviz interface without any other unnecessary packages like amcl_path_planner.

Would you please give me great advice?

Thanks in advance. :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-09 10:47:10 -0500

JackB gravatar image

updated 2020-10-09 10:48:26 -0500

Run rostopic echo /initialpose in a terminal, and then uses the 2D Pose Estimate button to set a pose on the map in RVIZ and that should do the trick. The pose you just set should be displayed in the terminal.

Or if you want the output of the 2D Nav Goal button run rostopic echo /move_base_simple/goal instead

Ros Topic link

edit flag offensive delete link more

Comments

Thank you for the quick answer. Then would the mouse-clicked goal topic be published if I set the goal in rviz? And could I also subscribe to that topic of move_base_simple/goal?

kane_choigo gravatar image kane_choigo  ( 2020-10-09 23:52:55 -0500 )edit

Yes. This is exactly what I try to describe in my answer.

JackB gravatar image JackB  ( 2020-10-10 22:33:02 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-10-09 09:40:42 -0500

Seen: 174 times

Last updated: Oct 09 '20