-
Notifications
You must be signed in to change notification settings - Fork 22
Add G1 manipulation task #85
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
download_and_extract_meshes we should use this function for the mesh files.
| </body> | ||
| </body> | ||
| <!-- object to be manipulated--> | ||
| <body name="box" pos="0.4 0 1" quat="1 0 0 0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could split this one out of the G1 torso model
| </sensor> | ||
|
|
||
| <keyframe> | ||
| <key name="stand" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the name of the key frame
| super().__init__(model_path, sim_model_path=sim_model_path) | ||
|
|
||
| # object indices | ||
| self.object_pose_adr = self.get_joint_position_start_index("box_joint") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the methods we have in starfish:
get_joint_dof
get_control_indices
get_vel_indices
get_pos_indices
| def actuator_ctrlrange(self) -> np.ndarray: | ||
| """Mujoco actuator limits for this task.""" | ||
| limits = self.model.actuator_ctrlrange.copy() | ||
| limits[0:3, 0] = -0.001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if there is a more elegant way to do this
|
|
||
| # check whether goal quat needs to be updated | ||
| goal_quat = self.system_metadata["goal_quat"] | ||
| q_diff = quat_diff(self.data.qpos[self.object_quat_slice], goal_quat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the axis angle math from mujoco to compute the quaternion difference, the angle is then easier to extract
| """Implements the G1 manipulation task reward.""" | ||
| if system_metadata is None: | ||
| system_metadata = {} | ||
| goal_pos = system_metadata.get("goal_pos", np.array([0.5, 0.0, 0.85])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we define capitalized constants at the top of the file for these values, they show up a couple of times in the file.
slecleach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some comments, the main issue are the STL files.
Adds a box-manipulation task for G1 (upper body only)
@slecleach I used the same parameters we have internally, but the robot seems a bit stuck, could you take a look if there's anything obvious missing?