MCPcopy Create free account
hub / github.com/SHAILAB-IPEC/OpenFly-Platform / calculate_camera_position_from_world

Function calculate_camera_position_from_world

scripts/sim/common.py:139–145  ·  view source on GitHub ↗

Given camera_position_world and the transpose of the rotation matrix R_t, calculate the translation vector T.

(R_t, camera_position)

Source from the content-addressed store, hash-verified

137 return QW, QX, QY, QZ
138
139def calculate_camera_position_from_world(R_t, camera_position):
140 """
141 Given camera_position_world and the transpose of the rotation matrix R_t,
142 calculate the translation vector T.
143 """
144 T = -R_t.dot(camera_position)
145 return T
146
147def world2cam(x, y, z, roll, pitch, yaw):
148 R = euler_to_rotation_matrix(roll, pitch, yaw)

Callers 2

world2camFunction · 0.70
world2cam_WXYZFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected