Skip to content

Conversation

@Abhiram824
Copy link
Member

What this does

Fixes #737

It specifically fixes two issues when initializing two robots.

  1. Reference poses in WHOLE_BODY_IK were incorrect for the second robot in any TwoArmEnv
  2. With absolute action control, the pose of the robot not being controlled is not maintained

How it was tested

Run any environment with two robots with absolute action control before and after these changes were made for example

python robosuite/scripts/collect_human_demonstrations.py --environment TwoArmLift --device spacemouse --robots Panda Panda --config parallel --controller WHOLE_BODY_IK

Before the changes the second robot will never stay in the same pose when not being controller After these changes they do

@kevin-thankyou-lin
Copy link
Contributor

we do need the same change for whole_body_mink_ik.json? would things work if we directly set gripper0_ instead of gripper{idx}?

@Abhiram824
Copy link
Member Author

we do need the same change for whole_body_mink_ik.json? would things work if we directly set gripper0_ instead of gripper{idx}?

good point, ill update mink as well

all_robot_action_dicts.append(action_dict)
continue

inactive_robot_ac_dict = copy.deepcopy(all_prev_gripper_actions[i])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting inactive robot action as prev gripper action is confusing to me, as in active robot action seems more than just gripper. Can we rename things to be more intuitive?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good points my bad, Ill refactor accordingly

raise NotImplementedError


def get_abs_arm_static_target(robot, arm, env):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why's the fn called get_abs_arm_static_target? what's an absolute arm? does it mean arm's controller is absolute and doesn't work for relative action space? Can the function just be to get_arm_target() or get_arm_current_target?


def get_arm_ref(env, robot, arm):
"""
Extracts the reference pose of the specified arm of the robot.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's reference pose? the world pose target? docs might be confusing to users

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

Successfully merging this pull request may close these issues.

Two Arm Environments for Whole_BODY_IK composite controller does not correctly move the second arm

3 participants