Faulty Initialization of IKSolver in WholeBodyIK?
Hello!
I am trying to get the WholeBodyIK to work for the PandaOmron and was trying to set it to relative action so that I can test that the robot rests when given a zero vector. Since the result was not as expected, it stepped through the code and noticed that IKSolver.input_action_repr remained absolute even when I set relative in the config. I think I have tracked the error to this line: https://github.com/ARISE-Initiative/robosuite/blob/77a4751233c29456a5381209e30dd0dbf39a6557/robosuite/controllers/composite/composite_controller.py#L476
As I understand it, the argument should actually be input_action_action_repr and the default absolute.
Could you confirm if I understood that correctly?
Cheers!
Attaching my config for completeness:
{
"type": "WHOLE_BODY_IK",
"composite_controller_specific_configs": {
"ref_name": ["gripper0_right_grip_site"],
"interpolation": null,
"actuation_part_names": ["torso", "base", "right"],
"max_dq": 4,
"nullspace_joint_weights": {
"robot0_torso_lift_joint": 100.0
},
"ik_pseudo_inverse_damping": 5e-2,
"ik_integration_dt": 1e-1,
"ik_max_dq": 4.0,
"ik_max_dq_torso": 0.2,
"ik_input_rotation_repr": "quat_wxyz",
"ik_input_type": "relative",
"verbose": false
},
"body_parts": {
"right": {
"type": "JOINT_POSITION",
"input_max": 1,
"input_min": -1,
"input_type": "absolute",
"output_max": 10,
"output_min": -10,
"kp": 150,
"kp_limits": [0, 1000],
"damping_ratio_limits": [0, 10],
"interpolation": null,
"ramp_ratio": 0.2,
"gripper": {
"type": "GRIP"
}
},
"torso": {
"type": "JOINT_POSITION",
"interpolation": "null",
"kp": 2000
},
"base": {
"type": "JOINT_VELOCITY",
"interpolation": "null"
}
}
}
Hi, it seems that WholeBodyIK is somewhat problematic at the moment even with absolute control, which we are looking into. In the meantime, would it be possible for you to use the default controller that comes with the PandaOmron: HYBRID_MOBILE_BASE? It works with delta actions out of the box
Hi, thanks for getting back to me on this. I actually wanted to use the absolute controller but also found that to be wonky, so I thought checking the relative mode first would make it easier because the neutral action is clearly defined.
While debugging the absolute controller, I have found that it behaves fine if I remove null-space control. I hard-coded self.Kn in https://github.com/ARISE-Initiative/robosuite/blob/3cacd1d1516b250b4d824bbf4e09204d9d4128c2/robosuite/utils/ik_utils.py#L92 to 0, which led to the controller behaving normally. I don't exactly know how the null-space term works, but maybe this helps your investigation.
Cheers!
Probably too late to be useful, but I added a PR to support WHOLE_BODY_IK with PandaOmron: https://github.com/ARISE-Initiative/robosuite/pull/754 (example command at the bottom)