pyrobosim.manipulation.grasping.GraspGenerator.compute_robot_facing_rot
- GraspGenerator.compute_robot_facing_rot(object_pose=Pose: [x=0.00, y=0.00, z=0.00, qw=1.000, qx=0.000, qy=-0.000, qz=0.000], robot_pose=None)
Computes the rotation matrix to convert from nominal cuboid orientation to robot-facing orientation.
The nominal orientation is such that the front face of the cuboid is -X, the sides are -Y and +Y, and the top is +Z, as shown below:
Z +----+ ^ robot --> | | | +----+ +--> X
If the robot is facing from another direction, for example the left side, then the front face in the robot reference frame is the +Y and the side faces are -X and +X. This function therefore returns the rotation matrix to perform this alignment to correspond which of the 6 cuboid faces corresponds to directions such as “front”, “right”, “top”, etc. from the perspective of the robot.
- Parameters:
object_pose (
pyrobosim.utils.pose.Pose
, optional) – The pose of the object center, defaults to identity transformrobot_pose (
pyrobosim.utils.pose.Pose
, optional) – The pose of the robot. If none specified, it is not used in calculations.
- Returns:
Rotation matrix transforming the nominal cuboid orientation to a robot-facing orientation
- Return type:
numpy.ndarray