DB21
DB21M
DB21
,DB21M
start_gui_tools
, ROS tools and no-vnc
DB17
DB18
DB19
Modified 2021-10-26 by tanij
You can make your robot move as described in Unit C-10 - Operation - Make it Move.
Calibrate the wheels of the Duckiebot such that it goes in a straight line when you command it to. Set the maximum speed of the Duckiebot.
Want to learn more about odometry and odometry calibration? Check out our massive open online course resources: video, theory, activities and exercises.
Modified 2021-10-26 by tanij
Follow instructions in Unit C-10 - Operation - Make it Move to make your robot move with keyboard control, and keep the terminal open.
Modified 2021-10-26 by tanij
There is a lot going on between pressing ↑ on the keyboard and your Duckiebot moving. To get a better view of what is going on, we need another terminal, but ran closer to where the action is happening:
laptop $ dts start_gui_tools hostname
Duckietown uses ROS to move data around. To determine if the command above worked, type:
$ rostopic list
You should see a list of ROS topics currently active on your Duckiebot. If you know ROS, here you can use ROS commands at will. If you are not familiar with ROS, note that each of these topics might carry messages, i.e., actual data. You can, e.g., “listen” to the data inside each topic. For example:
$ rostopic echo /!hostname/camera_node/image/compressed
will show you incoming images as the Duckiebot sees them!
Keep this terminal open. We will use it to perform the wheel calibration.
Modified 2021-10-26 by tanij
trim
parameterModified 2021-10-26 by tanij
The trim parameter is set to by default, under the assumption that both motors and wheels are perfectly identical. You can change the value of the trim parameter by running the command:
duckiebot-container $ rosparam set /hostname/kinematics_node/trim trim value
Use some tape to create a straight line on the floor (Figure 14.1).
Place your Duckiebot on one end of the tape. Make sure that the Duckiebot is perfectly centered with respect to the line.
Command your Duckiebot to go straight for about 2 meters. Observe the Duckiebot from the point where it started moving and annotate on which side of the tape the Duckiebot drifted (Figure 14.2).
Measure the distance between the center of the tape and the center of the axle of the Duckiebot after it traveled for about 2 meters (Figure 14.3).
Make sure that the ruler is orthogonal to the tape.
If the Duckiebot drifted by less than centimeters you can stop calibrating the trim parameter. A drift of centimeters in a meters run is good enough for Duckietown. If the Duckiebot drifted by more than centimeters, continue with the next step.
If the Duckiebot drifted to the left side of the tape, decrease the value of , by running, for example:
duckiebot-container $ rosparam set /hostname/kinematics_node/trim -0.1
If the Duckiebot drifted to the right side of the tape, increase the value of , by running, for example:
duckiebot-container $ rosparam set /hostname/kinematics_node/trim 0.1
Repeat this process until the robot drives straight.
Want to learn more about odometry and odometry calibration? Check out our massive open online course resources: video, theory, activities and exercises.
gain
parameterModified 2021-04-06 by Vincenzo
The gain parameter is set to by default. You can change its value by running the command:
duckiebot-container $ rosparam set /hostname/kinematics_node/gain gain value
Modified 2021-04-06 by Vincenzo
When you are all done, save the parameters by running:
duckiebot-container $ rosservice call /hostname/kinematics_node/save_calibration
The first time you save the parameters, this command will create the file
Modified 2021-10-26 by tanij
The calibration result is saved on your Duckiebot:
/data/config/calibrations/kinematics/hostname.yaml
You can view or download the calibration file using the Dashboard running at http://hostname.local
under File Manager
in the sidebar on the left, navigating to config/calibrations/kinematics/hostname.yaml
.
Modified 2021-10-26 by tanij
There are additional parameters you can to play around with to get a better driving experience. You can learn about odometry and odometry calibration here: video, theory, activities and exercises.