Home | Tutorials | Wiki | Issues
Ask Your Question

How can I control a simple model using the keyboard?

asked 2015-10-17 04:12:41 -0500

Adri gravatar image

Good day.

I want to make a plugin which allows me to control a simple model (a sphere, for example) using the keyboard (like w,a,s,d keys), but I don't know what functions or methods i need to use in the .cc file. Can anyone answer me with a simple tutorial about this problem?

Thanks a lot.

PS: I want to make this plugin without using ROS.

edit retag flag offensive close merge delete


how do you want to control it? applying a force? settings joint or link positions? In terms of keyboard input, you probably don't want to do that in the plugin. You should make a standalone executable program that reads keyboard and sends messages over gazebo transport.

Peter Mitrano gravatar imagePeter Mitrano ( 2016-07-01 18:06:22 -0500 )edit

there are examples ?

AlberSaber gravatar imageAlberSaber ( 2018-11-06 06:05:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-06 10:15:26 -0500

nkoenig gravatar image

The question you asked has multiple solutions and is a bit open-ended. I suggest you take a look through the Gazebo tutorials, examples, and plugins.

You can also search this forum for keyboard solutions.

Try to write your own solution using the resources listed above. Good luck, and please update this post or create a new post if you run into specific problems along the way.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2015-10-17 04:12:41 -0500

Seen: 564 times

Last updated: Nov 06 '18