Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Migrate to Rolling #14

Open
wants to merge 8 commits into
base: main
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: galactic_ci
name: main_ci

on:
pull_request:
Expand All @@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
ros_distribution:
- galactic
- rolling
include:
- docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-galactic-ros-base-latest
ros_distribution: galactic
- docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-rolling-ros-base-latest
ros_distribution: rolling
ros_version: 2
container:
image: ${{matrix.docker_image}}
Expand Down
42 changes: 19 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This Dockerfile can be configured via --build-arg
# This Dockerfile depends on workspace.repos

# Example build command:
# docker build --pull --no-cache -t orca3:galactic .
# docker build --pull --no-cache -t orca3:rolling .

# Example run command using Rocker (see https://github.com/osrf/rocker):
# rocker --x11 --nvidia orca3:galactic
# rocker --x11 --nvidia orca3:rolling

FROM osrf/ros:galactic-desktop
FROM osrf/ros:rolling-desktop

RUN apt-get update && apt-get upgrade -y

Expand All @@ -19,31 +19,27 @@ RUN apt-get install -y libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-
gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio \
libgstreamer-plugins-base1.0-dev

WORKDIR /work/orca_ws/src
WORKDIR /work/orca_ws

COPY . orca3
# Build part 1: get & build all dependencies

ARG FIDUCIAL_VLAM_BRANCH=master
ARG H264_IMAGE_TRANSPORT_BRANCH=master
ARG ORB_SLAM2_ROS_BRANCH=clyde_h264_stereo_galactic
ARG ROS2_SHARED_BRANCH=master
ARG SIM_FIDUCIAL_BRANCH=master
ARG STEREO_DECODER_BRANCH=main
ARG UKF_BRANCH=master
COPY workspace.repos src/orca3/workspace.repos

RUN git clone https://github.com/ptrmu/fiducial_vlam.git -b $FIDUCIAL_VLAM_BRANCH
RUN git clone https://github.com/clydemcqueen/h264_image_transport.git -b $H264_IMAGE_TRANSPORT_BRANCH
RUN git clone https://github.com/clydemcqueen/orb_slam_2_ros.git -b $ORB_SLAM2_ROS_BRANCH
RUN git clone https://github.com/ptrmu/ros2_shared.git -b $ROS2_SHARED_BRANCH
RUN git clone https://github.com/clydemcqueen/sim_fiducial.git -b $SIM_FIDUCIAL_BRANCH
RUN git clone https://github.com/clydemcqueen/stereo_decoder.git -b $STEREO_DECODER_BRANCH
RUN git clone https://github.com/clydemcqueen/ukf.git -b $UKF_BRANCH
RUN vcs import src < src/orca3/workspace.repos

WORKDIR /work/orca_ws
# Ignore slam_toolbox
RUN rosdep install -y --from-paths . --ignore-src --skip-keys slam_toolbox

RUN /bin/bash -c "source /opt/ros/rolling/setup.bash && colcon build"

# Build part 2: get & build orca3 source

COPY . src/orca3

RUN rosdep install -y --from-paths . --ignore-src --skip-keys slam_toolbox

RUN rosdep install -y --from-paths . --ignore-src
RUN /bin/bash -c "source /opt/ros/rolling/setup.bash && colcon build"

RUN /bin/bash -c "source /opt/ros/galactic/setup.bash && colcon build"

# Simulation with fiducial_vlam:
# source src/orca3/setup.bash # Required to set up the Gazebo environment correctly
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Orca3 ![example branch parameter](https://github.com/clydemcqueen/orca3/actions/workflows/galactic_ci.yml/badge.svg?branch=main)
# Orca3 ![example branch parameter](https://github.com/clydemcqueen/orca3/actions/workflows/main_ci.yml/badge.svg?branch=main)

Orca3 is a set of [ROS2](http://www.ros.org/) packages that provide basic AUV (Autonomous Underwater Vehicle)
functionality for the [BlueRobotics BlueROV2](https://www.bluerobotics.com).
Expand Down Expand Up @@ -37,7 +37,7 @@ Orca3 includes experimental hardware drivers that run on a modified BlueROV2:

## Installation

Orca3 has been tested on ROS2 Foxy and Galactic. See the [Dockerfile](Dockerfile) for installation instructions.
Orca3 has been tested on ROS2 Foxy, Galactic and Rolling. See the [Dockerfile](Dockerfile) for installation instructions.

## Simulation with fiducial_vlam

Expand Down
16 changes: 2 additions & 14 deletions orca_base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_base)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
if($ENV{CLION_IDE})
find_package(fastrtps_cmake_module REQUIRED)
set(FastRTPS_INCLUDE_DIR "/opt/ros/foxy/include")
set(FastRTPS_LIBRARY_RELEASE "/opt/ros/foxy/lib/libfastrtps.so")
set(orca_description_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_description/share/orca_description/cmake")
set(orca_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_msgs/share/orca_msgs/cmake")
set(orca_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_shared/share/orca_shared/cmake")
set(ros2_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/ros2_shared/share/ros2_shared/cmake")
set(ukf_DIR "${PROJECT_SOURCE_DIR}/../../../install/ukf/share/ukf/cmake")
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

Expand Down
2 changes: 1 addition & 1 deletion orca_bringup/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_bringup)

# Add -Wno-dev to CLion CMake options to suppress warning about gazebo_dev
Expand Down
2 changes: 1 addition & 1 deletion orca_description/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_description)

find_package(ament_cmake_auto REQUIRED)
Expand Down
17 changes: 4 additions & 13 deletions orca_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_gazebo)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
if($ENV{CLION_IDE})
find_package(fastrtps_cmake_module REQUIRED)
set(FastRTPS_INCLUDE_DIR "/opt/ros/foxy/include")
set(FastRTPS_LIBRARY_RELEASE "/opt/ros/foxy/lib/libfastrtps.so")
set(orca_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_msgs/share/orca_msgs/cmake")
set(orca_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_shared/share/orca_shared/cmake")
endif()

# Add -Wno-dev to CLion CMake options to suppress warning about gazebo_dev
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

#=============
# Run build_world.py to generate .yaml (vlam maps) and .world files
# Use simple.world as the marker file, if this is stale, re-run build_world.py
# Use empty.world as the marker file, if this is stale, re-run build_world.py
#=============

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/worlds")

set(MARKER_FILE "${CMAKE_CURRENT_BINARY_DIR}/worlds/simple.world")
set(MARKER_FILE "${CMAKE_CURRENT_BINARY_DIR}/worlds/empty.world")

add_custom_command(
OUTPUT ${MARKER_FILE}
Expand Down
Empty file modified orca_gazebo/scripts/build_world.py
100644 → 100755
Empty file.
17 changes: 2 additions & 15 deletions orca_localize/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_localize)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
if($ENV{CLION_IDE})
find_package(fastrtps_cmake_module REQUIRED)
set(FastRTPS_INCLUDE_DIR "/opt/ros/foxy/include")
set(FastRTPS_LIBRARY_RELEASE "/opt/ros/foxy/lib/libfastrtps.so")
set(fiducial_vlam_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/fiducial_vlam_msgs/share/fiducial_vlam_msgs/cmake")
set(orca_description_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_description/share/orca_description/cmake")
set(orca_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_msgs/share/orca_msgs/cmake")
set(orca_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_shared/share/orca_shared/cmake")
set(ros2_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/ros2_shared/share/ros2_shared/cmake")
set(ukf_DIR "${PROJECT_SOURCE_DIR}/../../../install/ukf/share/ukf/cmake")
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

Expand Down
2 changes: 1 addition & 1 deletion orca_localize/src/fiducial_localizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "orca_shared/model.hpp"
#include "orca_shared/util.hpp"
#include "rclcpp/rclcpp.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
#include "tf2_ros/transform_broadcaster.h"
#include "tf2_ros/transform_listener.h"

Expand Down
11 changes: 2 additions & 9 deletions orca_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_msgs)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
if($ENV{CLION_IDE})
find_package(fastrtps_cmake_module REQUIRED)
set(FastRTPS_INCLUDE_DIR "/opt/ros/foxy/include")
set(FastRTPS_LIBRARY_RELEASE "/opt/ros/foxy/lib/libfastrtps.so")
endif()

# Debugging: set _dump_all_variables to true
set(_dump_all_variables false)
if(_dump_all_variables)
Expand Down
12 changes: 2 additions & 10 deletions orca_nav2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_nav2)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
if($ENV{CLION_IDE})
find_package(fastrtps_cmake_module REQUIRED)
set(FastRTPS_INCLUDE_DIR "/opt/ros/foxy/include")
set(FastRTPS_LIBRARY_RELEASE "/opt/ros/foxy/lib/libfastrtps.so")
set(orca_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_shared/share/orca_shared/cmake")
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

Expand Down
14 changes: 2 additions & 12 deletions orca_shared/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_shared)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
if($ENV{CLION_IDE})
find_package(fastrtps_cmake_module REQUIRED)
set(FastRTPS_INCLUDE_DIR "/opt/ros/foxy/include")
set(FastRTPS_LIBRARY_RELEASE "/opt/ros/foxy/lib/libfastrtps.so")
set(fiducial_vlam_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/fiducial_vlam_msgs/share/fiducial_vlam_msgs/cmake")
set(orca_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_msgs/share/orca_msgs/cmake")
set(ros2_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/ros2_shared/share/ros2_shared/cmake")
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

Expand Down
2 changes: 1 addition & 1 deletion orca_shared/src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <string>

#include "orca_msgs/msg/status.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"

namespace orca
{
Expand Down
14 changes: 4 additions & 10 deletions orca_topside/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
project(orca_topside)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Emulate colcon in CLion
#if($ENV{CLION_IDE})
# set(gst_tools_DIR "${PROJECT_SOURCE_DIR}/../../../install/gst_tools/share/gst_tools/cmake")
# set(orca_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_msgs/share/orca_msgs/cmake")
# set(orca_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/orca_shared/share/orca_shared/cmake")
# set(ros2_shared_DIR "${PROJECT_SOURCE_DIR}/../../../install/ros2_shared/share/ros2_shared/cmake")
#endif()

# A bit tricky to use ament + Qt5 + CMake + CLion, some resources:
# https://doc.qt.io/qt-5.12/cmake-manual.html
# https://www.jetbrains.com/help/clion/qt-tutorial.html
Expand All @@ -32,6 +24,7 @@ pkg_check_modules(GST_APP REQUIRED gstreamer-app-1.0)

find_package(ament_cmake REQUIRED)
find_package(camera_info_manager REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(gst_tools QUIET)
find_package(h264_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
Expand Down Expand Up @@ -73,6 +66,7 @@ add_executable(
ament_target_dependencies(
teleop_node
camera_info_manager
cv_bridge
geometry_msgs
GST_APP
h264_msgs
Expand Down
1 change: 1 addition & 0 deletions orca_topside/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
-->

<depend>camera_info_manager</depend>
<depend>cv_bridge</depend>
<depend>geometry_msgs</depend>
<depend>h264_msgs</depend>
<depend>libgstreamer1.0-dev</depend>
Expand Down
22 changes: 13 additions & 9 deletions workspace.repos
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
repositories:
ptrmu/fiducial_vlam:
fiducial_vlam:
type: git
url: https://github.com/ptrmu/fiducial_vlam
url: https://github.com/clydemcqueen/fiducial_vlam
version: master
clydemcqueen/h264_image_transport:
h264_image_transport:
type: git
url: https://github.com/clydemcqueen/h264_image_transport
version: master
clydemcqueen/orb_slam_2_ros:
orb_slam_2_ros:
type: git
url: https://github.com/clydemcqueen/orb_slam_2_ros
version: clyde_h264_stereo_galactic
ptrmu/ros2_shared:
version: clyde_h264_stereo_rolling
ros2_shared:
type: git
url: https://github.com/ptrmu/ros2_shared
version: master
clydemcqueen/sim_fiducial:
sim_fiducial:
type: git
url: https://github.com/clydemcqueen/sim_fiducial
version: master
clydemcqueen/stereo_decoder:
stereo_decoder:
type: git
url: https://github.com/clydemcqueen/stereo_decoder
version: main
clydemcqueen/ukf:
ukf:
type: git
url: https://github.com/clydemcqueen/ukf
version: master
navigation2:
type: git
url: https://github.com/ros-planning/navigation2
version: main