remaro-network / tudelft_hackathon

REMARO Summer School Delft 2022 - Underwater robotics hackathon
32 stars 4 forks source link

Collect sonar + MAVROS data with the BlueROV #2

Closed Rezenders closed 2 years ago

Rezenders commented 2 years ago

Test bluerov in the pond beside 3me building and save sonar and mavros data. Try to get data close to the building walls.

Rezenders commented 2 years ago

Done. https://github.com/remaro-network/remaro_data/tree/main/bluerov_sonar_data_tudelft_pond_25_05_22

Rezenders commented 2 years ago

With 360 degrees range, the sonar takes approximately 6 to 10 seconds to complete a full turn. A LaserScan msg is published in the /scan topic when it finishes a complete turn. I will assume that with half range it takes half of the time.

ros2 topic hz /scan
average rate: 0.179
    min: 0.030s max: 11.138s std dev: 5.55410s window: 2
average rate: 0.183
    min: 0.023s max: 11.138s std dev: 5.45011s window: 4
average rate: 0.160
    min: 0.023s max: 15.508s std dev: 6.39811s window: 6
average rate: 0.139
    min: 0.023s max: 19.955s std dev: 7.62588s window: 8
average rate: 0.129
    min: 0.023s max: 19.983s std dev: 8.22861s window: 10
average rate: 0.123
    min: 0.023s max: 19.983s std dev: 8.58305s window: 12
average rate: 0.119
    min: 0.023s max: 19.983s std dev: 8.81892s window: 14
average rate: 0.116
    min: 0.021s max: 19.983s std dev: 8.98784s window: 16
average rate: 0.114
    min: 0.021s max: 19.983s std dev: 9.11290s window: 18
phamquandung commented 1 year ago

Hi @Rezenders. Your work is really interesting. Thanks for it. I wonder how I can collect video with rosbag. I realize that there is no image data in mavros. Could you please help me? Thanks

Rezenders commented 1 year ago

Hi @phamquandung, indeed there is no image data in mavros, at least as far as I know. The only data collection I did including camera image was this one. I was still using ROS 1 (kinetic) at that time, if I remember correctly I used the video_stream_opencv package or the image_pipeline package to capture image, I am not sure which one.

If you want to use ROS 2, you can use the image_pipeline package, you can install it via apt, the package name is ros-humble-image-pipeline (change humble for the version you are using). Then you need to run it and then record with ros2 bag.

One disclaimer, when I was recording image data from the real bluerov in my laptop, the frame rate was very low, and the bluerov's raspberry pi was consuming almost all its resources, so it was very slow. It made it very hard to pilot the robot.