Robotics StackExchange | Archived questions

How to add constraints without getting collide with planning scene object?

Hi, everyone,

I'm using moveit default planner to plan the robotic arm. The robot arm can approach desired position without collision. But it will collide with planning scene objects if I add orientation constraint.

So how to approach to certain position with fixed orientation and without getting collide with planning scene object? Am I missing something here?

Thanks for any help.

Code examples of adding constraints:

move_group.set_pose_target(pose_goal)

constr = Constraints()
oc = OrientationConstraint()
oc.header.frame_id = move_group.get_planning_frame()
oc.link_name = move_group.get_end_effector_link()
oc.absolute_x_axis_tolerance = 0.05
oc.absolute_y_axis_tolerance = 0.05
oc.orientation = curr_pose.orientation
oc.weight = 1.0
constr.orientation_constraints.append(oc)
move_group.set_path_constraints(constr)

self.arm_torso_move_group.go(wait=True)
self.arm_torso_move_group.stop()
self.arm_torso_move_group.clear_pose_targets()

Asked by hiro_fy on 2023-07-17 08:00:07 UTC

Comments

Hi!

Can you confirm that when you plan to the same pose without the constraint, the robot reaches the desired pose without collisions?

Sorry for the trivial question, but is important to understand what you have tried in order to help you!

Asked by bluegiraffe-sc on 2023-07-18 11:04:18 UTC

Hi, @bluegiraffe-sc ,I'm pretty sure the robot can reaches the desired pose without collisions. And I've edited my problem to make it more clear.

Asked by hiro_fy on 2023-07-18 20:30:38 UTC

Answers