zhrandell / Seattle_Aquarium_CCR_development

This repo serves as a landing pad for active areas of development of our Coastal Climate Resilience (CCR) program. Specifically, this repo houses 1-pager .md documents ready for development, and also a hub to communicate via the Issues tab.
5 stars 1 forks source link

Exporting datasets as Rosbags. #9

Open tonioteran opened 2 months ago

tonioteran commented 2 months ago

(I'll just throw this out there in case it might be useful)

Rosbags (https://wiki.ros.org/rosbag) are pretty much a standard in the robotics in terms of datasets. They are also a pretty useful playback tool and help out a bunch with algorithm development and stuff. It's also a convenient way to make sure we package all of our information in a consistent, timestamped, and calibrated fashion.

Not sure what tools we currently use to do these sorts of things (like data playback and stuff, I know @clydemcqueen already does things like these without any ROS interaction), but it might be interesting to consider this avenue (it think it would definitely help in making our datasets more appealing, at least within the robotics community).

clydemcqueen commented 2 months ago

I can think of 2 ways to build rosbags:

  1. Generate them from existing logs (dataflash logs, telemetry logs, still images) after the dive.
  2. Enable the experimental Micro ROS support in ArduPilot and build some system (e.g., a BlueOS extension) that will capture a rosbag during the dive.

I just looked at the state of Micro ROS in ArduPilot. It is pretty cool and has great promise, but it is early days:

All-in-all, if we decide to build rosbags, I think the better option is to build them from existing logs, at least for now.

tonioteran commented 2 months ago

All-in-all, if we decide to build rosbags, I think the better option is to build them from existing logs, at least for now.

yup, 100% agree with this, at least of the time being

we can revisit this issue once we have a couple of datasets pretty neatly standardized, calibrated, and properly timestamped

the actual code to craft the rosbag should be pretty trivial; i've done it a couple of time either in python or cpp, we can use whichever one we deem better

clydemcqueen commented 5 hours ago

I have started to do the investigations and write some scripts here: https://github.com/clydemcqueen/dive_to_bag

This has 3 scripts:

I decided to get the gps and dvl messages from the telemetry logs, as that is the primary source and the one I am familiar with, but it is also available in the dataflash logs.

Some caveats:

But it is a start!