robosuite icon indicating copy to clipboard operation
robosuite copied to clipboard

Finger joints not moving for GR1 with inspire hands

Open chaitanya1chawla opened this issue 1 year ago • 3 comments

System Info

Robosuite version: 1.5.0

Information

Tried spawning GR1ArmsOnly with inspire hands, but not able to control the finger joints.

I tried sending commands through env.step(action) as well as setting directly, via env.sim.data.ctrl[i] with a torque control. Am I missing something?

    env = suite.make(
        env_name="Lift",
        robots="GR1ArmsOnly",
        gripper_types=["InspireRightHand", "InspireLeftHand"],
        env_configuration="bimanual",
        render_camera="agentview",
        controller_configs=load_controller_config(default_controller="OSC_POSE"), ##  args.controller_config
        has_renderer=True,
        has_offscreen_renderer=False,
        control_freq=20,
        ignore_done=True,
        use_camera_obs=False,
        reward_shaping=True,
        hard_reset=False,
    )
    env = VisualizationWrapper(env, indicator_configs=None)

    while True:
             obs=env.reset()
             env.render()
             flag=True
                   while flag=True:
                           action[:] += 0.001  # The arm joints move, but not the finger joints.
                           obs, reward, done, info = env.step(action)
                           env.render()

chaitanya1chawla avatar Nov 22 '24 23:11 chaitanya1chawla

Hi, @chaitanya1chawla I think this is because you use OSC_POSE here, which has undefined behavior for humanoid robots now. For all embodiments with multiple arms, we suggest to use the composite_controller, you can pass whole_body_ik.json or default_mink_ik_gr1.json as your controller. Just change the OSC_POSE to the absolute path of the config. That should allow you to move the fingers.

xieleo5 avatar Nov 26 '24 04:11 xieleo5

A more concrete example: Just change the line to load_composite_controller_config(robot="GR1"), you should be able to see finger movements.

xieleo5 avatar Nov 26 '24 21:11 xieleo5

Also, for dexterous hands. You need to make sure your controller config sets use_action_scaling=false for gripper. That will disable the action normalization for gripper and makes finger movements normal, otherwise you will see a curled finger:

"gripper": {
    "type": "GRIP",
    "use_action_scaling": false
}

xieleo5 avatar Nov 26 '24 22:11 xieleo5