In this learning experience, you will learn the basics of ROS (Robot Operating System).
This learning experience is provided by Duckietown in collaboration with Prof. Romulo Meira-Goes, Ph.D (Pennsylvania State University). Visit the Duckietown Website for more learning materials, documentation, and demos.
NOTE: All commands below are intended to be executed from the root directory of this exercise (i.e., the directory containing this README).
Update your exercise definition and instructions,
git remote add upstream git@github.com:duckietown/lx-ros-basics
git pull upstream main
NOTE: Example instructions to fork a repository and configure to pull from upstream can be found in the duckietown-lx repository README.
-
💻 Always make sure your Duckietown Shell is updated to the latest version. See installation instructions
-
💻 Update the shell commands:
dts update
-
💻 Update your laptop/desktop:
dts desktop update
-
🚙 Update your Duckiebot:
dts duckiebot update ROBOTNAME
(whereROBOTNAME
is the name of your Duckiebot chosen during the initialization procedure.)
Open the code editor by running the following command,
dts code editor
Wait for a URL to appear on the terminal, then click on it or copy-paste it in the address bar of your browser to access the code editor. The first thing you will see in the code editor is this same document, you can continue there.
NOTE: You should be reading this from inside the code editor in your browser.
Inside the code editor, use the navigator sidebar on the left-hand side to navigate to the
notebooks
directory and open the first notebook.
Follow the instructions on the notebook and work through the notebooks in sequence.
To test in simulation, use the command
$ dts code workbench --sim
There will be two URLs popping up to open in your browser: one is the direct view of the simulated environment. The other is VNC and only useful for some exercises, follow the instructions in the notebooks to see if you need to access VNC.
This simulation test is just that, a test. Don't trust it fully. If you want a more accurate
metric of performance, continue reading to the Perform local evaluation
section below.
You can test your agent on the robot using the command,
dts code workbench --duckiebot YOUR_DUCKIEBOT
This is the modality "everything runs on the robot".
You can also test using
dts code workbench --duckiebot YOUR_DUCKIEBOT --local
This is the modality "drivers running on the robot, agent runs on the laptop."