Skip to content

Bfolefack/Summer-Camp-Rosbag-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summer Camp Rosbag Docker

Installation Instructions

  1. Install and run Docker Desktop from here
  2. Install Xming from here (The download looks sketchy, but I pinky promise it's safe)
  3. Run Xlaunch and make sure it is running in the background, the default settings should work fine
  4. Clone this repository
  5. Go into src folder and double click to run launch.bat to build the docker image and start the container (This will take a while the first time)
  6. Run usbipd-win_4.2.0 from the repository to install the USB driver

How to Launch the Docker Container

  1. First run command prompt as administrator
  2. Run the following commands in this terminal to start the usbipd service and attach the realsense camera to the docker container:
    1. Run usbipd list to list the USB devices. You should see a list of USB devices. The realsense camera should be listed as Intel(R) RealSense(TM) Depth Camera 435i
    2. Run usbipd bind --busid <busid> to bind the realsense camera to the usbipd service. Replace <busid> with the busid of the realsense camera.
    3. Run usbipd attach --wsl --busid <busid> to attach the realsense camera to the WSL. Replace <busid> with the busid of the realsense camera.
    4. Congrats! You have successfully attached the realsense camera to the WSL.
  3. Make sure Docker Desktop is running
  4. Run launch.bat to start the docker container
  5. 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
  6. 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.

How to Record and Play a Rosbag with SLAM

  1. Open a terminal in the docker container by running connect.bat in the src folder in this terminal run the command roscore
  2. 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.
  3. 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 the Displays 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 run launch.bat to start fresh.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published