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

Moveit planning inaccurate?

asked 2017-06-08 11:59:54 -0600

David_111 gravatar image

Hello there,

I'm trying to save robot positions to xml files, load them into an interface and make plans through the stored states.

However, i just loaded a pose into my program, planned and executed a Trajectory, but it is incredibly inaccurate! I have this information in my Code:

position: 
  x: 0.25001175875
  y: 0.00521729120018
  z: 1.4402651584
orientation: 
  x: -2.02521411299e-05
  y: 1.32614594766e-06
  z: -0.999999995194
  w: 9.59202891974e-05

store it in arrays xyz and q
then i use :

robot_commander = moveit_commander.MoveGroupCommander('arm') //arm is the 6DOF Group of my Robot
robot_commander.set_position_target(xyz)
robot_commander.set_orientation_target(q)
plan = robot_commander.plan()
robot_commander.execute(plan) // besides: what is the difference to 'go()'  here?

and the resulting position is:

position:   
  x: 0.685057598278   
  y: -0.21755076457   
  z: 1.57268680334   
orientation:   
  x: -0.000313327718826  
  y: 0.000491862755421     
  z: 0.999999828845     
  w: 4.69705978272e-05

Which is ok when you only look at the orientation, but the position is off by more than 40cm.. I guess i could just save the joint states and let the robot move to them, but i want to know whats going on here? What am i missing?

edit retag flag offensive close merge delete

Comments

One thing to check is to make sure that the pose you loaded is expressed in whatever frame you are currently planning in. If the saved pose and the planned one don't have the same origin, you can get these kind of translational offsets.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-08 12:08:33 -0600 )edit

could you point me to a resource to learn more about that? I don't really know what you mean by "frame"

David_111 gravatar image David_111  ( 2017-06-08 12:29:38 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-06-08 13:34:40 -0600

v4hn gravatar image

use set_pose_target instead. In your code the planner is asked to get only the orientation right!

For your "besides" question: https://github.com/ros-planning/movei...

edit flag offensive delete link more

Comments

if it would only get the orientation right, what does the robot_commander.set_position_target(xyz) do?

David_111 gravatar image David_111  ( 2017-06-08 14:08:23 -0600 )edit
2

It only gets the position right. The MoveGroupInterface class that is used by the commander has different target modes: JOINT, POSITION, ORIENTATION, and POSE. When you call a set_*_target method, the active target mode becomes the one you called and the previous mode is overwritten.

v4hn gravatar image v4hn  ( 2017-06-08 14:23:41 -0600 )edit

Thanks! That should be mentioned in the tutorial...

David_111 gravatar image David_111  ( 2017-06-11 16:21:03 -0600 )edit

Could you point out a specific tutorial (we have a lot of them) and in the best case even provide a patch against the github repository? :)

v4hn gravatar image v4hn  ( 2017-06-12 02:51:06 -0600 )edit

i was referring to this tutorial... What tutorials are you talking about? :)

David_111 gravatar image David_111  ( 2017-06-15 04:22:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-08 11:59:54 -0600

Seen: 393 times

Last updated: Jun 08 '17