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 pull upstream ente
NOTE: to pull from upstream, you need to have completed the instructions in the duckietown-lx repository README to fork this repository.
- 💻 Always make sure your Duckietown Shell is updated to the latest version. See installation instructions
This exercise is meant to be run with the ente
version of the shell commands. You can switch to that version with dts profile switch ente
.
-
💻 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 (real or virtual - more on this later) 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.
You can build your code with
dts code build
This will build a docker image with your code compiled inside - you should your ROS node get built during the process.
In order to test your code in the Duckiematrix you will need a virtual robot. You can create one with the command:
dts duckiebot virtual create [VIRTUAL_ROBOT_NAME]
where [VIRTUAL_ROBOT_NAME]
can be anything you like (but remember it for later).
Then you can start your virtual robot with the command:
dts duckiebot virtual start [VIRTUAL_ROBOT_NAME]
You should see it with a status Booting
and finally Ready
if you look at dts fleet discover
:
| Hardware | Type | Model | Status | Hostname
--- | -------- | --------- | ----- | -------- | ---------
vbot | virtual | duckiebot | DB21J | Ready | vbot.local
Now that your virtual robot is ready you can start the Duckiematrix. From this exercise directory do:
dts code start_matrix
You should see the Unity-based Duckiematrix simulator start up.
To test your code in the duckiematrix you can do:
dts code workbench -m -R [VIRTUAL_ROBOT_NAME]
and to test your code on your real Duckiebot you can do:
dts code workbench -R [ROBOT_NAME]
In another terminal, you can launch the noVNC
viewer for this exercise which can be useful to send commands to the robot and view the odometry that you calculating in the RViZ window.
dts code vnc -R [ROBOT_NAME]
where [ROBOT_NAME]
could be the real or the virtual robot (use whichever you ran the dts code workbench
command with).
Now you can proceed to the first notebook.