Ask Your Question

Robot drives arm into table on its way to target pose

asked 2018-08-19 16:26:08 -0500

kevin.crawford.knight gravatar image

updated 2018-08-20 01:10:17 -0500

gvdhoorn gravatar image


Apologies for newbie question. Is there a command that moves "straight" to a target set of joint angles, where "straight" means the end effector moves in a roughly straight line?


I use my Kinova MICO 4DOF arm for art projects. I drive it with shell commands. It currently plays a decent game of chess, using a DGT sensory board. I'm an end user who programs in bash, consumed by art projects that leave little time for mastering robotics.

I've recorded joint angles for all robot arm poses of interest. I can get current joint positions with:

rostopic echo -c /m1n4s200_driver/out/joint_angles

I subtract these from the target-position angles, and drive the arm like this:

rosrun kinova_demo -v -r m1n4s200 degree -- $M1 $M2 $M3 $M4

This works fine much of the time. However, all joints seem to move at the same speed independently, toward their individual goals. So the end effector follows a ponderous curvy path. Depending on where the joints are, the robot will often try to drive straight through the table surface (presumably hoping to emerge somewhere else en route to the target angles).

Is there a command that will move the end effector straight, or avoid the table surface? I'm using joint angles, not Cartesian positions.

I'm using kinova-ros, as described here:

Everything I know comes from this document -- it's a pretty spare tutorial for me.

Thanks, Kevin

PS. My software versions:

% rosversion -d

% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-08-19 21:49:50 -0500

Geoff gravatar image

You need to plan a path for the end effector to follow and then control the joint motors at varying speeds over time to move the end effector along this path. Planning can involve making sure the robot doesn't collide with itself, making sure any part of the robot doesn't try to drive through the table, varying the speeds of joints to give smooth motion of the end effector, and many other factors. Sounds difficult, right? It is! That's why we all use the MoveIt! stack to control our manipulators.

Fortunately, it looks like the Kinova Robotics ROS software supports MoveIt! as of version 1.20.

MoveIt is a very complex piece of software, but the simple things like what you want to do are relatively straightforward. You do need to learn a little about how it works, though. There are a lot of tutorials available. I recommend you start by going through that Kinova Robotics page to make sure it's all working, and then move on to the tutorials provided by MoveIt. The quickstart tutorial could be a good place to begin. If you want a simple API to do simple tasks, then the Python interface is the one for you. That tutorial will take you through the basics of telling the end effector to go somewhere. In particular, pay attention to the bit about adding objects to the planning scene. This is how you tell MoveIt that you have a table and chess pieces so that it doesn't try to drive through the table or throw chess pieces around the room like an angry toddler.

The tutorials on the C++ API give a lot more detail on the things that are possible with MoveIt. The majority of them are possible with the Python API as well so don't feel like you have to learn C++ just to use MoveIt.

If ultimately you want to program it all using bash, then I recommend you make a simple Python script that sends an end effector goal to the robot using MoveIt and executes that motion before returning. Then you can do the rest through bash.

edit flag offensive delete link more


I'd just like to add that the OP's goal of moving the end effector I'm a straight line to a goal is actually a very challenging task and in some cases impossible where that route passes through a singularity. Hence the requirement to use a path planning algorithm to achieve this goal.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-08-20 04:39:32 -0500 )edit

Thank you very much for the clear explanation. I got 90% of the way there with rosrun shell commands, but for the last 10%, looks like I should learn MoveIt and Python and 3D models. At least I know the path! Thanks for your patience @gvdhorn, much obliged.

kevin.crawford.knight gravatar image kevin.crawford.knight  ( 2018-08-21 00:41:53 -0500 )edit

You won't need to learn too much about 3D models to use MoveIt. The robot comes with its own 3D model, and for representing things in the environment you can get away with using boxes.

Geoff gravatar image Geoff  ( 2018-08-21 16:41:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-08-19 16:26:08 -0500

Seen: 431 times

Last updated: Aug 20 '18