usdot-fhwa-stol / carma-msgs

ROS Message definitions used by the CARMA Platform
6 stars 9 forks source link

carma_cmake_common #142

Closed msmcconnell closed 3 years ago

msmcconnell commented 3 years ago

PR Details

Description

I merged directly to foxy/develop when creating these changes, but I still want it reviewed so this PR will serve that purpose.

This PR creates a carma_cmake_common package with macros for usage in carma package cmake files as I found ament substantially harder to use than catkin, I'm hoping this helps simply the process for others.

The following macros are defined carma_check_ros_version(version) This checks the ros version and returns if the version does not match the environment. This allows you to have a mixed ros1 ros2 workspace. carma_package() Default settings for all packages such as c++ version and warning flags carma_define_ament_library(lib_name ) Builds a shared library carma_define_ament_executable(exec_name ) Builds a executable

This also fixes a few build errors in the ros2 messages that for some reason were not showing up before

Related Issue

Supports ros2 milestone https://github.com/usdot-fhwa-stol/carma-platform/milestone/4

Motivation and Context

Reliable cmake builds in ros2

How Has This Been Tested?

Use to build the carma_ros2_utils, ros2_lifecycle_manager, system_controller, and subsystem_controllers packages.

Types of changes

Checklist:

msmcconnell commented 3 years ago

Relates to https://github.com/usdot-fhwa-stol/carma-platform/issues/1516