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

How to controll turtlebot arm with xbox controller?

asked 2016-01-27 03:32:52 -0500

npa gravatar image

Hello I want to create a package for controlling the turtlebot arm with the xbox controller i have.Please help me with some ideas to implement it..

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-01 05:27:44 -0500

jorge gravatar image

updated 2016-02-12 08:24:22 -0500

Interesting project... I would be surprised if nobody else did that for another arm, so you can borrow code... But assuming that not, this is my first though on the easiest way to go:

Do you have the arm up and running with MoveIt!? That is, can you make all the steps from here and the arm tries to pick and place an object? If so, you need to run the joy package and transform the joy messages it will provide you into poses for the end effector (the gripper). Like in this tutorial but instead of publishing Twist messages, you execute commands as I do here.

A bit more detail: let's say you have your arm in an initial pose, geometry_msgs::PoseStamped pose0, that you find convenient. Then you can do increments to this pose according to joystick inputs and instruct the arm to move to them with setPoseTarget and move calls.

Main potential problem I see with this approach is speed, as you will instruct MoveIt! to recalculate and execute a trajectory for every joy command, so you will need to be savvy to choose when to provide a new target and to tweak MoveIt! parameters to make all work smoothly.

An alternative approach, potentially much faster but more difficult to implement, is that you borrow the IK model from the turtlebot arm code so you can instruct the arm controller directly, completely avoiding MoveIt!. But i would first make a first try with the first, easiest, method.

Good luck! Tell me if I can support you somehow.


Looks like I'm just writing to myself, but... I have noticed that MoveIt! provides a compute_ik service that allows you to implement something in between the previous options: You can calculate sucesive arm's end effector (gripper) poses based on joystick inputs and call this service to obtain joint positions that you can send to the servos.

edit flag offensive delete link more


Hi! I am a ros beginner,and i am very interested in moveit and microcontroller.It seems you have great experience about ros.Could you please give me some direction and help. How to use moveit send the command to microcontroller to control my own manipulator? thanks for any help!

peterlin300 gravatar image peterlin300  ( 2016-03-28 04:01:11 -0500 )edit

Question Tools

1 follower


Asked: 2016-01-27 03:32:52 -0500

Seen: 634 times

Last updated: Feb 12 '16