Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new APIs for motion, accel and gryo streams #3225

Conversation

SamerKhshiboun
Copy link
Contributor

@SamerKhshiboun SamerKhshiboun commented Oct 10, 2024

  • Used frame.as<rs2::motion_frame>().get_combined_motion_data() for Motion stream (available in DDS devices only)
  • Used frame.as<rs2::motion_frame>().get_motion_data() for Accel and Gyro (available in USB devices)
  • Tracked on LRS-847

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
---

@SamerKhshiboun SamerKhshiboun requested a review from Nir-Az October 10, 2024 08:18
@SamerKhshiboun SamerKhshiboun merged commit ee94dc9 into IntelRealSense:ros2-development Oct 10, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants