ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Remote control with a Gamepad

asked 2019-08-26 04:52:40 -0500

Ktysai gravatar image

updated 2019-08-26 19:38:45 -0500

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!

  1. Yes, the USB dongle could be a solution, but the pesky thumb BT USB that I had wasn't to be found :(

  2. 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.

  1. 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>
edit retag flag offensive close merge delete

Comments

My guess is the latency from the intermediate connections. Which VM software are you running?

prefpkg21 gravatar image prefpkg21  ( 2019-08-26 06:56:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-26 12:54:43 -0500

duck-development gravatar image

updated 2019-08-26 13:01:51 -0500

You could try an usb Bluetooth dongel. As VirtualBox does support usb pass through. Did you try it buy usb wire?
Here is virtual box config help https://forums.virtualbox.org/viewtop...

On the Linux you may try the xboxdrv as user level driver. this may help. The Xbox one controller support is only avaliable on recent kernel like on the 18.04

The solution with the raspberry and an Lan-wire connection should be fast enough with a publisher. You may get problems with the bridged virtual Lan adapter, if your vm has an other IP segment and you use NAT.

edit flag offensive delete link more

Comments

How the setup the controller is here described https://www.google.com/amp/s/www.make...

duck-development gravatar image duck-development  ( 2019-08-26 12:57:14 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-08-26 04:52:40 -0500

Seen: 1,159 times

Last updated: Aug 26 '19