utils
Utility methods for working with object poses and keypoints.
- trifinger_rl_datasets.utils.get_keypoints_from_pose(pose, num_keypoints=8, dimensions=(0.065, 0.065, 0.065))[source]
Calculate keypoints (coordinates of the corners of the cube) from pose.
- Parameters:
pose – Object pose containing position and orientation of cube.
num_keypoints – Number of keypoints to generate.
dimensions – Dimensions of the cube.
- Returns:
Array containing the keypoints.
- trifinger_rl_datasets.utils.get_pose_from_keypoints(keypoints, dimensions=(0.065, 0.065, 0.065))[source]
Calculate pose (position, orientation) from keypoints.
- Parameters:
keypoints – At least three keypoints representing the pose.
dimensions – Dimensions of the cube.
- Returns:
Tuple containing the coordinates of the cube center and a quaternion representing the orientation.