Skip to content

Add rosbag2 ROS2 playback test - #3511

Merged
Nir-Az merged 3 commits into
realsenseai:ros2-developmentfrom
AviaAv:rsdev-6966-ros2-db3-play-test
Apr 29, 2026
Merged

Nir-Az merged 3 commits into
realsenseai:ros2-developmentfrom
AviaAv:rsdev-6966-ros2-db3-play-test

Conversation

@AviaAv

@AviaAv AviaAv commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Tracked on: [RSDEV-6966]

Copilot AI review requested due to automatic review settings April 23, 2026 10:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new pytest integration test to validate that a RealSense-converted ROS1 .bag → ROS2 rosbag2 (.db3) conversion can be replayed via ros2 bag play while preserving exact image payload bytes.

Changes:

  • Introduce a new rosbag2 playback test that converts outdoors_1color.bag to .db3
  • Subscribe to key image topics during playback and compare frame payload hashes vs. the source bag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AviaAv
AviaAv force-pushed the rsdev-6966-ros2-db3-play-test branch 8 times, most recently from 35b4d6a to 7df78e8 Compare April 26, 2026 11:16
@AviaAv
AviaAv force-pushed the rsdev-6966-ros2-db3-play-test branch from 7df78e8 to aecb916 Compare April 26, 2026 12:32
@AviaAv
AviaAv requested a review from Nir-Az April 26, 2026 12:49
@@ -0,0 +1,102 @@
# Copyright 2026 RealSense, Inc. All Rights Reserved.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add a live camera test too please.
Record and use ros2 play to play it

@AviaAv AviaAv Apr 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rs_help = subprocess.run([rs_convert, "--help"], capture_output=True).stdout.decode()
if "output-db3" not in rs_help:
pytest.skip(f"{rs_convert} predates --output-db3; rebuild librealsense from source")
assert subprocess.run(["ros2", "bag", "--help"],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLease check

  • ros2 bag --help is a weak presence check — that subcommand returns 0 even when ros2bag isn't installed (the help
    text just lists no verbs). ros2 bag play --help is a stricter probe.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@AviaAv
AviaAv requested a review from Nir-Az April 29, 2026 06:34

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nir-Az
Nir-Az merged commit bafc03d into realsenseai:ros2-development Apr 29, 2026
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.

3 participants