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

bag/mcap to/from image sequence and video #6

Open
lucasw opened this issue Nov 4, 2023 · 3 comments
Open

bag/mcap to/from image sequence and video #6

lucasw opened this issue Nov 4, 2023 · 3 comments

Comments

@lucasw
Copy link
Owner

lucasw commented Nov 4, 2023

Trying out https://github.com/mlaiacker/rosbag2video

ros2 launch ros2_example_pkg example_launch.xml
ros2 bag record -a -b 10000
cd rosbag2_*
../src/rosbag2video/ros2bag2video.py -v -t /modified_image .

Example ros2 mcap bag

rosbag2_2023_11_04-07_23_24_bouncing_ball.zip

@lucasw lucasw changed the title bag/mcap to image sequence and video bag/mcap to/from image sequence and video Nov 18, 2023
@lucasw
Copy link
Owner Author

lucasw commented Nov 18, 2023

https://github.com/orgs/foxglove/discussions/88#discussioncomment-7522958 h264 in mcap- but want to use ros1msg and ros2msg instead of protobuf (and want to have tools to convert to/from any of those, along with to/from image/compressed image and compressed video).

https://docs.foxglove.dev/docs/visualization/message-schemas/compressed-video has ros1 and 2 messages, so shouldn't be an issue to convert from one to another, but not sure how that is done, if a table of matching formats is needed (from scratch, or is somewhere in mcap libraries, or somehow automatic, just load from protobuf and write to ros msg and it'll do the right thing).

Is there an open264 for python? https://github.com/cisco/openh264 Looks like it has C++ and a rust wrapper.

@lucasw
Copy link
Owner Author

lucasw commented Nov 18, 2023

What happens when ros1_play_mcap.py is used on a protobuf image sequence mcap (like https://github.com/foxglove/community/files/13400734/demo_2023-11-18_06-06-59.zip)?

The ros1 messages are in foxglove/schemas among other things, catkin build this:

git clone [email protected]:foxglove/schemas.git
rosmsg show CompressedImage
[sensor_msgs/CompressedImage]:
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
string format
uint8[] data

[foxglove_msgs/CompressedImage]:
time timestamp
string frame_id
uint8[] data
string format

@lucasw
Copy link
Owner Author

lucasw commented Nov 19, 2023

From mcap foxglove.CompressedImage (recorded using https://mcap.dev) to ros1msg sensor_msgs/CompressedImage: 44cc893 - need a big convert of every protobuf message that has a ros1 equivalent (something like that exists in ros1-2 bridges elsewhere)

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

No branches or pull requests

1 participant