-
Notifications
You must be signed in to change notification settings - Fork 248
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
Composable Player
and Recorder
nodes
#902
Comments
Also interested in having composable and IPC player capability. What is the current status for Humble ? Any plans ? |
Is introducing PR #892 an option? I don't think it would interfere with implementing a better solution later down the road and it would keep my stopgap solution alive. |
Is someone already tackling this? @Karsten1987? Otherwise, I may try to open a PR as soon as I find some spare time. rosbag2/rosbag2_transport/src/rosbag2_transport/player.cpp Lines 92 to 99 in 0b17e4d
|
@roncapat - @Karsten1987 has moved on to other projects and hasn't been working on rosbag2 for a while, none of the active maintainers currently have this on their plate, so contribution is very welcome. Perhaps you'd like to attend the rosbag2 working group Friday morning to discuss the design? https://calendar.google.com/calendar/u/0/embed?src=agf3kajirket8khktupm9go748@group.calendar.google.com (note default UTC time zone, it's 9am Pacific). If that's not feasible for you we can discuss over GitHub - feel free to open draft PRs early in development and ping @MichaelOrlov and myself to talk about overall structure. |
@emersonknapp thank you very much for feedback! I'll try (and let you know) if I can manage to align friday meeting in my agenda, otherwise I will surely draft something here on github and discuss with you here - happy to contribute if I can :) |
So, let's start with the first issue: Do you have an opinion on this, or experience from other packages? Can we afford to loose half of the positive interval for those values? My personal answer is: of course yes (see below) but looks a bit ugly to be forced by parameter system not to parse an unsigned integer. So I'd implement some ugly-yet-needed type casts there... Example to prove we are not loosing anything concrete here:
|
Personal opinion on that opinion - it ain't ugly if it's needed. We can just validate that the parameters are positive, and cast them to the necessary types. No big deal. Anybody who wants that extra range is doing something very special and can work around it by not using Parameters for configuration. |
Thanks! BTW, the linked PR builds fine, but I will probably have time to test it properly not earlier than August. If you have time to review even part of the proposed code in the meantime, I will be very happy to incorporate feedbacks :) |
Any update on this one folks 👼 ? I'm happy to jump and help if that's neccesary |
Working hard right now on this prerequisite #1476! Feel free to follow or suggest improvements of course. #1476 started as a small tweak to better support configurability of QoS from parameter files, and became quite a huge patch due to all the inter-dependencies here-and-there in the codebase. |
@nachovizzo lots of updates on the associated PR #1419. Would you like testing / provide some feedback? |
* Squasgh to ease rebase Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Remove TODO for keyboard handlers Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Change structure Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * QoS parsing Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Uncrustify Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Draft comparison of passed vs parsed params Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix shared_from_this() issue, param file & paths Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fixes after rebase Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fixes to handle durations Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Better test output Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Drafting record param test Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fixing recorder issues Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fixes Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Draft component load test Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Composition tests working Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Uncrustify Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Cpplint Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Cpplint Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix play_offset bug Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix storage defaults bug Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Get rid of temporal conversion crutches using map<string, Rosbag2QoS> Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Use const ref to node in the options getter functions - Also made a style clean up in getter functions Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Cleanups in get_storage(/play/record)_options functions Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Move RosBag2RecordTestFixture insight test_record_params.cpp Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Rename overrides.yaml to the qos_profile_overrides.yaml file Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Rename params_player.yaml to the player_node_params.yaml Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Rename params_recorder.yaml to the recorder_node_params.yaml Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Replace Rosbag2Duration by rclcpp::Duration Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Cleanup in functions which are getting values from node parameters - Address issues in duration and integer parameters conversion - Introduce `declare_integer_node_params(..)` and `get_duration_from_node_param(..)` helper functions Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Bugfix. Adjust min-max ranges for get_duration_from_node_param(..) - Also add expected range to the exception message Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Initial comparisons Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Move component manager in fixture Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Uncrustify Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Remove residual AMENT_DEPS after merge Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Complete test_play_params Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Finish param tests Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Uncrustify Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Cleanups in player/recorder parameters and load components tests Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Renames in player/recorder parameters and load components tests Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Namespaced parameters Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Fix load_composable_components test Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Automatically start playback in "composable" Player constructor - Added doxygen comments for Player's constructors Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add integration test for composable player - Integration test will check that player can automatically play file after composition Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add missing dependencies to the mock_player.hpp Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Automatically start recording in "composable" Recorder constructor - Added doxygen comments for Recorder's constructors Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Adopt existent tests for auto starting recording after composition - Add default "cdr" value for rmw_serialization_format node parameter Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add integration test for composable recorder - Test verify that recorder can automatically start recording after composition and record messages Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add missed parameters prefixes after rebase Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Fix for failing test with wrong check for playback_until_timestamp Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Fix for failing tests with wrong parameters deduction - Adjust max bagfile size and duration due to the bug in the rc_yaml_param_parcer/parser.c Need to use srtoll() instead of the strol() in parser Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Close recorder before trying to delete temp files on test destruction Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Update rosbag2_transport/test/rosbag2_transport/composition_manager_test_fixture.hpp Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Update rosbag2_transport/test/rosbag2_transport/test_composable_recorder.cpp Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Update rosbag2_transport/CMakeLists.txt Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Update rosbag2_transport/CMakeLists.txt Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Address warnings from Windows CI job in composable player and recorder Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Update rosbag2_transport/src/rosbag2_transport/config_options_from_node_params.cpp Co-authored-by: Michael Orlov <morlovmr@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> * Update rosbag2_transport/test/rosbag2_transport/test_composable_player.cpp Co-authored-by: Michael Orlov <morlovmr@gmail.com> Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> --------- Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com> Signed-off-by: roncapat <ronca.pat@gmail.com> Signed-off-by: Michael Orlov <michael.orlov@apex.ai> Co-authored-by: Michael Orlov <michael.orlov@apex.ai> Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Sorry, I missed this notification. Silly me. Feedback: Extremely happy to see this got merged :D Great job man!!! |
No worries, still valid :) If you ever happen to leverage this feature and discover issues, tag me and let me know! |
Sure thing ;) |
Description
To enable intra-process bag replaying and recording, sometimes necessary when dealing with high-frequency and/or high-bandwidth data streams, both
rosbag2_transport::Player
androsbag2_transport::Recorder
nodes have to be exposed asrclcpp
components.Completion Criteria
rosbag2_transport::Player
node configuration via parameters.rosbag2_transport::Player
node as a component.rosbag2_transport::Recorder
node configuration via parameters.rosbag2_transport::Recorder
node as a component.Testing Notes / Suggestions
Updating
test_record.cpp
andtest_play.cpp
to use intra-process comms and inter-process comms for their nodes should do.The text was updated successfully, but these errors were encountered: