DB21
DB21M
DB21
,DB21M
start_gui_tools
, ROS tools and no-vnc
DB17
DB18
DB19
Modified 2022-09-03 by liampaull
A Duckiebot in DB18
or later configurations.
Laptop configured according to Unit C-2 - Setup - Laptop.
You have configured the Duckiebot as documented in Unit C-4 - Setup - Duckiebot SD Card.
You can make your Duckiebot move.
This section describes how to make your Duckiebot move.
Modified 2021-03-22 by tanij
The easiest way to move a Duckiebot is by keyboard control. This video shows how to drive a Duckiebot using the keyboard, through the Duckietown Shell.
Modified 2021-04-04 by tanij
To move your Duckiebot using your computer’s keyboard open a terminal and run:
$ dts duckiebot keyboard_control ROBOT_NAME
which, after startup, will open an arrows interface window:
input Duckiebot ![hostname], do not include .local
part.
The following keys control the Duckiebot:
Keys | Function |
ARROW_KEYS | Steer your Duckiebot |
q | Quit |
a | Turn on Lane Following |
s | Stop Lane Following |
i | Toggle Anti-instagram |
The a, s, i function require the lane following demo to be running.
This does not currently work on Mac OSX.
Modified 2021-03-22 by tanij
For some reason messages published on Mac inside the container don’t make it all the way to the robot.
When the popup arrow window is not responsive, running the stack directly on the Duckiebot might help:
laptop $ dts duckiebot keyboard_control hostname --cli
Modified 2021-03-22 by tanij
If you followed the instructions in Unit C-8 - Setup - Dashboard, you should have access to the Duckiebot dashboard.
You can open the browser and visit the page http://hostname.local/mission-control
.
This is the Mission Control page. It is the page that lets you monitor and control your Duckiebot. The top of the page should be similar to the following image,
Repeated use of ID "fig:dashboard_mission_control_auto"
These are the locations indicated:
Jump to element in output file.
Jump to element in output file.
n/a
in module n/a
.The first thing to check to make sure that everything we have done so far is correct, is the status of the Bridge, in the top-right corner of the page. The label should show the status “Bridge: Connected” (as shown in the image above). If the indicator reads “Bridge: Closed”, it means that something went wrong while launching the ROS websocket node above. In that case, start again from the beginning of this section.
Don’t worry if one of the blocks is called “Camera” but you don’t see an image. We will get to that later.
This page will show you lateral and angular speed of your robot, and a plot of left and right motor speed. Toggle the Take over switch in the top-right corner of the page to gain control of your robot. You will see that the background of the page will highlight and the central plot will start moving.
You can now use the arrows on your keyboard to drive your Duckiebot.
Did you know? The page contains 4 blocks by default. Feel free to drag them around and rearrange them as you please. You can also use the menu button of each block to resize them.
Modified 2022-09-03 by liampaull
Duckiebot goes backwards, even though I command it to go forward.
If you have a DB17
or DB18
, revert the polarities (plus and minus cables) of the cables that go to the motor driver (HUT
) for both motors.
The robot doesn’t move
Check that the duckiebot-interface
container is running
Open the Portainer interface and check the running containers. You should see one that has a name that contains duckiebot-interface
(exact container name will depend on your robot version).
You can also determine this by running:
$ docker -H ROBOT_NAME.local ps
and look at the output to find the duckiebot-interface
container and verify that it is running.
One of the base images is out of date Update your Duckiebot with the command
laptop $ dts duckiebot update ROBOT_NAME
Everything seems fine, I can see the commands being sent to the Duckiebot (e.g., through the Dashboard > Mission Control), but the Duckiebot does not move. My Dashboard > Robot > Components page shows a red alert for the HUT
.
if you have a HUT
v3.15 you will stumble on this problem the first time you try to move your Duckiebot.
Re-flash your HUT
following the procedure described in Unit C-21 - Debug - Re-flash Microcontroller.