ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# how to plan a trajectory in cartesian space using OMPL

Hi!Guys! I use OMPL to plan a trajectory in Moveit! But it seems that OMPL just plan in joint space as default. I wonder can OMPL plan a trajectory in cartesian space in Moveit. I will be grateful if any of you could help! Thank you ! Yours sincerely!

edit retag close merge delete

Sort by ยป oldest newest most voted

There is a MoveIt! tutorial that talks about Cartesian paths here. Have you tried it? Here is the relevant part:

You can plan a cartesian path directly by specifying a list of waypoints for the end-effector to go through.

waypoints = []

waypoints.append(group.get_current_pose().pose)

# first orient gripper and move forward (+x)
wpose = geometry_msgs.msg.Pose()
wpose.orientation.w = 1.0
wpose.position.x = waypoints[0].position.x + 0.1
wpose.position.y = waypoints[0].position.y
wpose.position.z = waypoints[0].position.z
waypoints.append(copy.deepcopy(wpose))

# second move down
wpose.position.z -= 0.10
waypoints.append(copy.deepcopy(wpose))

# third move to the side
wpose.position.y += 0.05
waypoints.append(copy.deepcopy(wpose))


We want the cartesian path to be interpolated at a resolution of 1 cm which is why we will specify 0.01 as the eef_step in cartesian translation. We will specify the jump threshold as 0.0, effectively disabling it.

(plan3, fraction) = group.compute_cartesian_path(
waypoints,   # waypoints to follow
0.01,        # eef_step
0.0)         # jump_threshold

print "============ Waiting while RVIZ displays plan3..."
rospy.sleep(5)

more

I wonder if it can plan a Cartesian path in visual editor RVIZ using ompl. Just use the "plan and execute" button and some other configuration it can plan a Cartesian path visually in RVIZ. Thank you!

( 2016-03-27 19:53:20 -0600 )edit

I interpolate straight line with compute_cartesian_path(), but the calculated joint accelerations are very big even if I modify the jump_threshold value, do you know how to improve it?

( 2016-08-02 22:16:09 -0600 )edit

I'm not sure, you might want to open a new question.

( 2016-08-04 06:52:31 -0600 )edit