No effect of `motion.orientation_loss_weigh`

✅ Closed

Hello,

Using a

Motion

object, I tried to increase the

orientation_loss_weigh

attribute to get the robot end-effector to keep a fix orientation during the trajectory.

desired_motion = jacobi.Motion("my_motion", robot, start=start, goal=goal)
desired_motion.orientation_loss_weight = 0.5
desired_motion.orientation_target = [x_euler, y_euler, z_euler]

Unfortunately, I couldn't see any impact on the optimized trajectory. And this was true even for very large values of

orientation_loss_weight

. In my experiment, the end-effector always rotates the same to avoid the obstacle in front of it, although a path exist that would keep the orientation fixed.

Thanks

Alban Laflaquiere

7 months ago

Activity
Yahav changed status to ✅ Closed

4 months ago

Yahav changed status to 💬 Open

5 months ago

Lars Berscheid changed status to ✅ Closed

5 months ago

Lars Berscheid

Sorry for the late response here - this should be fixed already (by v0.0.24).

There was an issue when the orientation constraint was sometimes ignored when a direct point-to-point motion was possible.

0    5 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

Alban Laflaquiere

I tried again on v0.0.26 and

orientation_loss_weigh

still has no effect for me.
However, I just tried in Studio and the constraint there is working as expected. So, maybe I am not using the API properly.
Here is what I do:
start = jacobi.Waypoint(position=<current_joints_state>)
goal = jacobi.CartesianWaypoint(position=jacobi.Frame.from_quaternion(*<target_eef_pose>))
desired_motion = jacobi.Motion("my_motion", jacobi_robot, start=start, goal=goal)
desired_motion.orientation_loss_weight = 0.5  # or whatever value
euler_angles = jacobi.Frame.from_quaternion(0, 0, 0, *<desired_orientation_quaternion>).euler[3:]
desired_motion.orientation_target = euler_angles
desired_motion.soft_collision_start = True
trajectory_jacobi = jacobi_planner.plan(desired_motion)

Is that correct?

0    5 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

Lars Berscheid

@Alban Laflaquiere:

Ah, I see. The

orientation_target

should be a vector in world coordinates, pointing in the desired direction of the TCP. I'll make this more clear in the docs.

0    5 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

Alban Laflaquiere

@Lars Berscheid:

Do you mean that

orientation_target

should be a plain

[x, y, z, qw, qx, qy, qz]

list instead of a

jacobi.Frame

?

0    5 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

Alban Laflaquiere

@Lars Berscheid:
Nvm, I managed to get it working. You meant the euler angles in the world frame.

0    4 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

Yahav

@Alban Laflaquiere:
Great. I'm closing this issue.

0    4 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

Yahav changed status to 🤖 Working on it!

7 months ago

Yahav

This will be fixed in the upcoming release!

0    7 months ago    Reply

Comment must be at least 20 characters.
Cancel

We appreciate your feedback.

One vote