-
Notifications
You must be signed in to change notification settings - Fork 1
Make bagfiles
Stacy edited this page Jan 4, 2023
·
5 revisions
-
If not already, setup ROS across machines
-
Launch donkeycar on the car
roslaunch donkeycar teleop.launch
- On PC go to the folder
robocar_ws/src/path_from_image/bagfiles/
and record messages
rosbag record -a
# to record only image topic
rosbag record -O subset /raspicam/image/compressed
- If bag file has several topics , but you need only one, just filter rosbag with
rosbag filter subset.bag <NEW_NAME>.bag 'topic == "<YOUR_TOPIC>"'
- to extract image files from bag
# create launch file with
<launch>
<node pkg="rosbag" type="play" name="rosbag" required="true" args="$(find path_from_image)/bagfiles/subset.bag"/>
<node name="extract" pkg="image_view" type="extract_images" respawn="false" required="true" output="screen" cwd="<FOLDER_TO_SAVE_IMAGES>">
<remap from="image" to="raspicam/image_raw"/>
</node>
</launch>
#to decompress images also run in terminal
rosrun image_transport republish compressed in:=raspicam/image raw out:=raspicam/image_raw