Joystick keeps losing link

I’m working with a client on some custom software enhancements to their LEO Rover and I’m having a LOT of trouble with the joystick that came with it. When I press the center “Wake up” button, the LED ring on the joystick flashes for a second or two then glows solid and I can drive the rover for a few seconds before the light starts flashing again.

I’ve charged the joystick overnight, but this doesn’t seem to help. It’s acting like it’s picking up a lot of interference or the battery is dead. The end-result is the same in that the robot is pretty much undriveable with the joystick. I can control it within a browser using the WebUI. This isn’t a good long-term solution though because the work we’re doing involves field-testing some high-end GNSS/RTK equipment mounted to LEO.

Thoughts from anyone ?

Wait a second. Where did you get the joystick from?
We don’t have any joystick in offer.
For sure, we’ll help you with that (as we always do), but I’m still confused.

Yeah, I heard back from him. Apparently he got it 3rd party. I haven’t worked with the LEO Platform before so I just thought it came with it :slight_smile:

Anyway, I figured it out. The controller is a 2.4Ghz gaming controller that’s getting stomped by the Wifi AP at the radio level. It took me a bit to figure it out though because I could run the Web GUI and also ssh into the robot and do some basic command-line work, but when I fired up their full stack, the rover suddenly became undriveable.

The joystick uses a 2.4Ghz transmitter which plugs into a USB port. It drives the LEO around w/ no problem as long as there isn’t heavy traffic going over the WiFi between the LEO and, say, a laptop that is ssh’ed into it.

The problem starts when, for example, I launch foxglove-studio or rosbag record on my laptop with the ROS_MASTER_URI set to the LEO. Because WiFi does frequency-hopping as part of the 802.11 baseband protocol, it effectively jams the joystick connection which is confined to one frequency.

This is not too dissimilar from the interference between WiFi and some older Bluetooth devices.

On a Pi4, you can set the AP configuration to use 5.8Ghz, but the Broadcom radio that’s on the Pi3 the LEO has is only 2.4Ghz. So you would need to add a separate WiFi device or get a different controller.

For now, we’ll be recording out data locally onto the LEO, but longer term we’ll be looking for a different controller.
Do you know what other sorts of joysticks people are using with their LEOs ?

Ok, I see now.
There’s one thing you may take into consideration (and we’re working on that). The UI zeroes cmd_vel when you don’t drive any commands but have the UI opened. This may cause several issues here, when you have the UI open and joystick on, the UI will send zero-es to cmd_vel when the joystick will try to push it’s own data.