Home | Tutorials | Wiki | Issues
Ask Your Question
0

Getting the coordinates of a point using the mouse

asked 2017-04-08 17:52:35 -0600

andrestoga gravatar image

Hi,

Is there a way to get the coordinates of a point (x and y coordinates) using the mouse on the gazebo client?

Best,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-04-09 10:19:47 -0600

Yes, you can get it with a GUI plugin.

Here's an example which gets the mouse position on mouse move.

It uses gui::MouseEventHandler::AddMoveFilter and gives it a callback which is called whenever the mouse is moved on the 3D scene.

Then it uses Scene::FirstContact to get the coordinates of that point in 3D.

edit flag offensive delete link more
0

answered 2017-04-08 20:11:07 -0600

nkoenig gravatar image
edit flag offensive delete link more

Comments

You mean using a plugin, right?

andrestoga gravatar imageandrestoga ( 2017-04-08 20:22:30 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-04-08 17:52:35 -0600

Seen: 1,133 times

Last updated: Apr 09 '17