You will be using a duplicate of this repo for all development in the class. This repo provides starter code for the ROS subscriptions, publishers and control loops you will be using.
Please refer to the UT AUTOmata reference manual for instructions on setting up the dependencies:
- Make sure you're logged into your GitHub account.
- Create a new repo with the same name under your GitHub account. Dont initialize that with anything.
git clone <this repository url>
(found in the upper right)cd <cloned_repo>
git push --mirror <your new repository url>
git clone <your repository url>
(found in the upper right)- After you have cloned the repo, add it to your ROS path by adding the following line to the end of
~/.bashrc
:For example:export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:[Local path to your repo]
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/joydeepb/cs393r_starter
- Reload
.bashrc
so that the path is updated:source ~/.bashrc
cd <cloned_repo>
make -j
Skip the above steps
- Make sure you have Docker installed and set up. Make sure you can run as a non-root user (see Manage Docker as a non-root user)
- Make sure you are in the root directory of the repository.
- Run
make docker_all
to just compile. - You can run
make docker_shell
to get a shell within the Docker container. The shell will automatically launchroscore
and theut_automata
websocket and simulator inside of atmux
session. Inside the shell, you can compile and run your navigation code and connect using localhost in the web visualization.
For debugging purposes, you can look at the tmux processes at any time by attaching to the session: tmux a -t ROS
. For more information about tmux
, refer to the tmux documentation
5. To shutdown the docker container, run make docker_stop
To make code changes take effect, open the container shell (which can be done using make docker_shell) and run make -j within the cs393r_starter directory. make docker_all then make docker_shell also builds the changes if you have to do that otherwise.
There are three main executables: navigation
, particle_filter
, and slam
. Each executable has a corresponding .h
and .cc
file that defines the class for the implementation. An associated *_main.cc
file abstracts away ROS-specific details. For example, the particle_filter
executable consists of three files:
src
└── particle_filter
├── particle_filter.cc
├── particle_filter.h
└── particle_filter_main.cc
Every header file includes documentation in comments for the variables and subroutines.
The project compiles with Eigen for linear algebra and coordinate geometry, the amrl_shared_lib for commonly used robotics subroutines, and a custom simple priority queue implementation. Some useful references on how to use the libraries:
- See the included
eigen_tutorial.cc
file for example most common Eigen usage, and the official Eigen tutorials for more extensive documentation. - See the included
simple_queue_test.cc
for usage of the simple priority queue.
Make sure you recompile your code between changes.
- To run navigation:
./bin/navigation
- To run the particle filter:
./bin/particle_filter
- To run SLAM:
./bin/slam