Weird behavior in franka robot when no input command during simulation in Orbit

Hello,

I’m working with a cartesian impedance controller for a panda robot and I found something weird in the behavior of the robot when the input command is 0 for the robot. The robot lifts as you can see in this video:

Uploading: PXL_20240508_094208157.mp4…

Also in the task-space controller tutorial, I edited the given run_diff_ik.py so the input commands are 0 too and the robot mimics the same movement. As far as I know, the robot shouldn’t be in a gravity compensation mode when there is no input for the robot? What I’m missing here?

I’m loading the robot via usd file:

    # articulation
    robot = FRANKA_PANDA_HIGH_PD_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")
    robot.init_state = FRANKA_PANDA_HIGH_PD_CFG.init_state.replace( 
        joint_pos={
            "panda_joint1": 0.0,
            "panda_joint2": -0.569,
            "panda_joint3": 0.0,
            "panda_joint4": -2.810,
            "panda_joint5": 0.0,
            "panda_joint6": 3.037,
            "panda_joint7": 0.741,
            "panda_finger_joint.*": 0.04,
        },
    )

Also I started digging into FRANKA_PANDA_HIGH_PD_CFG to try to understand if it is related to a gravity term or what. So far, I dont see how to fix this, the code has some terms related to gravity but I’m not sure if I’m on the right path:

FRANKA_PANDA_CFG = ArticulationCfg(
    spawn=sim_utils.UsdFileCfg(
        usd_path=f"{ISAAC_ORBIT_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd",
        activate_contact_sensors=False,
        rigid_props=sim_utils.RigidBodyPropertiesCfg(
            **disable_gravity=False,**
            max_depenetration_velocity=5.0,
        ),

In my mind the robot should stand still in the position if no input is given (of course if the compensation is previously implemented). Please any input on this would very helpful for me to understand whats going on here.

Edit: How can I disable the gravity compensation in panda robot? I tried disabling when creating the articulation but it doesnt work:

    # articulation
    robot = FRANKA_PANDA_HIGH_PD_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")
    robot.init_state = FRANKA_PANDA_HIGH_PD_CFG.init_state.replace( 
        joint_pos={
            "panda_joint1": 0.0,
            "panda_joint2": -0.569,
            "panda_joint3": 0.0,
            "panda_joint4": -2.810,
            "panda_joint5": 0.0,
            "panda_joint6": 3.037,
            "panda_joint7": 0.741,
            "panda_finger_joint.*": 0.04,
        },
    )
    robot.spawn.rigid_props.disable_gravity = True
    FRANKA_PANDA_HIGH_PD_CFG.spawn.rigid_props.disable_gravity = True

Thanks in advance and regards.

I found the issue here:

Issue strange behaviour in franka robot

“”
The franka implements Ideal PD Actuators, and the joint position target is not set in mdp.JointEffortAction or mdp.JointVelocityAction, so it is initialised to zeros.

If you already compute torques with your own controller, I think the best way is to just set k_p and k_d to 0 with

robot = FRANKA_PANDA_CFG.copy()
robot.actuators["panda_shoulder"].stiffness = 0
robot.actuators["panda_shoulder"].damping = 0
robot.actuators["panda_forearm"].stiffness = 0
robot.actuators["panda_forearm"].damping = 0

Or otherwise have actions that set both position targets and velocity targets.

“”

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.