-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Elaborated quick start guide.
- git is used for version control and Github as a git remote as well as hosting Github pages, running Actions, managing pull requiests etc.
- This project uses ROS noetic (ROS 1).
- ROS noetic was built to run on Ubuntu 20.04 (Focal Fossa), which is also the OS this project has been developed and tested on.
- ROS packages such as rviz (data visualization) and rqt_reconfigure (GUI for dynamic reconfiguring of ROS parameters) are installed by rosdep, the "package manager" of ROS.
- Kvasers canlib drivers are used for communication on the Twizy's CAN bus.
- libsbp, or rather the python package sbp is used for communication with GNSS sensors.
- webots is used to simulate a virtual car for testing.
This project was developed and tested on Ubuntu 20.04 (Focal Fossa), which can be dual booted alongside other operating systems (see online tutorials). Further instructions assume you are running on Ubuntu 20.04:
After you install the OS and before going further you should upgrade firmware:
sudo apt update
sudo apt upgradethen reboot. Skipping this step might prevent self-built drivers from loading.
-
Install git
sudo apt install git
-
Create a Github account
-
Clone the repo
git clone [email protected]:OssianEriksson/autonomous-twizy.git ~/autonomous-twizy/src
Running the following script will install all the software mentioned under Overview of Software and Frameworks for you:
~/autonomous-twizy/src/install.shIf you experience trouble with the installation, make sure you have completed all the above mentioned steps correctly. Otherwise the installation log and the source code of the script that generated it is your friend.
Finish the installation by running
source ~/.bashrcFirst make sure to change into the catkin workspace:
cd ~/autonomous-twizyThe build all packages in the workspace using the command
catkin_makeSince no build existed prior to running the above commands, you also need to run
source devel/setup.bashonce. In the future the .bashrc script which runs in every new terminal will take care of sourcing devel/setup.bash for you.
Make sure to first build all packages.
catkin_make run_testsTo run a specific python unittest, use
nosetests3 <path/to/file.py> [--nocapture]where --nocapture allows the tests to print directly to the console.
To instead run a specific rostest launch (test) file, use
rostest <package_name> <test_file.test> [--text]where --text prints the test log (including stdout) directly to the console instead of saving the result to a file for later viewing.
Make sure to first build all packages.
The following command will start an example simulation where you can drive the car with your keyboard:
roslaunch twizy_bringup webots_keyop.launchYou can view pre-built code API on Github pages. The pre-built documentation gets automatically regenerated every time a commit is pushed to the master branch. Alternatively you can build the documentation locally with
~/autonomous-twizy/src/build_docs.shThis script installs some dependencies and then builds API documentation for all packages in the workspace with a rosdoc.yaml file in its root directory using rosdoc_lite. The API docs will get built to ~/autonomous-twizy/docs, and you can view the finished build in a web browser, for example firefox:
firefox ~/autonomous-twizy/docs/index.htmlSee READMEs in root directory of the corresponding ROS package, e.g. for piksi_multi_rtk see piksi_multi_rtk/README.md.