build details

Operation - Taking and verifying a log

Modified 2021-03-13 by duckietown

Preparation

Modified 2019-08-12 by hosnerm

You may not have the folder. SSH into your robot and execute:

``````duckiebot $sudo mkdir /data/logs `````` It is recommended but not required that you log to your USB and not to your SD card. To mount your USB see here. Record the log Modified 2019-05-06 by Liam Paull Option: Minimal Logging on the Duckiebot Modified 2020-08-05 by frank-qcd-qk ``````laptop$ dts duckiebot demo --demo_name make_log_docker --duckiebot_name DUCKIEBOT_NAME --package_name duckietown_demos
``````

This will only log the imagery, camera_info, the control commands and a few other essential things.

Option: Full Logging on the Duckiebot

Modified 2020-08-05 by frank-qcd-qk

To log everything that is being published, run the base container on the Duckiebot:

``````laptop $dts duckiebot demo --demo_name make_log_full_docker --duckiebot_name DUCKIEBOT_NAME --package_name duckietown_demos `````` Stop logging Modified 2020-08-05 by frank-qcd-qk You can stop the recording process by stopping the container: ``````laptop$ docker -H DUCKIEBOT_NAME.local stop demo_make_log_docker
``````

or `demo_make_log_full_docker` as the case may be. You can also do this through the portainer interface.

Getting the log

Modified 2018-11-10 by liampaull

Modified 2021-03-21 by tanij

Using the dashboard file tab, you can access files on your Duckiebot.

Go to `/logs` and you should see all your logs there. Simply click on the log you want to transfer to your computer and it will download through your browser.

If for some reason you are having trouble accesing dashboard, you can directly specify the webpage at `http://hostname.local:8082/logs/`.

Using a USB drive

Modified 2020-08-05 by frank-qcd-qk

If you mounted a USB drive, you can unmount it and then remove the USB drive containing the logs (recommended).

For unmounting instructions see here

Using SCP

Modified 2020-08-05 by frank-qcd-qk

Otherwise you can copy the logs from your robot onto your laptop. Assuming they are on the same network execute:

``````laptop $scp linux_username@hostname.local:/data/logs/* path-to-local-folder `````` You can also download a specific log instead of all by replacing `*` with the filename. Verify a log Modified 2021-09-27 by Sacha Morin This procedure requires ROSBAG to be installed. If you have not installed that already, you can do so via: ``````$ sudo apt-get install python3-rosbag
``````

Either copy the log to your laptop or from within your container do

``````\$ rosbag info FULL_PATH_TO_BAG --freq
``````

Then:

• verify that the “duration” of the log seems “reasonable” - it’s about as long as you ran the log command for

• verify that the “size” of the log seems “reasonable” - the log size should grow at about 220MB/min

• verify in the output that your camera was publishing very close to 30.0Hz and verify that your virtual joysick was publishing at a rate of around 26Hz.

An example of the output looks like this:

``````path:        avlduck2_2020-08-05-01-54-18.bag
version:     2.0
duration:    12.7s
start:       Aug 04 2020 21:54:18.73 (1596592458.73)
end:         Aug 04 2020 21:54:31.42 (1596592471.42)
size:        69.9 MB
messages:    756
compression: none [77/77 chunks]
types:       sensor_msgs/CameraInfo      [c9a58c1b0b154e0e6da7578cb991d214]
sensor_msgs/CompressedImage [8f7a12909da2c9d3332d540a0977563f]
topics:      /avlduck2/camera_node/camera_info        374 msgs @ 29.9 Hz : sensor_msgs/CameraInfo
/avlduck2/camera_node/image/compressed   382 msgs @ 29.8 Hz : sensor_msgs/CompressedImage
``````