Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Install and configure ROS

emcauliffe edited this page Jan 29, 2023 · 1 revision

Quick Start (ROS already installed)

1. Clone this repo to your desired location

git clone https://github.com/MacRover/Rover.git

2. Build the ROS environment

cd ROS_WS
catkin_make

Windows Install (Windows 10 v2004+)

1. Set up WSL 2 on Windows

2. Install an X server for Windows

3. Configure VcXsrv to work with your Ubuntu WSL install

  • In your Ubuntu terminal prompt (Should be able to search for "Ubuntu" in the start menu to find this), type:

    nano ~/.bashrc
    

    Don't delete anything, but paste the following lines at the end of the file (use arrow keys to scroll down):

    # Connect to Windows X11 server
    export DISPLAY=`grep -oP "(?<=nameserver ).+" /etc/resolv.conf`:0.0
    export LIBGL_ALWAYS_INDIRECT=1
    

    Press Ctl+X and then Y to save and exit.

    Finally, run

    source ~/.bashrc
    
  • Open XLaunch on Windows (search for XLaunch in the start menu)

    Select Multiple Windows and set display number to -1. Click next.

    xlaunch 1st prompt

    Select Start no client. Click next.

    Uncheck Native OpenGL and check Disable access control. Click next.

    xlaunch prompt 2

    Save the configuration file somewhere you can remember. Next time you can just open this and skip the config options. Click finish.

    If you get a prompt from Windows firewall, make sure to allow permissions on both private and public networks.

4. Clone this Rover repo to your Ubuntu WSL distro

  • In the terminal on Ubuntu, type:

    git clone https://github.com/MacRover/Rover.git
    
  • You can clone it to wherever you want in your Linux install, just make sure you know where it is.

  • After cloning, cd into the repo

    cd Rover
    

5. Install ROS

6. Build the ROS environment

  • Inside the git repo (where you should already be), type:

    cd ROS_WS
    catkin_make
    

7. VSCode Integration (optional but useful)

Native Linux install

Check out the ROS installation instructions on the ROS wiki.