Our codebase is developed for an NVIDIA Jetson TX2, which runs Ubuntu Linux; as such, much of our code will be Unix-specific.
⚠️ The only supported platform is Ubuntu 22.04 LTS. Other versions/distros/platforms may work, but if you want as easy as possible, go with this version.
We will be using vmware workstation for Windows, or UTM for Mac (For additional support, this installation process is based on CSE 478 virtual machine setup guide however please refer to instructions in this readme for specific files such as os images).
- First install the VM
- Windows: vmware workstation, setup an account and install the desktop application.
- Mac: UTM, click download from their page.
- Install the OS image to your laptop.
- Finish all of the install instructions for the ubuntu install (This will take a long time so go do some homework or look through the repo).
- Install basic requirements
-sudo apt install git - Setup SSH keys in the VM
- Clone the repo inside of the VM
-git clone git@github.com:huskyroboticsteam/Overhaul.git - Generate SSH keys
- 'ssh-keygen -t ed25519 -C "your_email@example.com"' - Add the keys to your githubs SSH Keys
- Clone the repository:
-git clone git@github.com:huskyroboticsteam/Overhaul.git --recursive - Follow ROS install instructions on the ROS website - Follow all instructions up until Try some examples
- Install Gazebo ign Fortress binaries
- Then install the ROS Gazebo dependencies install guide
Never update your VM! Ubuntu will try to do it for some reason, just don't do it. Same goes for os on laptops
Next open a terminal and enter the Overhaul folder within this repo
cd \OverhaulThen build the docker container
ctrl + shift + p and search Rebuild and Reopen in containers
Normally just do Reopen in containers so you don't have to build every time
Running into the failed to connect to the docker API at npipe:////./pipe/dockerDesktopLinuxEngine;??
Enter the docker desktop app and go to the top right setting icon. Then enter the Resources tab on the left. Disable integration with WSL distro, save and restart in the bottom corner. Then recheck the enable integration with my defaul WSL distro. Rebuild and reopen and it should work!
Then wait for a really long time until it lets you type to exit. In the top bar of vs code click terminal and hit new terminal. At this point you are in the VM and can start developing!
Windows VNC
If you need a graphical interface (you most likely will) you will need to do some more setup
First instal the VNC viewer application. Any works however I personally use this one
Everytime you boot up the docker container you must follow the steps above to create a new terminal. Once in that terminal run the
./start_vnc.shThen Open up real VNC
- If you have not made a connection to the session yet right click the background and click new connection
- Type in the address 127.0.0.1:5901, you can name the vnc session anything (mine is HRT_Container)
- connect to it and enter the password dockervnc
- It should connect to the session and you can now see the desktop!
From here on out, the installation instructions will assume you are using Ubuntu 22.04 LTS. Windows users should run commands in either their Linux VM or their WSL terminal. For Linux users, we'll assume you're running Ubuntu; users of another distribution may need to change some instructions (e.g. package managers) depending on your distro. Mac users can you run set of instructions in their local terminal or VM.
Read instructions in .devcontainer/README.md first! This will allow all of our builds to be in the same environments (hopefully)!
From here instructions assume that you are in a linux environment
- Install Dev Containers extension to vscode
- Left side bar find extensions and search for Dev Containers. Correct one is by microsoft.
- Install
- Run
Dev Containers: Reopen in Containerin vscode command palette
In one terminal, source /opt/ros/humble/setup.bash (Should be sourced by default but just in case)
For VM users use . ~/ros2_humble/install/local_setup.bash
Then run the build command in the project root directory, colcon build
In a separate terminal from where you built, source /opt/ros/humble/setup.bash
Then, source install/local_setup.bash
Finally, ros2 run rover Rover --ros-args -p peripheral:=<peripheral>
Running mc node ros2 run mc --ros-args
Alternatively you can launch all nodes with:
ros2 launch rover rover_launch.xml
Or with the image CI publishes (--net=host so it can reach the host's can0):
docker run --rm --net=host ghcr.io/huskyroboticsteam/overhaul:latestcolcon test --ctest-args -LE linter && colcon test-result --verbose-LE linter skips the ament linters, which the code doesn't pass yet.
CI (.github/workflows/ci.yml) builds the root Dockerfile, runs the tests in it, and pushes an amd64/arm64 image to GHCR on every push to main and every PR commit (latest and main tags from main, pr-<n> from PRs, plus sha-<commit>). Dependabot (.github/dependabot.yml) opens weekly PRs for action and base-image updates.
- Install dep
pip install pynput - Run
ros2 run rover controller_node.py
Suppose we want to add a custom ROS2 package (i.e rosbag2). Remember to update the following:
-
package.xml- Add<depend>custom_node</depend> -
CMakeLists.txt- Addfind_package(custom_node REQUIRED) -
CMakeLists.txt- Addcustom_nodeunderament_target_dependenciesf After adding, run the following: -
Install external dependencies
rosdep install --from-paths src --ignore-src -y(as ChatGPT says, "get ingredients 🛒✨") -
Run CMake
colcon build --packages-select rover(as ChatGPT says "cook the meal 🍳✨")
Add install steps into Dockerfile. For example, add the following to Dockerfile:
RUN apt-get install -y ros-humble-mavros ros-humble-mavros-extras
- If the Jetson isn't connecting to the internet, try the following on the host computer:
- Change "Wired Connected" to 10.40.0.x
- Go to "Wired Settings" and make sure "Shared to other computers" is checked (under IPv4)
- Try disabling the firewall with the following command:
sudo ufw disable. If it works after disabling the firewall, setDEFAULT_FORWARD_POLICYtoACCEPTin/etc/default/ufw. You can re-enable ufw after it is set. - There might also be some DNS issues on the Jetson. Good luck if that's the case.