This component mixes several coordinate systems. The safest rule is: always state both the source frame and the target frame before applying a transform or drawing anything.
- This is the working convention for RGBD points and local robot motion in this component.
+X: robot right+Y: robot forward+Z: up- Positive yaw is mathematical CCW on the ground plane.
- The RGBD point cloud handled in
robot_conceptis already robot-aligned in this convention. Do not treat it as an optical-camera frame.
room_T_robot = get_transformation_matrix(room, robot)meansroom <- robot.- Room polygons, robot pose, and voxelized detections must all end up in this same room-local frame before rendering.
- In the current pipeline, voxel points are transformed with robot rotation and camera translation so they land in room coordinates.
- Read
A_T_Bas: coordinates ofB, expressed in frameA. get_transformation_matrix(room, robot)returns robot pose expressed in room frame.room.jsondefines the static chain. Relevant current edge:root -> Shadow: identityShadow -> zed: translation[0, -0.075, 0.945], yaw+1.57 rad
- The custom viewer does not render room coordinates directly.
- Current mapping used by
voxel_opengl_vieweris:X_gl = -X_roomY_gl = Z_roomZ_gl = Y_room
- This means the rendered scene is mirrored in X with respect to the room frame.
- The robot marker, room polygon, and voxels must all use the same mapping, or left/right will look wrong.
- For Qt3D rendering, use:
X_qt3d = -xY_qt3d = hZ_qt3d = y
- For a standard planar yaw
theta, the Qt3DRyangle used in this codebase is:alpha = pi + theta
- Webots uses a right-handed world with:
+Xforward+Yleft+Zup
- This is not the same as the RoboComp body convention used here.
- When comparing Webots poses with RoboComp body/room poses, be explicit about the axis swap and sign change.
In room_concept, incoming odometry is explicitly normalized to the local RoboComp body convention before fusion:
odom.adv = -pose.advodom.side = pose.sideodom.rot = -pose.rot
This keeps downstream math coherent with +Y forward and CCW-positive yaw.
- Internal localization state is handled as
room <- robot(robot pose expressed in room frame). - In DSR writing,
room_conceptmay publish the inverse (robot <- room) when the room node is parented under the robot. - Keep this distinction explicit: internal estimate frame and graph edge direction are not always the same thing.
SceneGraphModelhas a non-standard 2D rotation convention:ydir = (cos(theta), sin(theta))xdir = (sin(theta), -cos(theta))
object_footprints.huses the standard planar rotation matrix:R(yaw) = [[cos, -sin], [sin, cos]]
- Do not mix these two conventions when computing object footprints or viewer geometry.
- This note is for upstream/legacy integrations and is not the active runtime path of
robot_concept+room_concept.
Before trusting a result, answer these four questions:
- In which frame are the raw points or poses currently expressed?
- Which transform is being applied:
target <- sourceor the opposite? - Is the consumer expecting room coordinates, robot/body coordinates, OpenGL coordinates, or Qt3D coordinates?
- Is there an extra mirror or axis remap in the renderer?
If one of these answers is implicit, make it explicit in code or in a comment next to the transform.