Skip to content

Commit 04c9e56

Browse files
sugikazu75Moju Zhaotongtybj
committed
ubuntu22.04 support (jsk-ros-pkg#626)
* [GA] add github action for jammy using ROS-O * update * update * ubnutu:jammy * ubnutu-22.04 * [GA] setup ros workspace and catkin build * [GA] noetic->one * [GA] python3-wstool * [GA] sudo apt install python3-wstool * [spinal] cmake17 * add rosinstall for debian. modified from noetic one * update rosinstall path * fix typo * [motor test] C++17 * [GA] catkin build only aerial_robot and run catkin test * skip libgeographiclib-dev * [GA] ignore rosdep install error temporality * [ROS-O][rosinstall] use C++17 patched mocap_optitrack package (jsk-ros-pkg#13) * [ROS-O][rosinstall] update external repository path and version (jsk-ros-pkg#15) * use self released apt repository * update external repositry version * remove external repositry from rosinstall because they are released * remove error ignore flag when rosdep install * [mocap_optitrack] add mocap_optitrack package to rosinstall * [ROS-O][GA] build all packages * [CI] remove the script for EoL ros distribution * [CI][GA] merge ros one distribution test into .travis.sh * [ROS-O] crate configure script to install ros-o system for jammy * [ROS-O] update REAMDE to show the install instruction on Ubuntu22.04 * fix typo in README * [rosinstall] remove rosinstall for EoL distribution --------- Co-authored-by: Moju Zhao <tongtybj@gmail.com> Co-authored-by: Moju Zhao <chou@jsk.imi.i.u-tokyo.ac.jp>
1 parent ec16070 commit 04c9e56

File tree

8 files changed

+124
-77
lines changed

8 files changed

+124
-77
lines changed

.github/workflows/ros_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
fail-fast: false
99
matrix:
1010
include:
11-
- ROS_DISTRO : kinetic
12-
DOCKER_IMAGE : ubuntu:xenial
1311
- ROS_DISTRO : melodic
1412
DOCKER_IMAGE : ubuntu:bionic
1513
- ROS_DISTRO : noetic
1614
DOCKER_IMAGE : ubuntu:focal
15+
- ROS_DISTRO : one
16+
DOCKER_IMAGE : ubuntu:jammy
1717
steps:
1818
- name: Setup OS
1919
run: |

.travis.sh

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
set -ex
44

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

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

1310
# Install ROS
14-
if [[ "$ROS_DISTRO" == "noetic" ]]; then
15-
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
11+
if [[ "$ROS_DISTRO" == "one" ]]; then
12+
${CI_SOURCE_PATH}/configure.sh
1613
else
17-
sudo apt-get install -y -q python-catkin-pkg python-catkin-tools python-rosdep python-wstool python-rosinstall-generator
14+
sudo sh -c "echo \"deb ${REPOSITORY} `lsb_release -cs` main\" > /etc/apt/sources.list.d/ros-latest.list"
15+
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
16+
sudo apt-get update -qq
17+
18+
if [[ "$ROS_DISTRO" == "noetic" ]]; then
19+
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
20+
else
21+
sudo apt-get install -y -q python-catkin-pkg python-catkin-tools python-rosdep python-wstool python-rosinstall-generator
22+
fi
23+
sudo apt-get install -y -q ros-$ROS_DISTRO-catkin
24+
25+
# Setup for rosdep
26+
sudo rosdep init
27+
rosdep update --include-eol-distros
1828
fi
19-
sudo apt-get install -y -q ros-$ROS_DISTRO-catkin
2029

21-
source /opt/ros/${ROS_DISTRO}/setup.bash
2230

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

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

42-
if [ ${ROS_DISTRO} = 'kinetic' ]; then
43-
path=~/.gazebo/models/sun
44-
echo "manually download the sun gazebo model to ${path}"
45-
mkdir -p ${path}
46-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model-1_2.sdf -P ${path}
47-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model-1_3.sdf -P ${path}
48-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model-1_4.sdf -P ${path}
49-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model.sdf -P ${path}
50-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/sun/model.config -P ${path}
51-
52-
path=~/.gazebo/models/ground_plane
53-
echo "manually download the ground_plane gazebo model to ${path}"
54-
mkdir -p ${path}
55-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model-1_2.sdf -P ${path}
56-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model-1_3.sdf -P ${path}
57-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model-1_4.sdf -P ${path}
58-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model.sdf -P ${path}
59-
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model.config -P ${path}
60-
fi
61-
6242
# Build
6343
catkin config --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
6444
catkin build -p1 -j1 --no-status

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,40 @@
66

77
## Setup
88

9+
### Ubuntu 18.04, 20.04
10+
11+
#### Install ROS1 from official site
12+
- Melodic: https://wiki.ros.org/melodic/Installation/Ubuntu
13+
- Noetic: https://wiki.ros.org/noetic/Installation/Ubuntu
14+
15+
#### Build
16+
917
```bash
1018
source /opt/ros/${ROS_DISTRO}/setup.bash # please replace ${ROS_DISTRO} with your specific env variable, e.g., melodic
19+
sudo apt install -y python3-wstool python3-catkin-tools # for melodic, please replace `python3` with `python`
1120
mkdir -p ~/ros/jsk_aerial_robot_ws/src
1221
cd ~/ros/jsk_aerial_robot_ws
1322
sudo rosdep init
1423
rosdep update
1524
wstool init src
1625
wstool set -u -t src jsk_aerial_robot http://github.com/jsk-ros-pkg/jsk_aerial_robot --git
26+
./src/jsk_aerial_robot/configure.sh # for configuration especially for ros-o in jammy
27+
wstool merge -t src src/jsk_aerial_robot/aerial_robot_${ROS_DISTRO}.rosinstall
28+
wstool update -t src
29+
rosdep install -y -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO
30+
catkin build
31+
```
32+
33+
### Ubuntu 22.04 (ROS-O)
34+
35+
```bash
36+
sudo apt install -y python3-wstool
37+
mkdir -p ~/ros/jsk_aerial_robot_ws/src
38+
cd ~/ros/jsk_aerial_robot_ws
39+
wstool init src
40+
wstool set -u -t src jsk_aerial_robot http://github.com/jsk-ros-pkg/jsk_aerial_robot --git
41+
./src/jsk_aerial_robot/configure.sh # for configuration especially for ros-o in jammy
42+
source /opt/ros/one/setup.bash
1743
wstool merge -t src src/jsk_aerial_robot/aerial_robot_${ROS_DISTRO}.rosinstall
1844
wstool update -t src
1945
rosdep install -y -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO

aerial_robot_debian.rosinstall

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# aerial robot third party
2+
- git:
3+
local-name: aerial_robot_3rdparty
4+
uri: https://github.com/JSKAerialRobot/aerial_robot_3rdparty.git
5+
version: 4085d3a
6+
7+
# kalman filter
8+
- git:
9+
local-name: kalman_filter
10+
uri: https://github.com/JSKAerialRobot/kalman_filter.git
11+
version: 5c7a410
12+
13+
# the sensor interface
14+
- git:
15+
local-name: sensor_interface
16+
uri: https://github.com/JSKAerialRobot/sensor_interface.git
17+
version: e8286e7
18+
19+
# RTK-GPS (forked)
20+
- git:
21+
local-name: ublox_gps
22+
uri: https://github.com/tongtybj/ublox.git
23+
version: holybro_rtk_m8p
24+
25+
# rosserial (forked)
26+
- git:
27+
local-name: rosserial
28+
uri: https://github.com/tongtybj/rosserial.git
29+
version: rosservice_server
30+
31+
# livox ros driver
32+
# modification for quick build of ROS1 version
33+
- git:
34+
local-name: livox_ros_driver2
35+
uri: https://github.com/tongtybj/livox_ros_driver2.git
36+
version: PR/ros1
37+
38+
# fast lio
39+
# modification for fast odometry based on EKF
40+
- git:
41+
local-name: fast_lio
42+
uri: https://github.com/tongtybj/FAST_LIO
43+
version: PR/odometry
44+
45+
# realsense
46+
#- git:
47+
# local-name: realsense-ros
48+
# uri: https://github.com/tongtybj/realsense-ros.git
49+
# version: multi_realsense_t265
50+
51+
# mocap optitrack
52+
- git:
53+
local-name: mocap_optitrack
54+
uri: https://github.com/sugikazu75/mocap_optitrack.git
55+
version: 50fb60d

aerial_robot_kinetic.rosinstall

Lines changed: 0 additions & 35 deletions
This file was deleted.

aerial_robot_nerve/motor_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.0.2)
22
project(motor_test)
33

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

66
find_package(catkin REQUIRED COMPONENTS
77
roscpp

aerial_robot_nerve/spinal/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.0.2)
22
project(spinal)
33

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

66
find_package(catkin REQUIRED COMPONENTS
77
roscpp

configure.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Get VERSION_CODENAME from /etc/os-release
6+
DISTRO=$(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)
7+
8+
# Conditional branching based on distro_codename
9+
if [ "$DISTRO" = "jammy" ]; then
10+
echo "This is Ubuntu 22.04 (jammy). Install ROS-O"
11+
12+
sudo apt install -y python3-pip
13+
pip3 install catkin-tools
14+
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
15+
sudo apt update
16+
sudo apt install -y python3-rosdep2
17+
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
18+
rosdep update
19+
sudo apt install -y ros-one-desktop-full
20+
sudo apt install -y python3-wstool
21+
fi

0 commit comments

Comments
 (0)