Remote control with a Gamepad
HI there!
On the win8 laptop I have a virtual machine with Ubuntu 16.04 & Ros Kinetic.
With gamepad Xbox One with Bluetooth I want to control a gazebo simulation. The nasty problem is that the virtual machine cannot access the built in BT adapter.
The workaround was to use a Raspberry Pi that has Kinetic on it and connect the gamepad on it. then on Rpi , I run the JOY topic and broadcast it.
On laptop side I subscribe to the JOY topic, and start Gazebo simulation. The problem is that the robot moves very slowly. It that problematic for Rpi to broadcast a joy topic, or my method is not optimized?
LATER EDIT
The virtual machine software is Virtualbox Version 6.0.10 r132072 (Qt5.6.2). I tried numerous solutions but I cannot make the bluetooth embedded in the laptop to be seen.
FINAL EDIT Thanks @prefpkg21
@duck-development thank you for making me aware of maaany things!
Yes, the USB dongle could be a solution, but the pesky thumb BT USB that I had wasn't to be found :(
With XBOXDRV on RPi I've has a lot of problems. An unstable solution at least with Ubuntu 16.04 LTS.
I must point out a UBER gooddriver for Xbox one Controllers wired or Bluetooth, even in Ubuntu 16.04: https://atar-axis.github.io/xpadneo/
Man, this driver works flawlessly on RPi 3B with bluetooth and on the Virtual Machine, wired this time.
It was a good suggestion to use it wired and along with xpadneo driver is a feasible solution.
- Now, the solution of using Rpi as publisher can work indeed. I have not tested yet.
I have discover a thing in my setup. The Gazebo simulation presents a slow drifting robot due to gravity, and maybe made me think I control it.
I've found out that I was barking on the wrong tree. In the launch file I've had to do a <remap from="cmd_vel" to="rosvio/cmd_vel"/>
<node pkg="teleop_twist_joy" type="teleop_node" name="joystick_to_twist">
<remap from="cmd_vel" to="rosvio/cmd_vel"/>
<param name="scale_angular" value="1.0" />
<param name="scale_linear" value="0.25" />
</node>
My guess is the latency from the intermediate connections. Which VM software are you running?