Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Snowflake to ROS Noetic and Ubuntu 20.04 #417

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
CLion*
clion*
*~
.swp
*.swp
filter_init.txt
cmake-build-debug
cmake-build-release
Expand Down
9 changes: 9 additions & 0 deletions .rosinstall
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- git:
local-name: src/external_pkgs/nmea_navsat_driver
uri: https://github.com/UBC-Snowbots/nmea_navsat_driver.git
version: noetic-snowbots-mods
- git:
local-name: src/external_pkgs/realsense-ros
uri: https://github.com/IntelRealSense/realsense-ros.git
Expand All @@ -10,6 +11,7 @@
- git:
local-name: src/external_pkgs/ros_arduino_bridge
uri: https://github.com/UBC-Snowbots/ros_arduino_bridge.git
version: noetic-snowbots-mods
- git:
local-name: src/external_pkgs/sicktoolbox
uri: https://github.com/UBC-Snowbots/sicktoolbox.git
Expand All @@ -23,3 +25,10 @@
local-name: src/mapping_urc/multi_resolution_graph
uri: 'https://github.com/garethellis0/multi_resolution_graph.git'
version: 0.0.3
- git:
local-name: src/external_pkgs/qt_ros
uri: https://github.com/stonier/qt_ros.git
- git:
local-name: src/external_pkgs/phidgets_drivers
uri: https://github.com/ros-drivers/phidgets_drivers.git
version: melodic
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cache:
language: generic
# currently running on ubuntu 18.04
os: linux
dist: bionic
dist: focal

# install all dependencies necessary to build our project
install:
Expand All @@ -14,7 +14,7 @@ install:
# compile and run tests
script:
# setup ROS
- source /opt/ros/melodic/setup.bash
- source /opt/ros/noetic/setup.bash
# create workspace
- catkin_make
# setup catkin path variables
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ You will be downloading an Ubuntu ISO and multiple ROS packages with their respe
It is highly recommended that you have access to high speed internet while doing this entire setup;
if you're on campus use the `ubcsecure` or `resnet` networks for best results.

1. Install Ubuntu 18.04 (**Note**: Download 18.04, **not** another version, as other Ubuntu versions will make setting up this repo much more painful) (**Backup your important data first**) (We recommend you use a minimum of 30GB of space)
- For dual-booting: [Windows Instructions](https://askubuntu.com/questions/1031993/how-to-install-ubuntu-18-04-alongside-windows-10), [Mac Instructions](https://www.maketecheasier.com/install-dual-boot-ubuntu-mac)
2. If you haven't done so already, setup your UBC alumni email account [here](https://id.ubc.ca/)
1. Install Ubuntu 20.04 (**Note**: Download 20.04, **not** another version, as other Ubuntu versions will make setting up this repo much more painful) (**Backup your important data first**) (We recommend you use a minimum of 30GB of space)
- For dual-booting: [Windows Instructions](https://linuxconfig.org/how-to-install-ubuntu-20-04-alongside-windows-10-dual-boot), [Mac Instructions](https://www.maketecheasier.com/install-dual-boot-ubuntu-mac)
2. If you haven't done so already, setup your UBC email account [here](https://id.ubc.ca/)
3. Using your UBC email account, get a JetBrains education account [here](https://www.jetbrains.com/shop/eform/students)
- _JetBrains will send an initial email to confirm the UBC email you inputted,
once you've confirmed another email will be sent to activate your new education account;
Expand All @@ -45,7 +45,7 @@ if you're on campus use the `ubcsecure` or `resnet` networks for best results.
7. Clone your server-side repository from the terminal by running `git clone --recursive https://github.com/YOUR_USERNAME/Snowflake.git` (`YOUR_USERNAME` is your github username)
8. To start the setup run `cd ~/Snowflake && ./setup_scripts/install_tools.sh` (Do not run this script as root).
- *Just choose yes and enter your password when the terminal prompts you*
9. Run `source /opt/ros/melodic/setup.sh`.
9. Run `source /opt/ros/noetic/setup.sh`.
10. To build the workspace run `catkin_make`. If everything compiles correctly and you don't get any errors, then you're good to go!
11. If catkin_make fails, and mentions missing .cmake files, run `./setup_scripts/install_dependencies.sh`.

Expand Down Expand Up @@ -75,6 +75,8 @@ Current packages included under wstool:
- NMEA_Navsat_Driver: NMEA msg driver
- Zed_ROS_Wrapper: Wrapper for interfacing Zed Stereo Cam with ROS
- realsense: Wrapper for interfacing the Realsense D415 with ROS
- qt_ros: Interface for integrating ROS with QT
- phidgets_drivers: Interface for integrating ROS and Phidgets drivers

### Nodelets Quick Guide
See [here](nodelets.md)
Expand Down
Binary file removed clang-format/clang-format-4.0
Binary file not shown.
5 changes: 1 addition & 4 deletions clang-format/fix_formatting.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/bash

# The version of the clang executable to use
export CLANG_VERSION=4.0

# The current directory
CURR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Expand All @@ -14,7 +11,7 @@ fi
TARGET_BRANCH=$1

# Fix formatting on all changes between this branch and the target branch
OUTPUT="$($CURR_DIR/git-clang-format --binary $CURR_DIR/clang-format-$CLANG_VERSION --commit $TARGET_BRANCH)"
OUTPUT="$($CURR_DIR/git-clang-format --binary clang-format --commit $TARGET_BRANCH)"

# Print the output (the files changed), replacing spaces with newlines
printf '%s\n' $OUTPUT
17 changes: 10 additions & 7 deletions setup_scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
CURR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "================================================================"
echo "Installing ROS Melodic"
echo "Installing ROS Noetic"
echo "================================================================"

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:rock-core/qt4 -y

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc -O - | sudo apt-key add -
sudo apt-get update -y

sudo apt-get install python-catkin-pkg python-wstool python-rosdep python-rosinstall-generator ros-melodic-desktop-full -y
source /opt/ros/melodic/setup.sh
sudo apt-get install python3-catkin-pkg python3-wstool python3-rosdep python3-rosinstall-generator ros-noetic-desktop-full -y
source /opt/ros/noetic/setup.sh

# Prepare resdep to install dependencies
sudo rosdep init
Expand Down Expand Up @@ -51,13 +54,13 @@ cd $CURR_DIR
rosdep install --from-paths \
$CURR_DIR/../src \
$CURR_DIR/../src/external_pkgs \
--ignore-src --rosdistro melodic --skip-keys=librealsense2 -y
--ignore-src --rosdistro noetic --skip-keys=librealsense2 -y

echo "================================================================"
echo "Installing other dependencies specified by our packages"
echo "================================================================"
cd $CURR_DIR
sudo ./setup_realsense_manual.sh
sudo ./setup_realsense.sh

cd $CURR_DIR
sudo ./install_phidgets.sh
Expand All @@ -68,7 +71,7 @@ echo "================================================================"

sudo apt-get install -y\
clang-format\
python-rosinstall
python3-rosinstall

echo "================================================================"
echo "Finished Installing Utilities"
Expand Down
2 changes: 1 addition & 1 deletion setup_scripts/install_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SHELL_CONFIG_FILES=(
# listed above, if they are not present already
declare -a new_shell_config_lines=(
# Source the ROS Environment Variables Automatically
"source /opt/ros/melodic/setup.sh"\
"source /opt/ros/noetic/setup.sh"\
# Make sure that all shells know where to find our custom gazebo models,
# plugins, and resources. Make sure to preserve the path that already exists as well
"export GAZEBO_MODEL_PATH=$DIR/../src/sb_gazebo/models:${GAZEBO_MODEL_PATH}"\
Expand Down
20 changes: 9 additions & 11 deletions setup_scripts/setup_realsense.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,22 @@ echo "================================================================"
echo "Configuring realsense repository and drivers."
echo "================================================================"

sudo apt-get install -y software-properties-common
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u
sudo rm -f /etc/apt/sources.list.d/realsense-public.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u

sudo apt-get update -y

# TODO (#359): We can (and SHOULD) switch back to using the below line once
# the ros realsense packages are updated to work with librealsense2 2.16.2
# see https://github.com/intel-ros/realsense/issues/502 for updates.
# (Right now we just peg the version to 2.16.1)
# sudo apt-get install -y librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg
version="2.16.3-0~realsense0.116"
sudo apt-get install librealsense2-dkms -y
sudo apt install librealsense2=${version} -y
sudo apt-get install librealsense2-utils=${version} -y
sudo apt-get install librealsense2-dev=${version} -y
sudo apt-get install librealsense2-dbg=${version} -y
sudo apt-get install -y librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg
# version="2.16.3-0~realsense0.116"
# sudo apt-get install librealsense2-dkms -y
# sudo apt install librealsense2=${version} -y
# sudo apt-get install librealsense2-utils=${version} -y
# sudo apt-get install librealsense2-dev=${version} -y
# sudo apt-get install librealsense2-dbg=${version} -y

echo "================================================================"
echo "Finished configuring realsense. "
Expand Down
2 changes: 1 addition & 1 deletion setup_scripts/setup_udev_rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fi
# Copy the new phidgets udev rules to the rule folder
# From the installation to the udev folder
# Apt should theoretically do this but it doesn't
sudo cp /opt/ros/melodic/share/phidgets_api/udev/99-phidgets.rules $FILE
sudo cp /opt/ros/noetic/share/phidgets_api/udev/99-phidgets.rules $FILE

echo "================================================================"
echo "Finished Installing phidgets udev rules"
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Loading