Table of Contents
- Install the Unity Editor
- Clone the Project
- Set Up the ROS 2 Environment
- Continue on to Setting up the Unity Project
This project was most recently validated with the Editor version listed in the ProjectVersion.txt file. If you have a more recent version, it will most likely work fine, or you may download the exact version we used from the release page here. Note that if using a more recent version, you will receive some warnings to this effect when you first open the project, but you are fine to proceed through them.
Check out the project using your method of choice, or simply copy the following line into a terminal with the git
CLI installed:
git clone --recurse-submodule [email protected]:Unity-Technologies/Robotics-Nav2-SLAM-Example.git
Observe our usage of
--recurse-submodules
to ensure any dependencies are checked out. If you miss this part, you will need to usegit submodule update --init --recursive
later to download and update the submodules.
This project should work with any appropriately configured ROS 2 environment, but we strongly encourage users new to ROS to build the environment from the Dockerfile provided with the project, which exposes a pre-configured ROS 2 environment to you via a built-in web VNC client. We may be unable to provide adequate troubleshooting support for other environments.
- From the root of the repository, run the following:
cd ros2_docker docker build -t unity-robotics:nav2-slam-example ./
This build process will take at least 10 minutes, depending on your download speeds and hardware specificiations, but you are free to proceed to next step while it is building.
If you prefer to use your own VM, or have ROS 2 installed natively and would like to use that instead, the colcon workspace for the ROS 2 side is located in the ros2_docker/colcon_ws
directory. You can relocate this folder to your VM, or colcon build
it directly from the workspace root. Note that you may need to use rosdep
to ensure you have the appropriate dependencies in place before your build and execution will both succeed.
Once you're done configuring your environment to support this example, you can proceed to Setting up the Unity Project.