Locking position of elements in space

I am currently developing a robot and experience slipping of the endeffector on the surface.
Is there I way I can lock the position of the endeffector when it has ground contact, inside of a python script which I would attach to the endeffector.

I tried to use locked pos axis in the UI but once I send commands over ROS2 and the articulation controller these settings are ignored.

Hi @mla_d - In Isaac Sim, the end effector’s position is controlled by the robot’s joint angles, which are in turn controlled by the robot’s controller. If the end effector is slipping, it might be due to the controller not being able to maintain the desired joint angles, or due to physical simulation inaccuracies.

If you want to lock the position of the end effector when it has ground contact, you would need to implement this in your controller. When the end effector has ground contact, you could stop sending new commands to the controller, effectively locking the end effector’s position. You could use a contact sensor or similar to detect when the end effector has ground contact.

Here’s a rough example of how you could implement this in Python:

from omni.isaac.dynamic_control import _dynamic_control

dc = _dynamic_control.acquire_dynamic_control_interface()

# Get the handle to the end effector
end_effector = dc.get_articulation_dof_state('/World/robot/end_effector')

# Check if the end effector is in contact with the ground
if end_effector.contact:
    # If the end effector is in contact with the ground, stop sending new commands
    dc.set_articulation_dof_velocity_targets('/World/robot', [])
    # If the end effector is not in contact with the ground, send the desired commands
    dc.set_articulation_dof_velocity_targets('/World/robot', desired_commands)

Please note that this is a simplified example and you would need to adapt it to your specific use case. Also, the actual implementation might be more complex, depending on the specifics of your robot and controller.

As for the “locked pos axis” setting in the UI, this is likely being overridden by the commands sent by the controller. The controller has full control over the robot’s joint angles, and any manual settings in the UI will be overridden when the controller sends new commands.