Skip to content

Conversation

@jbruedigam-bdai
Copy link
Collaborator

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?

Copy link
Collaborator

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">
Copy link
Collaborator

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"
Copy link
Collaborator

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")
Copy link
Collaborator

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

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)
Copy link
Collaborator

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]))
Copy link
Collaborator

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.

Copy link
Collaborator

@slecleach slecleach left a 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.

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.

3 participants