-
Notifications
You must be signed in to change notification settings - Fork 0
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
ros1 mcap record and playback #4
Comments
The python example may be a better guide to what to do in C++ than the C++ examples: https://github.com/foxglove/mcap/blob/main/python/mcap-ros1-support/mcap_ros1/writer.py#L64-L69 then find in the C++ the equivalent of Or the mcap convert written in go is a good place to look for how it handles ros1 messages. |
Replace this |
Symlink to mcap includes for now, $DEST is ~/other/install
|
https://github.com/facontidavide/ros_msg_parser Does the ros message definition exist for live topics, not just in bags or mcaps? Where is it? This package suggests that it does, so any node could subscribe to anything and figure out the message contents. If it doesn't, why not store the definition in the topic somehow, or on a the parameter server (or similar)? Could see if that works in Zenoh. |
Have an example storing internally created ros1 Float64 messages into an mcap in C++, but will change to a subscriber (of type shapeshifter) next, then look at adapting rosbag recorder https://github.com/lucasw/ros_one2z/blob/main/one2z/src/mcap_recorder.cpp
I was thinking there was something more special about message definitions like this:
But I think the string returned by |
Subscribe to any (one) topic and put that into an mcap https://wiki.ros.org/ros_type_introspection/Tutorials/GenericTopicSubscriber |
Have rust based mcap record all in mcap_tools: https://github.com/lucasw/mcap_tools/blob/main/mcap_tools/src/mcap_record.rs But next thing is to make https://github.com/lucasw/ros_one2z/blob/main/one2z/scripts/ros1_play_mcap.py be able to compute md5sums from the message definition without using known message types, after that can duplicate in rust in mcap_tools. Try running this standalone, print out what the stripped down message definition looks like then duplicate in the mcap player: Can I just run these tests like this?
Need to copy ros_comm/test/test_roslib_comm/test/md5tests into install location (because disabled test packages when doing the base install) -> no just make a new devel workspace with only ros_comm in it, run tests from there. Log.msg:
The sub message Header is replaced with the hash of that type, then the md5sum of this cleaned string is performed:
|
example
Need to create a dictionary of md5sums, but with placeholder text to substitute other md5sums of sub types |
Ended up putting code in mcap_tools: https://github.com/lucasw/mcap_tools/blob/main/mcap_tools/scripts/msg_def_md5.py |
Probably modifying the rosbag source https://github.com/lucasw/ros_comm/tree/salsa_noetic_aggregated/tools/rosbag/src is the way to go, but before that make a minimally featured standalone C++ executable to record and play back at least from preset topics and types.
https://github.com/foxglove/mcap/tree/main/cpp#including-in-your-project - just copy headers in, probably what ros2 bag does? Sort of, the cmake pulls mcap files off the internet while building (puts them in
build/mcap_vendor/_deps/mcap-src
)- the files needed are all in https://github.com/foxglove/mcap/tree/main/cpp/mcap/include/mcaphttps://github.com/lucasw/ros_one2z/blob/main/one2z/scripts/ros1_play_mcap.py has mcap bag playback from rospy (while skipping deserialization and re-serialization)
(TODO compare ros1_play_mcap.py to foxglove/mcap#461 (comment))
The text was updated successfully, but these errors were encountered: