No effect of `motion.orientation_loss_weigh`

💬 Open
Alban Laflaquiere


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.


3 months ago

Yahav changed status to 💬 Open

1 month ago

Lars Berscheid changed status to ✅ Closed

1 month 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    1 month ago    Reply

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    1 month ago    Reply

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    3 weeks ago    Reply

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    2 weeks ago    Reply

Yahav changed status to 🤖 Working on it!

3 months ago


This will be fixed in the upcoming release!

0    3 months ago    Reply

One vote