Ask Your Question

Revision history [back]

First if you haven't already done so work through the introductory tutorials including the simple publisher examples in your chosen language (C++ or Python) then you will be ready to start making your specific node.

There are many simple nodes designed for tele-operating robots that use the keyboard which do something very similar. In their case the key presses are used to generate the appropriate geometry_msgs/Twist message. In your case you would want to publish a std_msgs/String message.

If you look at the source code for the turtle_bot_teleop node you can see how it gets key presses and publishes messages. You could use this python code as a starting point if you like, although it is a bit more complicated than what you are building.

Hope this gets you started.