The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Don't assert on invalid pose

ensure_valid_position_and_orientation() inserts fallback poses when
driver reported poses are invalid.

-9
-3
src/xrt/state_trackers/oxr/oxr_session.c
··· 210 210 &timestamp, &relation); 211 211 212 212 // clang-format off 213 - // Function above always makes the pose valid. 214 - assert((relation.relation_flags & XRT_SPACE_RELATION_POSITION_VALID_BIT) != 0); 215 - assert((relation.relation_flags & XRT_SPACE_RELATION_ORIENTATION_VALID_BIT) != 0); 216 213 *pose = relation.pose; 217 214 218 215 bool valid_vel = (relation.relation_flags & XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT) != 0;
-6
src/xrt/state_trackers/oxr/oxr_xdev.c
··· 147 147 oxr_xdev_get_relation_at(log, inst, xdev, name, at_time, 148 148 out_pose_timestamp_ns, &relation); 149 149 150 - // Function above makes them valid. 151 - // clang-format off 152 - assert((relation.relation_flags & XRT_SPACE_RELATION_POSITION_VALID_BIT) != 0); 153 - assert((relation.relation_flags & XRT_SPACE_RELATION_ORIENTATION_VALID_BIT) != 0); 154 - // clang-format on 155 - 156 150 out_pose->position = relation.pose.position; 157 151 out_pose->orientation = relation.pose.orientation; 158 152 }