ROS and a bluetooth game controller

333 views
Skip to first unread message

anfederman@comcast

unread,
Oct 9, 2015, 12:09:49 PM10/9/15
to hbrob...@googlegroups.com
I picked up a Bluetooth game controller and it works in a ROS Joy node.  However it doesn't seem to work for my Neato using the SV-ROS code. -  Where do I modify the key mapping so I can get it to work - or is it just a secret combinations of keys to get it to drive the robot?
 

Camp Peavy

unread,
Oct 9, 2015, 3:31:55 PM10/9/15
to hbrob...@googlegroups.com
I use the teleop_twist_keyboard package. ... don't know where to modify key mapping but I do know to drive the neato it is a "setmotor" command "SetMotor [LWheelDist <LWheelDist_value>] [RWheelDist <RWheelDist_value>] [Speed <Speed_value>] "
 
Programmer’s Manual
 
- Camp


From: "anfederman@comcast" <anfed...@comcast.net>
To: hbrob...@googlegroups.com
Sent: Friday, October 9, 2015 9:09 AM
Subject: [HBRobotics] ROS and a bluetooth game controller

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To post to this group, send email to hbrob...@googlegroups.com.
Visit this group at http://groups.google.com/group/hbrobotics.
For more options, visit https://groups.google.com/d/optout.


Ralph Gnauck

unread,
Oct 9, 2015, 4:02:16 PM10/9/15
to hbrob...@googlegroups.com
Alan,
The intro_to_ros neato code uses the XBOX teleop driver.
You can change the launch file

~/catkin_ws/src/intro_to_ros/bv80bot/bv80bot_node/launch/include/bv80bot_base.launch

 to use the driver node you are using.

Ralph


From: 'Camp Peavy' via HomeBrew Robotics Club <hbrob...@googlegroups.com>
To: "hbrob...@googlegroups.com" <hbrob...@googlegroups.com>
Sent: Friday, October 9, 2015 12:31 PM
Subject: Re: [HBRobotics] ROS and a bluetooth game controller

anfederman@comcast

unread,
Oct 9, 2015, 9:37:19 PM10/9/15
to hbrob...@googlegroups.com
I see a XBOX launch file, is this started automatically, or does it need to launched separately?
 
 
I see a tutorial on joystick nodes on the ROS wiki - but it appears to be messed up - the same paragraph repeats three times.

Ralph Gnauck

unread,
Oct 10, 2015, 2:58:48 AM10/10/15
to hbrob...@googlegroups.com
Alan,
The bv80bot automatically launches the xbox teleop package.

It is launched from the launch file I listed in the prior email.

You can edit that file to replace the XBOX joystick launch file with one suited to the joystick you have.

What joystick do you have?

If it is Bluetooth it is probably a PS3 clone and you should be able to swap the command to launch XBOX teleop launch file with a suitable PS3 Teleop launch file.

Ralph



From: "anfederman@comcast" <anfed...@comcast.net>
To: hbrob...@googlegroups.com
Sent: Friday, October 9, 2015 6:37 PM

anfederman@comcast

unread,
Oct 13, 2015, 8:54:41 PM10/13/15
to hbrob...@googlegroups.com
The solution was simple  (well it only took me a couple of hours to figure out.)
 
I remapped the axis dead_man button from 4 to 6 in the xbox joystick launch file.
 
I can drive my Neato.  (Now I have to program the Raspberry pi and engineer a power supply for it.)
 
Since my controller was free and worked with a blue tooth dongle, I won't have to buy an Xbox 360 with a separate darn giant  dongle.  I thought about stealing my kid's, but since he is now bigger than me I figured I better not.
 
 
A nice trick to figure out the buttons was using rostopic echo /joy.  You can then run the controller and see which button is being pressed.

Ralph Gnauck

unread,
Oct 14, 2015, 1:02:13 PM10/14/15
to hbrob...@googlegroups.com
I have made a few more updates to the bv80bot gituhb repo

The navigation tuning should now be much better, at least for running the nav on a laptop/pc.

It may still not work well if navigation is run on the PI.


Inspired by Alan's issues I have also now added additional teleop options and a new parameter to select the type of controller you are using. See the README.md on github for more details.

Thanks

Ralph


From: "anfederman@comcast" <anfed...@comcast.net>
To: hbrob...@googlegroups.com
Sent: Tuesday, October 13, 2015 5:54 PM
Subject: Re: [HBRobotics] ROS and a bluetooth game controller - solved.

anfederman@comcast

unread,
Oct 14, 2015, 8:01:24 PM10/14/15
to hbrob...@googlegroups.com
Thanks Ralph.  Not sure what the deal is on the Pi plus Bluetooth joysticks.  I got to see my joystick paired on the Pi, but the /dev/input/js0  never gets created.   Worked easily the first time on my laptop.  Most likely this is a Rpi Ubuntu 14.04 Kernel issue, but I don't have time to worry about dinking with dmesg any further.  If HBRCers can report which Bluetooth/Joystick combinations work, we may get a working 'approved' list.  I know this issue has frustrated Wayne as well. Keyboard teleop works fine.
 
 A good tutorial on setting up the pi as a standalone access point would really help me, for doing demos in WiFi hostile environments(aka the Hacker DoJo).  Also what are the setups that work?  Is anybody running a Pi and driving it with a joystick and how did you do that?
Reply all
Reply to author
Forward
0 new messages