diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 0a54c5d..e9dc5fd 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -1,4 +1,4 @@ -name: galactic_ci +name: main_ci on: pull_request: @@ -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}} diff --git a/Dockerfile b/Dockerfile index f5d88fd..5348476 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 diff --git a/README.md b/README.md index f0caaa7..a2714c5 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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 diff --git a/orca_base/CMakeLists.txt b/orca_base/CMakeLists.txt index 47052d7..78f8e1a 100644 --- a/orca_base/CMakeLists.txt +++ b/orca_base/CMakeLists.txt @@ -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() diff --git a/orca_bringup/CMakeLists.txt b/orca_bringup/CMakeLists.txt index 139df7a..0a65790 100644 --- a/orca_bringup/CMakeLists.txt +++ b/orca_bringup/CMakeLists.txt @@ -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 diff --git a/orca_description/CMakeLists.txt b/orca_description/CMakeLists.txt index 9a9ca80..89d19e3 100644 --- a/orca_description/CMakeLists.txt +++ b/orca_description/CMakeLists.txt @@ -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) diff --git a/orca_gazebo/CMakeLists.txt b/orca_gazebo/CMakeLists.txt index 9119e2b..3e37604 100644 --- a/orca_gazebo/CMakeLists.txt +++ b/orca_gazebo/CMakeLists.txt @@ -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} diff --git a/orca_gazebo/scripts/build_world.py b/orca_gazebo/scripts/build_world.py old mode 100644 new mode 100755 diff --git a/orca_localize/CMakeLists.txt b/orca_localize/CMakeLists.txt index 3e8a7a3..194505c 100644 --- a/orca_localize/CMakeLists.txt +++ b/orca_localize/CMakeLists.txt @@ -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() diff --git a/orca_localize/src/fiducial_localizer.cpp b/orca_localize/src/fiducial_localizer.cpp index 80f2557..7bfd445 100644 --- a/orca_localize/src/fiducial_localizer.cpp +++ b/orca_localize/src/fiducial_localizer.cpp @@ -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" diff --git a/orca_msgs/CMakeLists.txt b/orca_msgs/CMakeLists.txt index ad95cea..424ae60 100644 --- a/orca_msgs/CMakeLists.txt +++ b/orca_msgs/CMakeLists.txt @@ -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) diff --git a/orca_nav2/CMakeLists.txt b/orca_nav2/CMakeLists.txt index 3aaa851..3a79786 100755 --- a/orca_nav2/CMakeLists.txt +++ b/orca_nav2/CMakeLists.txt @@ -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() diff --git a/orca_shared/CMakeLists.txt b/orca_shared/CMakeLists.txt index a2e17d7..6afb727 100644 --- a/orca_shared/CMakeLists.txt +++ b/orca_shared/CMakeLists.txt @@ -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() diff --git a/orca_shared/src/util.cpp b/orca_shared/src/util.cpp index c93eaa8..c2bda64 100644 --- a/orca_shared/src/util.cpp +++ b/orca_shared/src/util.cpp @@ -27,7 +27,7 @@ #include #include "orca_msgs/msg/status.hpp" -#include "tf2_geometry_msgs/tf2_geometry_msgs.h" +#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" namespace orca { diff --git a/orca_topside/CMakeLists.txt b/orca_topside/CMakeLists.txt index 4555809..fe040ec 100644 --- a/orca_topside/CMakeLists.txt +++ b/orca_topside/CMakeLists.txt @@ -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 @@ -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) @@ -73,6 +66,7 @@ add_executable( ament_target_dependencies( teleop_node camera_info_manager + cv_bridge geometry_msgs GST_APP h264_msgs diff --git a/orca_topside/package.xml b/orca_topside/package.xml index 0d4a0a3..8415349 100644 --- a/orca_topside/package.xml +++ b/orca_topside/package.xml @@ -31,6 +31,7 @@ --> camera_info_manager + cv_bridge geometry_msgs h264_msgs libgstreamer1.0-dev diff --git a/workspace.repos b/workspace.repos index 4eb9d34..75501db 100644 --- a/workspace.repos +++ b/workspace.repos @@ -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