Use the Xbox handle to control the car robot steps (take the Mrobot package as an example)
1. Install the Xbox360 handle driver
sudo apt-get install ros-indigo-joystick-drivers
2. Test handle (general connection is JS0)
ls/dev/input/
May be js0 One, it is possible to js0,js1 two, there may be js0-3 four, in the test can determine which of the handle
The first method:
Use JSTEST-GTK to test your handle
sudo apt-get install jstest-gtk
JSTEST-GTK
After entering the appeal order, the graphical handle test program will appear, select the test
The second method:
sudo jstest/dev/input/js0
After input, shake the handle, if the data of the terminal is changed, that is JS0
If no changes can be changed to JS1, continue testing
3. Configure Joystick_teleop.launch (turtlebot name is Xbox360_teleop.launch)
Mrobot in Package Mrobot_nav/launch, rbx1 in Package Rbx1_nav/launch, Turtlebot in Turtlebot_teleop/launch
Select the Enable key (that is, the trolley will move only if you press the key to shake the lever)
Find <param name= "Axis_deadman" value= "7"/>, where 7 is just the Start button for the Xbox handle, different handles may need to be tested multiple times, as your 8 will change the 7 in the previous sentence to 8.
Find <node pkg= "Joy" type= "Joy_node" name= "Joystick" output= "screen"/> (in the last few lines), press Enter another line, fill in:
<param name= "Dev" type= "string" value= "/dev/input/js0"/>
4. Use the handle to control your car
Roscore
roslaunch mrobot_bringup mrobot.launch
roslaunch mrobot_nav joystick_teleop.launch
Using different trolley package boot instructions are different but similar, RBX1 is
Roscore
roslaunch rbx1_bringup minimal.launch
roslaunch rbx1_nav joystick_teleop.launch
Turtlebot for
Roscore
roslaunch turtlebot_bringup minimal.launch
roslaunch turtlebot_teleop xbox360_teleop.launch