This repository is a fork of this template.
The source code for the nodes is located in packages/motion_planner/src.
A Duckiebot (DB21-M) with the name duckiebot was used for testing.
The software was built using ROS Noetic Ninjemys.
First read The Duckiebot Operation Manual and The Duckietown Developer Manual.
- Set up the Duckiebot and its environment.
- Open two terminals.
- In the first terminal, run
dts devel build -fto build the software locally ordts devel build -f -H duckiebotto build the software on the Duckiebot. - In MATLAB, open
parameters.m,initialise.m,animate.mandstop.m. - In
parameters.m, set the parameter values.
- In the first terminal, run
dts devel runif the software was built locally ordts devel run -H duckiebotif the software was built on the Duckiebot. - Wait for the nodes to begin running.
- In the second terminal, run
export ROS_MASTER_URI=http://duckiebot.local:11311and thenrosbag record /duckiebot/NODE_NAME/TOPIC_NAME ...to record to a bag file. - Wait for the recording to begin.
- In MATLAB, run
initialise.m.
- Wait for the
control completemessage to appear in the first terminal, or runstop.min MATLAB to stop the Duckiebot prematurely. - Press
Ctrl+Cin both terminals.
- In
animate.m, setbag_file_nameto the name of the bag file and setcreate_gifto0. - In MATLAB, run
animate.m.
- In
animate.m, setgif_nameto the desired name of the GIF, setgif_resolutionto the desired resolution of the GIF and setcreate_gifto1. - In MATLAB, run
animate.m. - Wait for MATLAB to finish creating the GIF.