Closed SamerKhshiboun closed 1 month ago
frame.as<rs2::motion_frame>().get_combined_motion_data()
frame.as<rs2::motion_frame>().get_motion_data()
See 3 run examples below (without moving the camera...):
Combined motion example (DDS):
header: stamp: sec: 1728547659 nanosec: 343172042 frame_id: camera_motion_optical_frame orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 orientation_covariance: - -1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 angular_velocity: x: 0.0021305288555595325 y: 0.0025965820427131803 z: -0.003595267443756711 angular_velocity_covariance: - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 linear_acceleration: x: -0.5512649710794904 y: 9.267356728798859 z: -3.2169094322114233 linear_acceleration_covariance: - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 ---
Accel example (USB device)
header: stamp: sec: 1728547763 nanosec: 259789795 frame_id: camera_accel_optical_frame orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 orientation_covariance: - -1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 angular_velocity: x: 0.0 y: 0.0 z: 0.0 angular_velocity_covariance: - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 linear_acceleration: x: 0.5589790344238281 y: 9.247671127319336 z: 3.2263877391815186 linear_acceleration_covariance: - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 ---
Gyro example: (USB device)
header: stamp: sec: 1728547754 nanosec: 421228516 frame_id: camera_gyro_optical_frame orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 orientation_covariance: - -1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 angular_velocity: x: 0.005858954507857561 y: 0.0023302659392356873 z: 0.0038615837693214417 angular_velocity_covariance: - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 linear_acceleration: x: 0.0 y: 0.0 z: 0.0 linear_acceleration_covariance: - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 - 0.0 - 0.0 - 0.0 - 0.01 ---
frame.as<rs2::motion_frame>().get_combined_motion_data()
for Motion stream (available in DDS devices only)frame.as<rs2::motion_frame>().get_motion_data()
for Accel and Gyro (available in USB devices)See 3 run examples below (without moving the camera...):
Combined motion example (DDS):
Accel example (USB device)
Gyro example: (USB device)