Git Product home page Git Product logo

ros2bag_tools's People

Contributors

asaba96 avatar bergercookie avatar cyclair-tech avatar devrite avatar fafraobait avatar franzalbers avatar hofbauerc avatar kettenhoax avatar wallner90 avatar weidinger-c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ros2bag_tools's Issues

Cutting bags containing messages with transient_local durability

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?

export: more logging, assert messages, rgb-bgr swap, arg for save directory

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.

More logging

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.

Assert messages

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.

RGB-BGR color swap

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?

Arg for save directory

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

datetime to rostime

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.

Build instructions missing

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'

Filed to load entry point 'plot'

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?

TopicMetadata API changes in rolling

Rolling has changed the topic metadata info and added topic_id (returned by storage or upon creation), qos and other info.

See ros2/rosbag2#1538

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.

README read data frame example missing positional argument

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: &apos;field_dict&apos;

After a bit of investigation, it seems like it needs to have a dictionary passed in as well, see the test:

https://github.com/Kettenhoax/ros2bag_tools/blob/6877cb73549bb261b2f82efc5886a77bd6e8463a/rosbag2_tools/test/test_data_frame.py#L27

How to use this package?

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.

Fix read order error in reader.py for export

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 can not be restamped

Tf messages contain an array of transformations, hence no general msg header is included. This leads to tf msgs not being restamped.

Filter flush and logging

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.