Joystick control - gpg3_joy

For mapping, I found it annoying to drive the GoPiGo3 around with the keyboard teleop - you always had to be in that shell window to drive the robot. I saw that the teleop_tools package that the book Hands on ROS had me download actually has a joy_teleop folder. But when I looked at it and the accompanying config file, it looked like overkill (and I didn’t find any real documentation on the config yaml file with my initial pass on Google).

A couple of years ago when I was first learning ROS I had actually written a very basic joystick node. I dug that code out and cleaned it up a little. It works for basic back-forth and turns. Doesn’t currently do moving turns - I’m not sure why. I’ll troubleshoot that and update the code if I find a solution.

You do have to install the Joy node on your desktop/PC, since I’m not using the teleop_tools that

sudo apt update
sudo apt install ros-melodic-joy

(I’m using ROS Melodic - substitute your version if you’re running something else)

I was caught by the issue ROS had with their GPG keys - see their blog post for the fix:

The script ( and launch file (gpg3_joy.launch) are both in my github repository:

I’m using a Microsoft Xbox 360 wired controller. Other controllers will work, but you may have to change the values for the axes. Helpful resources:


1 Like

Have been able to do a little troubleshooting regarding wide turns. Seems to be an issue with the turns (angular.z) being too slow compared with the back and forth (linear.x). Unfortunately I seemed to be having connectivity issues. So Finmark would latch on whatever the last /cmd_vel command it received and kept going, even with the joystick centered (and my laptop sending 0 values). The robot is also shutting down completely spontaneously. So more trouble shooting to do.

You sure know how to expose the really limited reaction options of the forum - no one can like that news. :grimacing:

Somewhere I saw a micro-bit as a wireless remote for a RPi using BLE.

A year or so ago, I tried getting some wireless playstation controllers to work but could not achieve consistent pairing with the RPi over BLE.

I really want something wireless that I can use direct to the bot. Probably best to add the infrared (TV) remote sensor and remote from my old RugWarriorPro robot when the time comes.

1 Like

I saw something similar this week, but it was a bit more involved - I think they were using a Teensy, and it was still over the WiFi. IR would be interesting - I know Modular Robotics has an IR transmitter and receiver to use with the GoPiGo3, but I’m sure you could use anything that you have - I guess the trick is figuring out what signals the different buttons are sending.

1 Like