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

Revision history [back]

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.

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.

UPDATE

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.