-
-
Notifications
You must be signed in to change notification settings - Fork 5
2. Install ROS
We highly recommend running Ubuntu 20.04 LTS natively. This will be by far the smoothest experience. There are many tutorials on dual booting out there if you are not comfortable with daily driving Linux. You will likely need 20-30 GB of space for your Linux partition.
Please note that we will only officially support Ubuntu 20.04 LTS running natively. All other options are not as thoroughly tested and we cannot provide the same level of support if you run into any issue. However, here are some other options you can try to explore:
- Ubuntu 20.04 LTS in a VM (Makes things like USB and GPU access difficult)
- Other Linux distro of choice with an Ubuntu Docker container
- Natively setup ROS on some other distro by compiling all packages from sources (some of our members have been successful in doing this for Arch)
- Intel Mac with virtual machine
- M1 Mac with UTM and virtualized Ubuntu Arm Server
- WSL on Windows 11 (has issues with RViz graphics)
Some other things to know:
- WSL on Windows 10 is missing a lot of features and has proven to be much more trouble than its worth. WSL on Win11 still leaves a lot to be desired and does have strange issues from time to time, but seems to be much better. WSL is by far the worst option listed though in any case.
The following steps may or not be necessary prerequisites. If you find other important steps, have better tutorial links, or don't think something is necessary for certain Windows devices, please add your knowledge.
- Turn off Bitlocker
- Disable Fast Boot (You may need to enable or disable hibernate)
- Disable Secure Boot
Read this page for an explanation and tutorial on dual booting. There is of course no need to install Windows if you already have it installed. Follow this link to get the desktop image of Ubuntu 20.04. When downloading Rufus, use the "Installer" button.
When asked whether you'd like a trial or full version of Ubuntu, select the full version with normal (not minimal) installation, and do not select to install 3rd party software. After everything is set up and you're getting familiar with Ubuntu, you can update drivers like so:
- Search (by pressing the windows key) for "update manager" and select "software updater".
- When a box says your computer is up to date, click settings.
- Open the Additional Drivers tab.
- Look for a proprietary, tested driver. If one exists, select it and click "Apply changes".
If you can't get audio to work, open the terminal and enter sudo alsa force reload.
Again, please update this section if you come across anything else that needs to be done for dual booting from Windows.
Docker is a platform for containers. Containers are essentially a way to package the userspace of an operating system and ship it. By using containers, you can avoid having to manually install dependencies and set up the enviornment. Instead, you will essentially use a copy of our development environment.
First pull the auton Docker image from Docker Hub.
docker pull umrover1/ros:autonThen create a catkin workspace directory called "catkin_ws" in your home directory, and clone the MRover repo into it (this doesn't have to be called "catkin_ws" and it doesn't have to be directly in your home directory, but these are the standards we use). Then you will have to rename the repo from "mrover-ros" to "mrover" to align with the package name.
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/umrover/mrover-ros.git
mv ~/catkin_ws/src/mrover-ros ~/catkin_ws/src/mroverIf instead, you already have a catkin workspace with the MRover repo in it, you will need to effectively reset your catkin workspace by deleting everything but the src directory. This is necessary because the paths initialized by catkin when running catkin init locally will no longer work once your catkin workspace is mounted to the Docker container.
cd ~/catkin_ws
rm -rf devel/ build/ .catkin_tools/ logs/Now you can run the Docker container with your catkin workspace mounted to it, and open a bash shell inside of it
docker run -it --name ros_auton --env="DISPLAY" --volume=/home/${USER}/catkin_ws/:/mnt/ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --privileged umrover1/ros:auton bashOnce you are inside the Docker container, you will need to initialize (or reinitialize) and build your catkin workspace, which is now located in the /mnt folder
cd /mnt
catkin init
catkin buildNow that your catkin workspace is ready, you need to source the ROS setup files. you will need to do this every time you open a new terminal session inside the Docker container
source /opt/ros/noetic/setup.bash
source /mnt/devel/setup.bashTo open additional terminal sessions in the same Docker container, run
docker exec -it ros_auton bashor use a terminal multiplexer like tmux.
First, add ROS to your package repositories and install base ROS packages
sudo apt install curl git python3-pip -y
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update -y
sudo apt install ros-noetic-desktop python3-catkin-tools python3-rosdep -yThen create a catkin workspace directory called "catkin_ws" in your home directory, and clone the MRover repo into it (this doesn't have to be called "catkin_ws" and it doesn't have to be directly in your home directory, but these are the standards we use). Then you will have to rename the repo from "mrover-ros" to "mrover" to align with the package name.
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/umrover/mrover-ros.git
mv ~/catkin_ws/src/mrover-ros ~/catkin_ws/src/mroverNext you need to initialize your catkin workspace and build the mrover package:
cd ~/catkin_ws
catkin init
catkin buildNow that your catkin workspace is ready, you need to source the ROS setup files:
source /opt/ros/noetic/setup.bash
source ~/catikn_ws/devel/setup.bashThis needs to be done every time you open a new terminal session, so if you want this to be done automatically you can put it in your .bashrc file (which gets run every time you open a new bash terminal) by running these commands:
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
echo "source ~/catikn_ws/devel/setup.bash" >> ~/.bashrcNow use rosdep to install all necessary dependencies:
sudo rosdep init
rosdep update
rosdep install --from-paths ~/catkin_ws/src/ --ignore-src -y --rosdistro=noeticTo run a quick sanity test, try roslaunch mrover minimal.launch. RViz should pop up and no red errors should be present in console.
You can also run rosrun teleop_twist_keyboard teleop_twist_keyboard.py to move the robot around.