ait-assistive-autonomous-systems / ros2bag_tools Goto Github PK
View Code? Open in Web Editor NEWTool extensions for ros2bag cli
Tool extensions for ros2bag cli
Thanks for developing these awesome rosbag2 extensions!
When cutting a rosbag2, all messages outside of a certain time span are dropped.
This is also the case for messages with transient_local durability: E.g., the tf tree published on /tf_static is lost in the new bag, when we cut a time span that does not contain the very beginning of the original bag.
In my opinion, messages with transient_local durability should be always carried over when cutting a portion of a bag. Is there currently a way to do so?
I've a bag file which has color and depth messages of type sensor_msgs/msg/Image
. I'm using this repo to export them to .png
files (thank you for the work).
Had a question about the color swap. Additionally, wanted to make some suggestions I think other users of this repo might find helpful. I've only really played around with export
so far, maybe what's described down below may be applicable to the other verbs too.
On running the following command:
ros2 bag export --in ./some_rosbag/ --topic /camera/rgb/image_raw image
the only log is
[rosbag2_storage]: Opened database './some_rosbag/some_rosbag.db3' for READ_ONLY.
How about adding more logs that offer information as the export progresses? For example, no. of images converted and how many more to go. The bag file I'm using is quite large so it's hard to tell what's going on as I'm waiting for the export to complete.
During my first export
attempt, I missed providing the $EXPORTER
i.e. image
, and got the following traceback:
ros2 bag export --in ./some_rosbag/ --topic /camera/rgb/image_raw
Traceback (most recent call last):
File "/opt/ros/humble/bin/ros2", line 33, in <module>
sys.exit(load_entry_point('ros2cli==0.18.7', 'console_scripts', 'ros2')())
File "/opt/ros/humble/lib/python3.10/site-packages/ros2cli/cli.py", line 89, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/humble/lib/python3.10/site-packages/ros2bag/command/bag.py", line 38, in main
return extension.main(args=args)
File "/path/to/ros2bag_tools_ws/build/ros2bag_tools/ros2bag_tools/verb/export.py", line 81, in main
assert args.config
AssertionError
While I understood an assertion check failed, an assert message could describe what the failed assertion is about. On peeking inside ros2bag_tools/verb/export.py
, there are 4 assert
's (including the one on line 81 which is the one that failed for me) and adding messages to them can be informative.
From the limitations:
".. experience a color swap in the output. Force an output encoding if this is not desired."
Is the functionality to "force an output encoding" through the ros2 bag export
CLI supported? If yes, how does one go about it?
Adding functionality to allow specifying a destination filepath might be a good feature to have. For example:
ros2 bag export --in ./some_rosbag/ --topic /camera/rgb/image_raw image --save-dir /path/to/save/directory
Due to the old API datetime was being used for timestamps. In rolling (and possible iron) rostime is being used. We wrapped it back to datetime for now but we should move to rostime as it alllows nanosecond resolution. We should wrap any datetime to rostime for backwards compatibility.
Is this package compatible with ROS2 Foxy bags? They have a .db3 (sqlite3) format.
I built the two packages in a ROS2 workspace and sourced the inlay. However when I run ros2 bag sync --help
, I get the below error:
Failed to load entry point 'sync': No module named 'rosbag2_py'
plot.py imports get_reader_options from ros2bag.verb but fails to do so. I searched through the ros2bag files and couldn't find any mention of get_reader_options. Is this also an issue on your end with ros humble?
Hello, thanks for providing a nice tool.
I found a small problem today and I would like to report here.
In cut.py
, there is a place where it is not f-string.
https://github.com/Kettenhoax/ros2bag_tools/blob/master/ros2bag_tools/ros2bag_tools/filter/cut.py#L111
The solution is:
+ f'duration of the input bags ({bag_start}, {bag_end})')
Rolling has changed the topic metadata info and added topic_id (returned by storage or upon creation), qos and other info.
They probably can be null initialized (need to check) but we need to adapt the code if possible maintaining backwards while hiding it from the user/dev somehow if they do not need or touch it.
When trying to follow the example in the README, I get the following traceback:
dfs = read_data_frames(BagView(reader))
TypeError: read_data_frames() missing 1 required positional argument: 'field_dict'
After a bit of investigation, it seems like it needs to have a dictionary passed in as well, see the test:
I downloaded the repo into src/util/ros2bag_tools. Then I used following command: colcon build --symlink-install --packages-select rosbag2_tools
the package successfully builds in 3.73s and then I resource the workspace. but when trying ros2 bag export
I get: Usage error invalid choice 'export'. Like the verb doesn't exist. I'm using Ubuntu 20.04 and Ros rolling.
A typo in this line:
Should be ['jpg', 'jpeg']
.
The action setup-ros from ros-tooling installs further flake8 tests that are currently not being met. We should fix them. Besides the coverage report from the ros-ci action does not produce any results.
Hi all,
Great work your rosbag tools! Used your package to export the Point Clouds from a rosbag to PCD files and found a bug related to the set_read_order()
function inside reader.py
(line 75)
I think it all comes from this fix #1177 from the rosbag2 repository. There was a thrown error: read order can only be set after open()
related to what they comment on the issue so my solution was to just comment the whole if
loop (line 74 to 76) and your tool perfectly worked!
Best!
Tf messages contain an array of transformations, hence no general msg header is included. This leads to tf msgs not being restamped.
We added the sync filter which may have potential tail drops (or intermediate drops) and thus needs a way of either flushing and reporting (or both) of potentially dropped messages to the user.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.