Teleop_xbox, nothing happens

I launched simple_pilot on rPi, and teleop_xbox on workstation, but nothing shows up in the rqt plots for the command input. I also tried rostopic echo joy, and nothing shows for maybe two or three minutes, then two messages show up at a time at two or three minute intervals. The messages show no input to the conroller, axes [0,0] and buttons , even if I hold down a button. xpad was installed on both machines, I uninstalled then relaunched everything with the same behavior. Does xpad need to be installed?, and does something else need to be started in order for the inputs to be published? I do not have an apm attached to the rpi right now, but that seems to be fine as long as I don’t launch mavlink.

Hey Jocab,

It sounds like you are trying to debug many things right now. Let’s start with just getting the joy topic to work.

My guess is that you are not pointing to the correct serial device and therefore are not connecting to the joystick. Check out our teleop_xbox.launch file which specifies the serial device for the joy node. Run ls /dev/input | grep js to see what your options are and then try those values in the launch file until something works. Unfortunately, you might have to repeat this process every time you plug in your controller to your computer.

I have tried many times to find some udev rule to make this a non-issue. If you can figure it out a udev rule that works, I’d be very thankful.

Finally, the joy node itself is made by the ROS community and is very well supported. Check out if you have more questions.

Solved, I have had to switch back and forth between dev/input/js0 and dev/input/js1 in teleop_xbox.launch. If one doesn’t work, the other does. And for the record, xpad is not required. Thank you.

Hey Jacob,

We finally have a udev rule that will prevent you from having to jump back and forth between device names. It is currently on the #develop branch of our repository.

The udev rule itself is here: bluerov-ros-pkg/99-bluerov-apps.rules at develop · bluerobotics/bluerov-ros-pkg · GitHub

Notes on how to install the udev rule are here: GitHub - bluerobotics/bluerov-ros-pkg at develop