- Install and run Docker Desktop from here
- Install Xming from here (The download looks sketchy, but I pinky promise it's safe)
- Run Xlaunch and make sure it is running in the background, the default settings should work fine
- Clone this repository
- Go into
src
folder and double click to runlaunch.bat
to build the docker image and start the container (This will take a while the first time) - Run usbipd-win_4.2.0 from the repository to install the USB driver
- First run command prompt as administrator
- Run the following commands in this terminal to start the usbipd service and attach the realsense camera to the docker container:
- Run
usbipd list
to list the USB devices. You should see a list of USB devices. The realsense camera should be listed asIntel(R) RealSense(TM) Depth Camera 435i
- Run
usbipd bind --busid <busid>
to bind the realsense camera to the usbipd service. Replace<busid>
with the busid of the realsense camera. - Run
usbipd attach --wsl --busid <busid>
to attach the realsense camera to the WSL. Replace<busid>
with the busid of the realsense camera. - Congrats! You have successfully attached the realsense camera to the WSL.
- Run
- Make sure Docker Desktop is running
- Run
launch.bat
to start the docker container - Run
connect.bat
this will open a new terminal in the docker container, whenever you need a new terminal in the docker container, run this command - When you are done, run
kill.bat
to stop the docker container. This will also save any rosbag files that were recorded during the session.
- Open a terminal in the docker container by running
connect.bat
in thesrc
folder in this terminal run the commandroscore
- In another terminal in the docker container run the shell script
./record_SLAM.sh
to start recording a rosbag file and running the SLAM algorithm. - To stop recording the rosbag file and the SLAM algorithm, press
Ctrl+C
in the terminal where you ran the./record_SLAM.sh
command. Give the terminal some time to finish saving the rosbag file before closing the terminal. Wait longer for larger rosbag files.
Notes:
- The script will start recording immediately, so make sure to start the script when you are ready to start recording.
- The SLAM algorithm is very volatile and will fail if the camera is moved too quickly. When this happens you will see the camera's transform in the rviz window fly off into space. If this happens, close the terminal and start the script again.
- To see the Map in rviz, click the checkbox next to
MapCloud
in theDisplays
panel on the left side of the rviz window. - If you are ever having problems with either the rosbag recording or the SLAM algorithm, run
kill.bat
to stop the docker container and then runlaunch.bat
to start fresh.