Conversation
There was a problem hiding this comment.
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.
We could split this one out of the G1 torso model
| </sensor> | ||
|
|
||
| <keyframe> | ||
| <key name="stand" |
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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?