Tag Archives: controller

Control your robot with a joystick in ROS

In other tutorials, I showed how to get access to the joystick and how to code with that. In this tutorial, I’m  gonna show you how to do that without writing any line of code.

First, install the required packages:

Now call the following


This will publish the topic “/joy_node” which is type of “sensor_msgs/Joy

Now you need to create your favorite message from that, for instance, if you want to move your robot you need to create “Twist” and publish that over /cmd_vel. To do that, create a yaml file and call it “joystick_param.yaml”, then put the following in the file and save it:





Now load it to ROS param:

Then you can call joy_teleop.py, so it will check the values that you set into teleop and publish 

/chatter and /cmd_vel

Alternatively, you can just call the following which will do lines above at once:


read more:

joy, joy_teleop, teleop_twist_joy, teleop_example