build details

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

Software setup and RC remote control

Modified 2018-06-24 by Andrea Censi

Laptop configured, according to Unit A-7 - Installing Ubuntu on laptops.

You have configured the Duckiebot. The procedure is documented in Unit A-8 - Duckiebot Initialization.

You have created a Github account and configured public keys, both for the laptop and for the Duckiebot. The procedure is documented in Unit D-3 - Setup Github access.

You can run the joystick demo.

Clone the Duckietown repository

Modified 2018-06-22 by Andrea Censi

Clone the repository in the directory ~/duckietown:

duckiebot $ git clone ~/duckietown

For the above to succeed you should have a Github account already set up.

It should not ask for a password.

you must not clone the repository using the URL starting with https. Later steps will fail.

Set up the ROS environment on the Duckiebot

Modified 2018-06-24 by Andrea Censi

All the following commands should be run in the ~/duckietown directory:

duckiebot $ cd ~/duckietown

Now we are ready to make the workspace. First you need to source the baseline ROS environment:

duckiebot $ source /opt/ros/kinetic/setup.bash

Then, build the workspace using:

duckiebot $ catkin_make -C catkin_ws/

For more information about catkin_make, see Section 1.6 - catkin_make.

there is a known bug, for which it fails the first time on the Raspberry Pi. Try again; it will work.


I got no error on first execution on the Raspberry Pi

Clone the duckiefleet repository

Modified 2018-06-24 by Andrea Censi

Clone the relevant duckiefleet repository into ~/duckiefleet.

See Subsection 4.1.2 - Duckiefleet directory DUCKIEFLEET_ROOT to find the right duckiefleet repository.

In ~/.bashrc set DUCKIEFLEET_ROOT to point to the directory:

export DUCKIEFLEET_ROOT=~/duckiefleet

Also, make sure that you execute ~/.bashrc in the current shell by running the command:

source ~/.bashrc

Add your vehicle data to the robot database

Modified 2018-06-24 by Andrea Censi

Next, you need to add your robot to the vehicles database. This is not optional and required in order to launch any ROS scripts.

You have already a copy of the vehicles database in the folder robots of DUCKIEFLEET_ROOT.

Copy the file emma.robot.yaml to robotname.robot.yaml, where robotname is your robot’s hostname. Then edit the copied file to represent your Duckiebot.

For information about the format, see Section 4.2 - The “scuderia” (vehicle database).

Generate the machines file.

The procedure is listed here: Section 4.3 - The machines file.

Finally, push your robot configuration to the duckiefleet repo.

Test that the joystick is detected

Modified 2018-06-22 by Andrea Censi

Plug the joystick receiver in one of the USB port on the Raspberry Pi.

To make sure that the joystick is detected, run:

duckiebot $ ls /dev/input/

and check if there is a device called js0 on the list.

Make sure that your user is in the group input and i2c:

duckiebot $ groups
username sudo input i2c

If input and i2c are not in the list, you missed a step. Ohi ohi! You are not following the instructions carefully!

To test whether or not the joystick itself is working properly, run:

duckiebot $ jstest /dev/input/js0

Move the joysticks and push the buttons. You should see the data displayed change according to your actions.

No questions found. You can ask a question on the website.