Use the Xbox360 handle to control your Turtlebot/rbx1/mrobot trolley robot

Source: Internet
Author: User
Tags gtk

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




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.