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

[WIP] Make Player a rosbag2 component (instead of rosbag2_transport #1603

Open
wants to merge 5 commits into
base: rolling
Choose a base branch
from

Conversation

roncapat
Copy link
Contributor

@roncapat roncapat commented Apr 9, 2024

Closes #1736

This is a proposal to address https://github.com/ros2/rosbag2/pull/1510/files#r1484600093.

CC @MichaelOrlov @fujitatomoya

NOTE: I compiled it and the component gets correclty exposed via ros2 component types but I haven't tested it yet.

If it works, I extend it also to Recorder and then it's ready for merge.

@roncapat roncapat changed the title Make Player a rosbag2 component Make Player a rosbag2 component (instead of rosbag2_transport Apr 9, 2024
@MichaelOrlov MichaelOrlov changed the title Make Player a rosbag2 component (instead of rosbag2_transport [WIP] Make Player a rosbag2 component (instead of rosbag2_transport Apr 10, 2024
@roncapat roncapat marked this pull request as ready for review June 27, 2024 15:14
@roncapat roncapat requested a review from a team as a code owner June 27, 2024 15:14
@roncapat roncapat requested review from gbiggs and hidmic and removed request for a team June 27, 2024 15:14
Signed-off-by: Patrick Roncagliolo <[email protected]>
@roncapat roncapat force-pushed the components/move_to_rosbag2 branch from 14a3681 to 7a80a0e Compare December 9, 2024 08:26
@roncapat
Copy link
Contributor Author

roncapat commented Dec 9, 2024

@MichaelOrlov may I ask if you are still interested in this, and if the proposed method is ok for you, so I can apply the same strategy for Recorder??

- Cleanups in CMakeLists.txt
- Expose only the necessary constructors in rosbag2::player
- Add visibility control
- Add missing dependencies in package.xml
- Add component_player.hpp file

Signed-off-by: Michael Orlov <[email protected]>
Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

Hi @roncapat, Yes, I am still interested in this PR.
However, it is too long to describe what needs to be changed.
Instead, I did prototyping and made a couple of direct commits to your branch. Please see c00bf42 and 4f6414e

Please review the changes and feel free to add a composable_recorder.{hpp}cpp file in a similar way.

I've tested loading a new composable rosbag2::Plyer in my local setup and can confirm that it is compiles and runs as expected. However, it would be good to add some unit tests.

To test it I ran in one terminal

ros2 run rclcpp_components component_container

in another terminal

ros2 component load /ComponentManager rosbag2 rosbag2::Player -p storage.uri:=/recordings/talker/talker.mcap -p play.loop:=true

After that, you can try to run ros2 component list and ros2 topic echo /topic to make sure that rosbag2::Player composable node is up and running.

I took talker.mcap from the https://github.com/ros2/rosbag2/blob/rolling/rosbag2_py/test/resources/mcap/talker/talker.mcap

@@ -72,9 +72,11 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
yaml-cpp::yaml-cpp
)

# rosbag2_transport::Player composable node is deprecated. Please use rosbag2::Player instead
Copy link
Contributor

Choose a reason for hiding this comment

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

@clalancette Do you have any idea how to deprecate early added "rosbag2_transport::Player" registered rclcpp component node from further usage?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh never mind. I found a way how to put a deprecation notice. See 8751ebf for details.

cc: @roncapat

@roncapat
Copy link
Contributor Author

@MichaelOrlov looks nice to me! As soon as I have a bit of time, I will do the same for Recorder class.

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.

Strange location of recorder and player executables
2 participants