Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finger joints not moving for GR1 with inspire hands #578

Open
chaitanya1chawla opened this issue Nov 22, 2024 · 3 comments
Open

Finger joints not moving for GR1 with inspire hands #578

chaitanya1chawla opened this issue Nov 22, 2024 · 3 comments
Assignees

Comments

@chaitanya1chawla
Copy link

chaitanya1chawla commented Nov 22, 2024

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()
@xieleo5
Copy link
Contributor

xieleo5 commented Nov 26, 2024

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
Copy link
Contributor

xieleo5 commented Nov 26, 2024

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

@xieleo5
Copy link
Contributor

xieleo5 commented Nov 26, 2024

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants