0
$\begingroup$

Rosanswers logo

I'm using the moveit_commander interface on the Fetch robot and trying to add a path constraint. Here's some example code:

    constraints = Constraints()
    oc = OrientationConstraint()
    oc.link_name = "wrist_roll_link"
    oc.header.frame_id = "base_link"
    oc.weight = 1.0
    oc.orientation = orientation #current wrist_roll_link orientation
    oc.absolute_x_axis_tolerance = 3.14
    oc.absolute_y_axis_tolerance = 3.14
    oc.absolute_z_axis_tolerance = 3.14
    constraints.orientation_constraints.append(oc)
    move_group.set_path_constraints(constraints)

Moveit still finds a plan, but the plan is seems to ignore the constraints and outputs an error that says:

/move_group GetPositionIK:1025: 0 is < negative number >

The results are the same for position and orientation constraints. The same code seemed to work in the past. Any ideas would be welcome!

-Sarah


Originally posted by velveteenrobot on ROS Answers with karma: 136 on 2017-06-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

did you figure this out?

The example you give is not restricting the orientation at all (tolerance = pi).


Originally posted by v4hn with karma: 2950 on 2017-06-27

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by velveteenrobot on 2017-06-27:
I didn't figure it out unfortunately. You're right that in my example the tolerance is just set to pi. I was using that code to test if the error still occurs when there isn't any constraint and it does. Even when you make the tolerance = pi, it still gives an error.

Comment by velveteenrobot on 2017-06-27:
And when the tolerance is not pi, it gives an error and ignores the constraint.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.