Skip to content

ubuntu22.04 support #626

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

Merged
merged 32 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b1fad31
[GA] add github action for jammy using ROS-O
sugikazu75 Oct 8, 2024
c6fa3fe
update
sugikazu75 Oct 8, 2024
6b99cd1
update
sugikazu75 Oct 8, 2024
d8f6f4a
ubnutu:jammy
sugikazu75 Oct 8, 2024
188477f
ubnutu-22.04
sugikazu75 Oct 8, 2024
2cdc3f2
[GA] setup ros workspace and catkin build
sugikazu75 Oct 8, 2024
9979475
[GA] noetic->one
sugikazu75 Oct 8, 2024
04ff073
[GA] python3-wstool
sugikazu75 Oct 8, 2024
a2d0cfc
[GA] sudo apt install python3-wstool
sugikazu75 Oct 8, 2024
f2a8573
[spinal] cmake17
sugikazu75 Oct 8, 2024
e526557
add rosinstall for debian. modified from noetic one
sugikazu75 Oct 8, 2024
03e7e1a
update rosinstall path
sugikazu75 Oct 8, 2024
c829c18
fix typo
sugikazu75 Oct 8, 2024
c6c7221
[motor test] C++17
sugikazu75 Oct 8, 2024
e1e53bd
[GA] catkin build only aerial_robot and run catkin test
sugikazu75 Oct 8, 2024
663301a
skip libgeographiclib-dev
sugikazu75 Oct 8, 2024
0866888
[GA] ignore rosdep install error temporality
sugikazu75 Oct 12, 2024
4ec89d9
[ROS-O][rosinstall] use C++17 patched mocap_optitrack package (#13)
sugikazu75 Oct 13, 2024
01fcae9
[ROS-O][rosinstall] update external repository path and version (#15)
sugikazu75 Oct 22, 2024
8f5a066
use self released apt repository
sugikazu75 Oct 31, 2024
0c99f48
update external repositry version
sugikazu75 Nov 1, 2024
840d069
remove external repositry from rosinstall because they are released
sugikazu75 Nov 1, 2024
9d8848d
remove error ignore flag when rosdep install
sugikazu75 Nov 1, 2024
e0a95ed
[mocap_optitrack] add mocap_optitrack package to rosinstall
sugikazu75 Nov 4, 2024
2495fe2
[ROS-O][GA] build all packages
Nov 6, 2024
534e418
[CI] remove the script for EoL ros distribution
Nov 11, 2024
d20b2bc
[CI][GA] merge ros one distribution test into .travis.sh
Nov 11, 2024
f57aaf1
[ROS-O] crate configure script to install ros-o system for jammy
tongtybj Nov 12, 2024
525525a
[ROS-O] update REAMDE to show the install instruction on Ubuntu22.04
tongtybj Nov 12, 2024
b1690ae
Merge pull request #19 from tongtybj/GA/jammy
sugikazu75 Nov 12, 2024
87b1c3b
fix typo in README
sugikazu75 Nov 12, 2024
c164a34
[rosinstall] remove rosinstall for EoL distribution
sugikazu75 Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ros_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
DOCKER_IMAGE : ubuntu:bionic
- ROS_DISTRO : noetic
DOCKER_IMAGE : ubuntu:focal
- ROS_DISTRO : one
DOCKER_IMAGE : ubuntu:jammy
steps:
- name: Setup OS
run: |
Expand Down
66 changes: 18 additions & 48 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@

set -ex

apt-get update -qq && apt-get install -y -q wget sudo lsb-release gnupg git sed build-essential # for docker
apt-get update -qq && apt-get install -y -q wget sudo lsb-release gnupg git sed build-essential ca-certificates # for docker
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections

echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
sudo sh -c "echo \"deb ${REPOSITORY} `lsb_release -cs` main\" > /etc/apt/sources.list.d/ros-latest.list"
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq

# Install ROS
if [[ "$ROS_DISTRO" == "noetic" ]]; then
sudo apt-get install -y -q python3-catkin-pkg python3-catkin-tools python3-rosdep python3-wstool python3-rosinstall-generator python3-osrf-pycommon python-is-python3
if [[ "$ROS_DISTRO" == "one" ]]; then
${CI_SOURCE_PATH}/configure.sh
else
sudo apt-get install -y -q python-catkin-pkg python-catkin-tools python-rosdep python-wstool python-rosinstall-generator
sudo sh -c "echo \"deb ${REPOSITORY} `lsb_release -cs` main\" > /etc/apt/sources.list.d/ros-latest.list"
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq

if [[ "$ROS_DISTRO" == "noetic" ]]; then
sudo apt-get install -y -q python3-catkin-pkg python3-catkin-tools python3-rosdep python3-wstool python3-rosinstall-generator python3-osrf-pycommon python-is-python3
else
sudo apt-get install -y -q python-catkin-pkg python-catkin-tools python-rosdep python-wstool python-rosinstall-generator
fi
sudo apt-get install -y -q ros-$ROS_DISTRO-catkin

# Setup for rosdep
sudo rosdep init
rosdep update --include-eol-distros
fi
sudo apt-get install -y -q ros-$ROS_DISTRO-catkin

source /opt/ros/${ROS_DISTRO}/setup.bash

# Setup for rosdep
sudo rosdep init
# use snapshot of rosdep list
# https://github.com/ros/rosdistro/pull/31570#issuecomment-1000497517
if [[ "$ROS_DISTRO" = "kinetic" ]]; then
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
sudo wget https://gist.githubusercontent.com/cottsay/b27a46e53b8f7453bf9ff637d32ea283/raw/476b3714bb90cfbc6b8b9d068162fc6408fa7f76/30-xenial.list -O /etc/ros/rosdep/sources.list.d/30-xenial.list
fi
rosdep update --include-eol-distros
source /opt/ros/${ROS_DISTRO}/setup.bash

# Install source code
mkdir -p ~/catkin_ws/src
Expand All @@ -39,36 +39,6 @@ wstool merge -t src src/${REPOSITORY_NAME}/aerial_robot_${ROS_DISTRO}.rosinstall
wstool update -t src
rosdep install --from-paths src -y -q -r --ignore-src --rosdistro ${ROS_DISTRO} # -r is indisapensible

if [ ${ROS_DISTRO} = 'kinetic' ]; then
path=~/.gazebo/models/sun
echo "manually download the sun gazebo model to ${path}"
mkdir -p ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model-1_2.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model-1_3.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model-1_4.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model.config -P ${path}

path=~/.gazebo/models/ground_plane
echo "manually download the ground_plane gazebo model to ${path}"
mkdir -p ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model-1_2.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model-1_3.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model-1_4.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model.sdf -P ${path}
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model.config -P ${path}
fi

if [[ "$ROS_DISTRO" = "kinetic" ]]; then
# to use c++17
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y g++-7
export CXX='g++-7'
export CC='gcc-7'
fi

# Build
catkin config --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
catkin build --no-status
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,40 @@

## Setup

### Ubuntu 18.04, 20.04

#### Install ROS1 from official site
- Melodic: https://wiki.ros.org/melodic/Installation/Ubuntu
- Noetic: https://wiki.ros.org/noetic/Installation/Ubuntu

#### Build

```bash
source /opt/ros/${ROS_DISTRO}/setup.bash # please replace ${ROS_DISTRO} with your specific env variable, e.g., melodic
sudo apt install -y python3-wstool python3-catkin-tools # for melodic, please replace `python3` with `python`
mkdir -p ~/ros/jsk_aerial_robot_ws/src
cd ~/ros/jsk_aerial_robot_ws
sudo rosdep init
rosdep update
wstool init src
wstool set -u -t src jsk_aerial_robot http://github.com/jsk-ros-pkg/jsk_aerial_robot --git
./src/jsk_aerial_robot/configure.sh # for configuration especially for ros-o in jammy
wstool merge -t src src/jsk_aerial_robot/aerial_robot_${ROS_DISTRO}.rosinstall
wstool update -t src
rosdep install -y -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO
catkin build
```

### Ubuntu 22.04 (ROS-O)

```bash
sudo apt install -y python3-wstool
mkdir -p ~/ros/jsk_aerial_robot_ws/src
cd ~/ros/jsk_aerial_robot_ws
wstool init src
wstool set -u -t src jsk_aerial_robot http://github.com/jsk-ros-pkg/jsk_aerial_robot --git
./src/jsk_aerial_robot/configure.sh # for configuration especially for ros-o in jammy
source /opt/ros/one/setup.bash
wstool merge -t src src/jsk_aerial_robot/aerial_robot_${ROS_DISTRO}.rosinstall
wstool update -t src
rosdep install -y -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO
Expand Down
34 changes: 27 additions & 7 deletions aerial_robot_kinetic.rosinstall → aerial_robot_debian.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
- git:
local-name: aerial_robot_3rdparty
uri: https://github.com/JSKAerialRobot/aerial_robot_3rdparty.git
version: b10f5bf
version: 4085d3a

# kalman filter
- git:
local-name: kalman_filter
uri: https://github.com/JSKAerialRobot/kalman_filter.git
version: 012b925
version: 5c7a410

# the sensor interface
- git:
local-name: sensor_interface
uri: https://github.com/JSKAerialRobot/sensor_interface.git
version: c4570c0
version: e8286e7

# RTK-GPS
# support RTK based GPS module.
Expand All @@ -29,10 +29,30 @@
- git:
local-name: rosserial
uri: https://github.com/tongtybj/rosserial.git
version: kinetic-devel
version: rosservice_server

# livox ros driver
# modification for quick build of ROS1 version
- git:
local-name: livox_ros_driver2
uri: https://github.com/tongtybj/livox_ros_driver2.git
version: PR/ros1

# fast lio
# modification for fast odometry based on EKF
- git:
local-name: fast_lio
uri: https://github.com/tongtybj/FAST_LIO
version: PR/odometry

# realsense
#- git:
# local-name: realsense-ros
# uri: https://github.com/tongtybj/realsense-ros.git
# version: multi_realsense_t265

# mocap optitrack
- git:
local-name: realsense-ros
uri: https://github.com/tongtybj/realsense-ros.git
version: multi_realsense_t265
local-name: mocap_optitrack
uri: https://github.com/sugikazu75/mocap_optitrack.git
version: 50fb60d
2 changes: 1 addition & 1 deletion aerial_robot_nerve/motor_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(motor_test)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_nerve/spinal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(spinal)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down
21 changes: 21 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -e

# Get VERSION_CODENAME from /etc/os-release
DISTRO=$(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)

# Conditional branching based on distro_codename
if [ "$DISTRO" = "jammy" ]; then
echo "This is Ubuntu 22.04 (jammy). Install ROS-O"

sudo apt install -y python3-pip
pip3 install catkin-tools
echo "deb [trusted=yes] https://raw.githubusercontent.com/sugikazu75/ros-o-builder/$DISTRO-one-unstable/repository ./" | sudo tee /etc/apt/sources.list.d/sugikazu75_ros-o-builder.list
sudo apt update
sudo apt install -y python3-rosdep2
echo "yaml https://raw.githubusercontent.com/sugikazu75/ros-o-builder/$DISTRO-one-unstable/repository/local.yaml debian" | sudo tee /etc/ros/rosdep/sources.list.d/1-sugikazu75_ros-o-builder.list
rosdep update
sudo apt install -y ros-one-desktop-full
sudo apt install -y python3-wstool
fi
Loading