Operation - Make it Move#

This section describes how to make your Duckiebot move.

The Keyboard Controller#

The easiest way to make your Duckiebot move is by using the Keyboard Controller.

../../_images/keyboard_controller.png

Fig. 48 The Keyboard Controller.#

To activate the Keyboard Controller, run:

dts duckiebot keyboard_control ![DUCKIEBOT_NAME]

Note the keys in the table below.

Key

Function

W

Drive forwards

S

Drive backwards

A

Turn left

D

Turn right

E

Toggle the Emergency Stop switch

F

Toggle the Autopilot switch

X

Increase the Gain

Z

Decrease the Gain

V

Increase the Trim

C

Decrease the Trim

Space

Save the Gain and Trim

R

Refresh the window

T

Open the Debug Console

Note

The F key’s function (Autopilot) requires software, such as the lane following demo, to be running. For now, just try out the Keyboard Controller to get your Duckiebot moving.

Troubleshooting#

Troubleshooting

SYMPTOM

My Duckiebot does not move.

RESOLUTION

Before trying to use the Keyboard Controller, make sure that it is active by selecting it’s window.

Troubleshooting

SYMPTOM

The Keyboard Controller window is active but my Duckiebot still does not move. However, I can see messages being sent to my Duckiebot when looking at the ![DUCKIEBOT_NAME]/actuator/wheels/base/pwm DTPS topic, after following Operation - View DTPS Topics, and the Components page of the Dashboard (opened by running dts duckiebot dashboard ![DUCKIEBOT_NAME] --page robot/components) shows a red alert for the HUT.

RESOLUTION

If you have a HUT v3.1, re-flash it by following Debug - Re-flash Microcontroller.

Troubleshooting

SYMPTOM

I have reflashed the HUT but my Duckiebot still does not move or moves in a jerky manner. Additionally, the ToF sensor and front bumper are not detected on the Components page of the Dashboard (opened by running dts duckiebot dashboard ![DUCKIEBOT_NAME] --page robot/components). I may also be having issues with the screen.

RESOLUTION

Disconnect the ToF sensor from the front bumper and use the long I2C cable, that originally connected the front bumper to the HUT, to connect the ToF sensor directly to that same HUT port. Finally, reboot your Duckiebot. This procedure bypasses a known multiplexer issue on some front bumpers that can cause other issues with the HUT.

Troubleshooting

SYMPTOM

I have connected the ToF sensor directly to the same HUT port that the front bumper was originally connected to and rebooted my Duckiebot but it still does not move.

RESOLUTION

Make sure that the duckiebot-interface container is running by opening the Portainer interface or by running:

docker -H ![DUCKIEBOT_NAME].local ps

The exact name of the container will depend on your Duckiebot’s version. If you do not see the duckiebot-interface container, update your Duckiebot by running:

dts duckiebot update ![DUCKIEBOT_NAME]

Troubleshooting

SYMPTOM

When I press the W key, my Duckiebot moves backwards.

RESOLUTION

If you have a DB17 or DB18, revert the polarities (+ and -) of the cables that go to the motor driver (HUT) for both motors.