diff --git a/humanoid_msgs/CMakeLists.txt b/humanoid_msgs/CMakeLists.txt index 205fa73..3fc5510 100644 --- a/humanoid_msgs/CMakeLists.txt +++ b/humanoid_msgs/CMakeLists.txt @@ -1,4 +1,17 @@ cmake_minimum_required(VERSION 3.8) project(humanoid_msgs) -find_package(catkin REQUIRED) + +if($ENV{ROS_VERSION} EQUAL 1) + find_package(catkin REQUIRED) +else() + find_package(ament_cmake REQUIRED) +endif() + + +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package() +else() + ament_package() +endif() + catkin_metapackage() diff --git a/humanoid_nav_msgs/CMakeLists.txt b/humanoid_nav_msgs/CMakeLists.txt index d51644f..efe79e1 100644 --- a/humanoid_nav_msgs/CMakeLists.txt +++ b/humanoid_nav_msgs/CMakeLists.txt @@ -4,26 +4,40 @@ project(humanoid_nav_msgs) #List to make rest of code more readable set(MESSAGE_DEPENDENCIES std_msgs geometry_msgs actionlib_msgs) -#Declare build dependencies -find_package( - catkin REQUIRED - COMPONENTS - message_generation - ${MESSAGE_DEPENDENCIES} -) -#Add message files -add_message_files(DIRECTORY msg FILES StepTarget.msg) +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED + COMPONENTS + message_generation + ${MESSAGE_DEPENDENCIES} + ) +else() + find_package(ament_cmake REQUIRED) +endif() + + +if($ENV{ROS_VERSION} EQUAL 1) + add_service_files( + DIRECTORY srv + FILES + ClipFootstep.srv + PlanFootsteps.srv + PlanFootstepsBetweenFeet.srv + StepTargetService.srv + ) +else() + ament_package() +endif() + + +add_message_files( + DIRECTORY + msg + FILES + StepTarget.msg + ) -#Add service files -add_service_files( - DIRECTORY srv - FILES - ClipFootstep.srv - PlanFootsteps.srv - PlanFootstepsBetweenFeet.srv - StepTargetService.srv -) #Add action files add_action_files( diff --git a/humanoid_robot_action_module_msgs/CMakeLists.txt b/humanoid_robot_action_module_msgs/CMakeLists.txt index 529363a..810120e 100644 --- a/humanoid_robot_action_module_msgs/CMakeLists.txt +++ b/humanoid_robot_action_module_msgs/CMakeLists.txt @@ -1,25 +1,18 @@ -################################################################################ -# Set minimum required version of cmake, project name and compile options -################################################################################ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_action_module_msgs) -################################################################################ -# Find catkin packages and libraries for catkin and system dependencies -################################################################################ -find_package( - catkin REQUIRED COMPONENTS - std_msgs - message_generation -) -################################################################################ -# Setup for python modules and scripts -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED COMPONENTS + std_msgs + message_generation + ) +else() + find_package(ament_cmake REQUIRED) +endif() + -################################################################################ -# Declare ROS messages, services and actions -################################################################################ add_message_files( FILES StartAction.msg @@ -35,27 +28,13 @@ generate_messages( std_msgs ) -################################################################################ -# Declare ROS dynamic reconfigure parameters -################################################################################ -################################################################################ -# Declare catkin specific configuration to be passed to dependent projects -################################################################################ -catkin_package( - CATKIN_DEPENDS - std_msgs - message_runtime -) - -################################################################################ -# Build -################################################################################ - -################################################################################ -# Install -################################################################################ - -################################################################################ -# Test -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package( + CATKIN_DEPENDS + std_msgs + message_runtime + ) +else() + ament_package() +endif() diff --git a/humanoid_robot_controller_msgs/CMakeLists.txt b/humanoid_robot_controller_msgs/CMakeLists.txt index ec53cf2..4c9eda5 100755 --- a/humanoid_robot_controller_msgs/CMakeLists.txt +++ b/humanoid_robot_controller_msgs/CMakeLists.txt @@ -1,26 +1,19 @@ -################################################################################ -# Set minimum required version of cmake, project name and compile options -################################################################################ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_controller_msgs) -################################################################################ -# Find catkin packages and libraries for catkin and system dependencies -################################################################################ -find_package( - catkin REQUIRED COMPONENTS - std_msgs - sensor_msgs - message_generation -) -################################################################################ -# Setup for python modules and scripts -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED COMPONENTS + std_msgs + sensor_msgs + message_generation + ) +else() + find_package(ament_cmake REQUIRED) +endif() + -################################################################################ -# Declare ROS messages, services and actions -################################################################################ add_message_files( FILES SyncWriteItem.msg @@ -43,28 +36,13 @@ generate_messages( sensor_msgs ) -################################################################################ -# Declare ROS dynamic reconfigure parameters -################################################################################ - -################################################################################ -# Declare catkin specific configuration to be passed to dependent projects -################################################################################ -catkin_package( - CATKIN_DEPENDS - std_msgs - sensor_msgs - message_runtime -) - -################################################################################ -# Build -################################################################################ - -################################################################################ -# Install -################################################################################ - -################################################################################ -# Test -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package( + CATKIN_DEPENDS + std_msgs + sensor_msgs + message_runtime + ) +else() + ament_package() +endif() diff --git a/humanoid_robot_msgs/CMakeLists.txt b/humanoid_robot_msgs/CMakeLists.txt index 606420b..6d890ec 100644 --- a/humanoid_robot_msgs/CMakeLists.txt +++ b/humanoid_robot_msgs/CMakeLists.txt @@ -1,4 +1,17 @@ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_msgs) -find_package(catkin REQUIRED) + +if($ENV{ROS_VERSION} EQUAL 1) + find_package(catkin REQUIRED) +else() + find_package(ament_cmake REQUIRED) +endif() + + +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package() +else() + ament_package() +endif() + catkin_metapackage() diff --git a/humanoid_robot_offset_tuner_msgs/CMakeLists.txt b/humanoid_robot_offset_tuner_msgs/CMakeLists.txt index 97d0cd8..c299c58 100644 --- a/humanoid_robot_offset_tuner_msgs/CMakeLists.txt +++ b/humanoid_robot_offset_tuner_msgs/CMakeLists.txt @@ -1,25 +1,18 @@ -################################################################################ -# Set minimum required version of cmake, project name and compile options -################################################################################ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_offset_tuner_msgs) -################################################################################ -# Find catkin packages and libraries for catkin and system dependencies -################################################################################ -find_package( - catkin REQUIRED COMPONENTS - std_msgs - message_generation -) -################################################################################ -# Setup for python modules and scripts -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED COMPONENTS + std_msgs + message_generation + ) +else() + find_package(ament_cmake REQUIRED) +endif() + -################################################################################ -# Declare ROS messages, services and actions -################################################################################ add_message_files( FILES JointOffsetData.msg @@ -38,27 +31,13 @@ generate_messages( std_msgs ) -################################################################################ -# Declare ROS dynamic reconfigure parameters -################################################################################ -################################################################################ -# Declare catkin specific configuration to be passed to dependent projects -################################################################################ -catkin_package( - CATKIN_DEPENDS - std_msgs - message_runtime -) - -################################################################################ -# Build -################################################################################ - -################################################################################ -# Install -################################################################################ - -################################################################################ -# Test -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package( + CATKIN_DEPENDS + std_msgs + message_runtime + ) +else() + ament_package() +endif() diff --git a/humanoid_robot_online_walking_module_msgs/CMakeLists.txt b/humanoid_robot_online_walking_module_msgs/CMakeLists.txt index f2c5f72..a57c855 100644 --- a/humanoid_robot_online_walking_module_msgs/CMakeLists.txt +++ b/humanoid_robot_online_walking_module_msgs/CMakeLists.txt @@ -1,27 +1,20 @@ -################################################################################ -# Set minimum required version of cmake, project name and compile options -################################################################################ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_online_walking_module_msgs) -################################################################################ -# Find catkin packages and libraries for catkin and system dependencies -################################################################################ -find_package( - catkin REQUIRED COMPONENTS - std_msgs - sensor_msgs - geometry_msgs - message_generation -) -################################################################################ -# Setup for python modules and scripts -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED COMPONENTS + std_msgs + sensor_msgs + geometry_msgs + message_generation + ) +else() + find_package(ament_cmake REQUIRED) +endif() + -################################################################################ -# Declare ROS messages, services and actions -################################################################################ add_message_files( FILES JointPose.msg @@ -49,29 +42,14 @@ generate_messages( geometry_msgs ) -################################################################################ -# Declare ROS dynamic reconfigure parameters -################################################################################ - -################################################################################ -# Declare catkin specific configuration to be passed to dependent projects -################################################################################ -catkin_package( - CATKIN_DEPENDS - std_msgs - sensor_msgs - geometry_msgs - message_runtime -) - -################################################################################ -# Build -################################################################################ - -################################################################################ -# Install -################################################################################ - -################################################################################ -# Test -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package( + CATKIN_DEPENDS + std_msgs + sensor_msgs + geometry_msgs + message_runtime + ) +else() + ament_package() +endif() diff --git a/humanoid_robot_tuning_module_msgs/CMakeLists.txt b/humanoid_robot_tuning_module_msgs/CMakeLists.txt index d35b515..bc8c176 100644 --- a/humanoid_robot_tuning_module_msgs/CMakeLists.txt +++ b/humanoid_robot_tuning_module_msgs/CMakeLists.txt @@ -1,25 +1,18 @@ -################################################################################ -# Set minimum required version of cmake, project name and compile options -################################################################################ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_tuning_module_msgs) -################################################################################ -# Find catkin packages and libraries for catkin and system dependencies -################################################################################ -find_package( - catkin REQUIRED COMPONENTS - std_msgs - message_generation -) -################################################################################ -# Setup for python modules and scripts -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED COMPONENTS + std_msgs + message_generation + ) +else() + find_package(ament_cmake REQUIRED) +endif() + -################################################################################ -# Declare ROS messages, services and actions -################################################################################ add_message_files( FILES JointOffsetData.msg @@ -38,27 +31,13 @@ generate_messages( std_msgs ) -################################################################################ -# Declare ROS dynamic reconfigure parameters -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package( + CATKIN_DEPENDS + std_msgs + message_runtime + ) +else() + ament_package() +endif() -################################################################################ -# Declare catkin specific configuration to be passed to dependent projects -################################################################################ -catkin_package( - CATKIN_DEPENDS - std_msgs - message_runtime -) - -################################################################################ -# Build -################################################################################ - -################################################################################ -# Install -################################################################################ - -################################################################################ -# Test -################################################################################ diff --git a/humanoid_robot_walking_module_msgs/CMakeLists.txt b/humanoid_robot_walking_module_msgs/CMakeLists.txt index 6ffafe9..39260cd 100644 --- a/humanoid_robot_walking_module_msgs/CMakeLists.txt +++ b/humanoid_robot_walking_module_msgs/CMakeLists.txt @@ -1,25 +1,18 @@ -################################################################################ -# Set minimum required version of cmake, project name and compile options -################################################################################ cmake_minimum_required(VERSION 3.8) project(humanoid_robot_walking_module_msgs) -################################################################################ -# Find catkin packages and libraries for catkin and system dependencies -################################################################################ -find_package( - catkin REQUIRED COMPONENTS - std_msgs - message_generation -) -################################################################################ -# Setup for python modules and scripts -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + find_package( + catkin REQUIRED COMPONENTS + std_msgs + message_generation + ) +else() + find_package(ament_cmake REQUIRED) +endif() + -################################################################################ -# Declare ROS messages, services and actions -################################################################################ add_message_files( FILES WalkingParam.msg @@ -36,27 +29,13 @@ generate_messages( std_msgs ) -################################################################################ -# Declare ROS dynamic reconfigure parameters -################################################################################ -################################################################################ -# Declare catkin specific configuration to be passed to dependent projects -################################################################################ -catkin_package( - CATKIN_DEPENDS - std_msgs - message_runtime -) - -################################################################################ -# Build -################################################################################ - -################################################################################ -# Install -################################################################################ - -################################################################################ -# Test -################################################################################ +if($ENV{ROS_VERSION} EQUAL 1) + catkin_package( + CATKIN_DEPENDS + std_msgs + message_runtime + ) +else() + ament_package() +endif()