Gazebo | Ignition | Community
Ask Your Question

How can i use mouse to move the robot in gazebo?

asked 2017-07-20 10:49:30 -0500

I want to make a robot, which will move like a robot in video games. i.e when i move the mouse right side, it should rotate its face to right direction according to how much mouse has rotated, and when some keys in keyboard is pressed it should move forward and backward like in video games. Well i have seen how i can specify a specific task fro given keyboard, but how to do it with a mouse?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-20 23:06:59 -0500

chapulina gravatar image

For the keyboard, you could load the KeyboardGUIPlugin, which publishes key presses on Gazebo topic ~/keyboard/keypress and make a plugin which subscribes to it.

For the mouse, you can add filters to catch when mouse events are registered on the GUI. Here's an example.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-07-20 10:49:30 -0500

Seen: 1,066 times

Last updated: Jul 20 '17