build details

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

Operation - Make it Move

Modified 2022-09-03 by liampaull

A Duckiebot in DB18 or later configurations.

Laptop configured according to Unit C-1 - Setup - Laptop.

You have configured the Duckiebot as documented in Unit C-3 - Setup - Duckiebot SD Card.

You can make your Duckiebot move.

This section describes how to make your Duckiebot move.

Keyboard control

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.

The video is at https://vimeo.com/526584868.

Duckiebot keyboard control.

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:

The keyboard control graphical user interface

input Duckiebot ![hostname], do not include .local part.

The following keys control the Duckiebot:

Keyboard joystick functions
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.

The no-window way with Duckietown shell (For Mac Users)

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

Troubleshooting

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-20 - Debug - Re-flash Microcontroller.