Home
build details

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

DB17: Software setup and RC remote control

Modified today by tanij

Laptop configured, according to Unit A-9 - DB17: Installing Ubuntu on laptops.

You have configured the Duckiebot. The procedure is documented in Unit A-10 - DB17 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 [+software_reference#github-access]

previous warning next (22 of 44) index
warning
Ignoring the remote reference +software_reference#github-access
Created by function _execute in module compmake.plugins.backend_local.manager_local.
.

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 git@github.com:duckietown/Software.git ~/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 [+software_reference#catkin_make]

previous warning next (24 of 44) index
warning
Ignoring the remote reference +software_reference#catkin_make
Created by function _execute in module compmake.plugins.backend_local.manager_local.
.

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

comment

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 [+software_devel#duckiefleet-directory]

previous warning next (25 of 44) index
warning
Ignoring the remote reference +software_devel#duckiefleet-directory
Created by function _execute in module compmake.plugins.backend_local.manager_local.
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 [+software_devel#scuderia]

previous warning next (26 of 44) index
warning
Ignoring the remote reference +software_devel#scuderia
Created by function _execute in module compmake.plugins.backend_local.manager_local.
.

Generate the machines file.

The procedure is listed here: [+software_devel#machines]

previous warning next (27 of 44) index
warning
Ignoring the remote reference +software_devel#machines
Created by function _execute in module compmake.plugins.backend_local.manager_local.
.

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.