concepts.simulator.pybullet.camera.lookat_rpy#

lookat_rpy(camera_pos, target_pos, roll=0)[source]#

Construct the roll, pitch, yaw angles of a camera looking at a target. This function assumes that the camera is pointing to the z-axis ([0, 0, 1]), in the camera frame.

Parameters:
  • camera_pos (ndarray) – the position of the camera.

  • target_pos (ndarray) – the target position.

  • roll (float) – the roll angle of the camera.

Returns:

a numpy array of the roll, pitch, yaw angles in degrees.

Return type:

ndarray