build details

Show: section status errors & todos local changes recent changes last change in-page changes feedback controls

Exercises - lane pose estimation

Modified 2019-11-12 by Aleksandar Petrov

Play with the parameters of the localization pipeline.

The goal of this exercises is to play with existing parameters to understand the different trade-offs mentioned in Unit B-2 - Learning materials.

Camera calibration (unknown ref opmanual_duckiebot/camera-calib)

previous warning next (9 of 17) index
warning
I will ignore this because it is an external link. 

 > I do not know what is indicated by the link '#opmanual_duckiebot/camera-calib'.

Location not known more precisely.

Created by function n/a in module n/a.

Docker basics (unknown ref duckietown-robotics-development/docker-basics)

previous warning next (10 of 17) index
warning
I will ignore this because it is an external link. 

 > I do not know what is indicated by the link '#duckietown-robotics-development/docker-basics'.

Location not known more precisely.

Created by function n/a in module n/a.

ROS basics (unknown ref duckietown-robotics-development/sw-advanced)

previous warning next (11 of 17) index
warning
I will ignore this because it is an external link. 

 > I do not know what is indicated by the link '#duckietown-robotics-development/sw-advanced'.

Location not known more precisely.

Created by function n/a in module n/a.

Knowledge of the software architecture on a Duckiebot (unknown ref duckietown-robotics-development/duckietown-code-structure)

previous warning next (12 of 17) index
warning
I will ignore this because it is an external link. 

 > I do not know what is indicated by the link '#duckietown-robotics-development/duckietown-code-structure'.

Location not known more precisely.

Created by function n/a in module n/a.

Understand the trade-offs when dealing with image processing parameters

Insights into the image pipeline of a Duckiebot.

Task 1: Line detector exercise

Modified 2019-11-12 by Aleksandar Petrov

As previously introduced, the line_detector_node detects white, yellow and red segments. The more segments we get, the more accurate we expect the lane filter to be, but also the more resources we need for computation of the pose estimate (memory as well as CPU usage). This is a trade-off between accuracy and computational efficiency. The goal of this exercise is to analyze this trade-off by determining the relationship between the number of segments processed and the quality and frequency of pose estimates that are being computed.

For this task the parameter /DUCKIEBOT_NAME/line_detector_node/segment_max_threshold can be dynamically adjusted.

Choosing the best number of segments (frequency)

Put the Duckiebot in the city and let it drive one whole loop with the exercise-provided lane following. For every whole loop use a different parameter /DUCKIEBOT_NAME/line_detector_node/segment_max_threshold and record a rosbag of lane_pose for each value of segment_max_threshold. You should know how to do that from (unknown ref duckietown-robotics-development/ros-logs)

previous warning next (13 of 17) index
warning
I will ignore this because it is an external link. 

 > I do not know what is indicated by the link '#duckietown-robotics-development/ros-logs'.

Location not known more precisely.

Created by function n/a in module n/a.
.

Write a custom Python script to analyze the publishing_frequency of the topic /DUCKIEBOT_NAME/lane_filter_node/lane_pose for each bag. Plot the relationship between segment_max_threshold on one axis and the mean and standard deviation of the lane_pose publishing frequency on the other axis. Provide at least 4 points on the plot. Include a point with a very high segment_max_threshold to virtually allow all segments to be computed.

Frequency isn’t the only relevant metric. Using one segment per color will give fast computation but very noisy and unstable estimation. Using the rviz tool that you launched before, you can analyze the stability of the lane_pose.

Choosing the best number of segments (stability)

Create a graph, ploting on the y-axis (d, \phi) against time on the x-axis for each of the loops from the previously recorded rosbags.

Task 2: Lane pose exercise

Modified 2019-11-12 by Aleksandar Petrov

As outlined in the introduction section, lane_filter_node estimates the Duckiebot’s desired pose by means of recursive Bayes estimation. The sizes of the belief/likelihood matrices are adjustable parameters. We are interested in analyzing the effect of various matrix sizes on the precision/standard deviation of the lane pose estimation.

For this task the parameter /DUCKIEBOT_NAME/lane_filter_node/matrix_mesh_size can be dynamically adjusted.

Choosing the best matrix size

While running the exercise-provided lane following, play with matrix_mesh_size, and record different rosbags for the topic lane_pose (one for each value of matrix_mesh_size).

Write a custom Python script to analyze the frequency of the topic /DUCKIEBOT_NAME/lane_filter_node/lane_pose for each bag (should be the same as last exercise). Plot the relationship between matrix_mesh_size on one axis and the the mean and standard deviation of the frequency of the lane_pose topic on the other axis. Provide at least 4 points on the plot.

sometimes, when dynamically changing the parameters, errors might occur since the matrix size might be changing during computation of the segments. In the occurrence of such a problem, you can restart the node or set the previous value of the mesh and then retry.

Task 3: English driver

Modified 2019-11-12 by Aleksandar Petrov

One of our brave Duckiebots wanted to make a visit to a fellow Duckiebot at the London Science Museum in Great Britain (yup, must be really brave to go right before Brexit :X). However, it needs to adhere to the local driving rules. Therefore you will have to help it learn to drive on the left side of the road.

Driving the English style

The task is to make the Duckiebot drive on the left side of the road. The parameter /DUCKIEBOT_NAME/lane_filter_node/lane_offset and the provided snippet provided code snippet is sufficient to complete this task. Coding is not necessary for this exercise.