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

how to plan a trajectory in cartesian space using OMPL

asked 2016-03-24 21:16:41 -0500

gutianqi gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-25 06:03:24 -0500

Airuno2L gravatar image

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 = []

# start with the current pose
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)
edit flag offensive delete link more

Comments

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!

gutianqi gravatar image gutianqi  ( 2016-03-27 19:53:20 -0500 )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?

Qt_Yeung gravatar image Qt_Yeung  ( 2016-08-02 22:16:09 -0500 )edit

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

Airuno2L gravatar image Airuno2L  ( 2016-08-04 06:52:31 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-03-24 21:16:41 -0500

Seen: 1,142 times

Last updated: Mar 25 '16