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-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.

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

Option 2: Using the Dashboard

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,

previous error next (2 of 4) index
error
Repeated use of ID "fig:dashboard_mission_control_auto"

These are the locations indicated:

repeated-use
original-use
Created by function 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.

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