build details

# Calibration - Time-of-Flight Distance Sensors

Modified 2020-03-04 by Timothy Scott

A Duckiebot set up according to Unit E-1 - Setup

Time of Flight sensors.

ToF sensors are calibrated.

Step 1: Use Portainer to stop the `duckiebot-interface-dbv2` container.

Step 2: Use the following command to launch the calibration procedure:

``````$docker -H duckiebot name.local run --privileged -it -v /data:/data \ --name duckiebot-interface-calibration --network=host --rm \ duckietown/dt-duckiebot-interface-dbv2:daffy-arm32v7 \ roslaunch sensor_suite tof_calibration.launch `````` Step 3: Follow the instructions on the command line. You will do this for each ToF sensor on the Duckiebot: 1. Identify the correct sensor. Move your hand around the Duckiebot, watching the distance measurements on your screen, until you find the correct sensor. 2. Place the Duckiebot so that the sensor is pointing straight at a large flat surface, roughly 100mm away. 3. Measure the exact distance between the sensor and the surface, and input it on the console. 4. Press enter, and wait for the measurements to be gathered. 5. Move the Duckiebot to roughly 300mm away from the object, and repeat from step `2`. The results of the calibration will be stored in `/data/config/calibrations/sensor_suite/tof/duckiebot name.yaml`. ## Validation Modified 2022-11-14 by Andrea Censi To validate that the calibration worked, do the following: Step 1: Start the `duckiebot-interface-dbv2` container in Portainer. Step 2: Start GUI tools on your computer using Duckietown Shell: ``````$ dts start_gui_tools duckiebot name --base_image duckietown/dt-core:daffy
``````

Step 3: Within GUI tools, run the command `rqt_plot`. A plot window should open.

Step 4: In the Plot window, select the topic `/duckiebot name/tof_node/tof_0/distance` and click on the ‘plus’ button.

Repeat this step for each `tof_N` topic (there should be one for each ToF sensor).

Step 5: Similarly to the calibration procedure above, place the Duckiebot some measured distance away from an object, and verify that the values in the plot match the distances you measured.

## Demo

Modified 2022-11-14 by Andrea Censi