diff --git a/.github/workflows/Ci.yml b/.github/workflows/Ci.yml index 4a1c6a610d..6b71baf041 100644 --- a/.github/workflows/Ci.yml +++ b/.github/workflows/Ci.yml @@ -4,7 +4,7 @@ on: pull_request: types: [opened, synchronize, reopened] push: - branches: [develop, master] + branches: [develop, develop-humble, master] jobs: determine_docker_org_and_tag: runs-on: ubuntu-latest @@ -31,7 +31,7 @@ jobs: image: ${{ needs.determine_docker_org_and_tag.outputs.docker_org }}/autoware.ai:${{ needs.determine_docker_org_and_tag.outputs.docker_tag }} env: INIT_ENV: "/home/carma/.base-image/init-env.sh" - ROS_2_ENV: "/opt/ros/foxy/setup.bash" + ROS_2_ENV: "/opt/ros/humble/setup.bash" TERM: xterm options: "--user root" @@ -66,61 +66,32 @@ jobs: - name: Install external dependencies # Install the multiple object tracking deps run: sudo bash /opt/carma/src/multiple_object_tracking/scripts/install_dependencies.sh - - - name: Build ROS1 - # Build ROS1 packages - # The skipped ROS 1 packages here should match the ROS 1 packages that are skipped during the build in docker/install.sh - run: | - source "$INIT_ENV" - PACKAGES=$(find . -maxdepth 2 -type f -name package.xml | sed 's/\.\///' | cut -d/ -f1) # maxdepth 2 Limits the search of package.xml to current directory and one level of subdirectories beneath it. find will not search beyond two levels deep from the starting point. Without this option, find would search the starting directory and all subdirectories recursively. - sed -i 's/colcon build /colcon build --packages-skip novatel_oem7_msgs tracetools tracetools_test /' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash - make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov - - - name: Run ROS1 C++ Tests - # Run ROS1 C++ tests - # The skipped ROS 1 packages here should match the ROS 1 packages that are skipped during the build in docker/install.sh" - - # These tests has been temporarily disabled to support Continuous Improvement (CI) processes. - # Related GitHub Issue: - # some ROS2 packages unit tests are triggered during ROS1 tests, so they are temporarily being skipped. - run: | - source "$INIT_ENV" - sed -i 's/colcon test /colcon test --packages-skip novatel_oem7_msgs tracetools tracetools_test carma_launch_testing carma_message_utilities ros2bag ros2trace tracetools_launch tracetools_read tracetools_trace rosbag2 carma_utils /' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash - make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov - - - name: Backup ROS1 compile_commands.json - # Backup the ROS1 compile_commands.json file for sonarcloud + # TODO WIP Humble Upgrade: Remove after humble upgrade is done + - name: Read packages from file run: | - mv /opt/carma/build/compile_commands.json /opt/carma/compile_commands.ros1.json - - - name: Cleanup before ROS 2 build - # Clear the build and install folders before building ROS 2 - run: | - rm -rf /opt/carma/install - rm -rf /opt/carma/build + PACKAGES=$(cat /opt/carma/src/${{ github.event.repository.name }}/.github/workflows/humble-upgraded-packages.txt) + echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV - name: Build ROS2 - # Build ROS2 packages run: | source "$INIT_ENV" source "$ROS_2_ENV" - source /opt/autoware.ai/ros/install_ros2/setup.bash + source /opt/autoware.ai/ros/install/setup.bash + COLCON_CMD="colcon build --parallel-workers 4" + NEW_CMD="colcon build --continue-on-error --parallel-workers 16 --packages-up-to \$PACKAGES" + sed -i "s|$COLCON_CMD|$NEW_CMD|" /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov - name: Run ROS2 C++ Tests - # Run ROS2 C++ tests run: | source "$INIT_ENV" source "$ROS_2_ENV" - source /opt/autoware.ai/ros/install_ros2/setup.bash + source /opt/autoware.ai/ros/install/setup.bash + COLCON_CMD="colcon test --return-code-on-test-failure --parallel-workers 4 --event-handlers console_direct+" + NEW_CMD="colcon test --return-code-on-test-failure --parallel-workers 16 --event-handlers console_cohesion+ --packages-select \$PACKAGES --ctest-args --output-on-failure" + sed -i "s|$COLCON_CMD|$NEW_CMD|" /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov - - name: Combine ROS1 and ROS2 compile_commands.json files - # Combine the ROS1 and ROS2 compile_commands.json files for sonarscan - run: | - mv /opt/carma/build/compile_commands.json /opt/carma/compile_commands.ros2.json - jq -s add /opt/carma/compile_commands.ros1.json /opt/carma/compile_commands.ros2.json > /opt/carma/build/compile_commands.json - - name: Run SonarScanner # Run SonarScanner for code analysis uses: usdot-fhwa-stol/actions/sonar-scanner@main diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 388fe1d72b..55f01de370 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -5,6 +5,7 @@ on: branches: - develop - master + - develop-humble - "release/*" tags: - "carma-system-*" diff --git a/.github/workflows/humble-upgraded-packages.txt b/.github/workflows/humble-upgraded-packages.txt new file mode 100644 index 0000000000..87c3be996c --- /dev/null +++ b/.github/workflows/humble-upgraded-packages.txt @@ -0,0 +1 @@ +approximate_intersection carma motion_prediction_visualizer system_controller object_visualizer mock_controller_driver object_detection_tracking gnss_to_map_convertor mobilitypath_visualizer bsm_generator trajectory_visualizer trajectory_executor lightbar_manager mobilitypath_publisher guidance port_drayage_plugin subsystem_controllers carma_wm roadway_objects basic_autonomy carma_guidance_plugins plan_delegator traffic_incident_parser platooning_tactical_plugin intersection_transit_maneuvering light_controlled_intersection_tactical_plugin stop_and_dwell_strategic_plugin cooperative_lanechange lci_strategic_plugin stop_controlled_intersection_tactical_plugin sci_strategic_plugin inlanecruising_plugin platooning_control trajectory_follower_wrapper approaching_emergency_vehicle_plugin yield_plugin diff --git a/Dockerfile b/Dockerfile index f857fb19fa..aeb304bea5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ # Copyright (C) 2018-2021 LEIDOS. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -15,17 +15,17 @@ # CARMA Docker Configuration Script # # Performs all necessary tasks related to generation of a generic CARMA docker image -# suitable for deployment to a vehicle. The generic image will still need to be +# suitable for deployment to a vehicle. The generic image will still need to be # configured for each vehicle by means of volume mapping configuration files and # networking mapping at run time # # Build Arguments: # SSH_PRIVATE_KEY - If the extra package repository to be used during the build requires # authentication, please pass in the necessary SSH private key in text -# form here, most likely via "$(cat ~/.ssh/id_rsa)". This data is not +# form here, most likely via "$(cat ~/.ssh/id_rsa)". This data is not # present in the final output image. Default = none # -# EXTRA_PACKAGES - The repo to checkout any additional packages from at build time. +# EXTRA_PACKAGES - The repo to checkout any additional packages from at build time. # Default = none @@ -41,19 +41,16 @@ FROM base-image AS source-code RUN mkdir ~/src COPY --chown=carma . /home/carma/src/carma-platform/ -ARG GIT_BRANCH="develop" +ARG GIT_BRANCH="develop" RUN ~/src/carma-platform/docker/checkout.bash -b ${GIT_BRANCH} # ///////////////////////////////////////////////////////////////////////////// -# Stage 2 - Build and install the software +# Stage 2 - Build and install the software # ///////////////////////////////////////////////////////////////////////////// - FROM base-image AS install -ARG ROS1_PACKAGES="" -ENV ROS1_PACKAGES=${ROS1_PACKAGES} -ARG ROS2_PACKAGES="" -ENV ROS2_PACKAGES=${ROS2_PACKAGES} +ARG PACKAGES="" +ENV PACKAGES=${PACKAGES} # Copy the source files from the previous stage and build/install RUN mkdir ~/carma_ws diff --git a/approaching_emergency_vehicle_plugin/CMakeLists.txt b/approaching_emergency_vehicle_plugin/CMakeLists.txt index c09ff08164..edb21f4547 100644 --- a/approaching_emergency_vehicle_plugin/CMakeLists.txt +++ b/approaching_emergency_vehicle_plugin/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(approaching_emergency_vehicle_plugin) # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -41,8 +47,8 @@ ament_auto_add_library(${node_lib} SHARED src/approaching_emergency_vehicle_states.cpp ) -ament_auto_add_executable(${node_exec} - src/main.cpp +ament_auto_add_executable(${node_exec} + src/main.cpp ) # Register component @@ -55,7 +61,7 @@ target_link_libraries(${node_exec} ) # Testing -if(BUILD_TESTING) +if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() # This populates the ${${PROJECT_NAME}_FOUND_TEST_DEPENDS} variable diff --git a/approaching_emergency_vehicle_plugin/package.xml b/approaching_emergency_vehicle_plugin/package.xml index 69abcf0093..97f74a193b 100644 --- a/approaching_emergency_vehicle_plugin/package.xml +++ b/approaching_emergency_vehicle_plugin/package.xml @@ -1,6 +1,6 @@ - ament_cmake + ament_cmake_auto + + carma_cmake_common - ament_auto_cmake rclcpp carma_ros2_utils @@ -38,6 +41,7 @@ tf2 autoware_auto_msgs + ament_lint_auto ament_cmake_gtest diff --git a/basic_autonomy/src/basic_autonomy.cpp b/basic_autonomy/src/basic_autonomy.cpp index b720deb51b..303ff33f43 100644 --- a/basic_autonomy/src/basic_autonomy.cpp +++ b/basic_autonomy/src/basic_autonomy.cpp @@ -774,7 +774,7 @@ namespace basic_autonomy for (size_t i = 0; i < points.size(); i++) { carma_planning_msgs::msg::TrajectoryPlanPoint tpp; - rclcpp::Duration relative_time(times[i] * 1e9); // Conversion of times[i] from seconds to nanoseconds + rclcpp::Duration relative_time = rclcpp::Duration::from_nanoseconds(static_cast(times[i] * 1e9)); // Conversion of times[i] from seconds to nanoseconds tpp.target_time = startTime + relative_time; tpp.x = points[i].x(); tpp.y = points[i].y(); @@ -1283,7 +1283,7 @@ namespace basic_autonomy autoware_point.heading.real = std::cos(yaw/2); autoware_point.heading.imag = std::sin(yaw/2); - autoware_point.time_from_start = rclcpp::Duration(times[i] * 1e9); + autoware_point.time_from_start = rclcpp::Duration::from_nanoseconds(static_cast(times[i] * 1e9)); RCLCPP_DEBUG_STREAM(rclcpp::get_logger(BASIC_AUTONOMY_LOGGER), "Setting waypoint idx: " << i <<", with planner: << " << trajectory_points[i].planner_plugin_name << ", x: " << trajectory_points[i].x << ", y: " << trajectory_points[i].y << ", speed: " << lag_speeds[i]* 2.23694 << "mph"); diff --git a/bsm_generator/CMakeLists.txt b/bsm_generator/CMakeLists.txt index abcf5da059..4478733842 100644 --- a/bsm_generator/CMakeLists.txt +++ b/bsm_generator/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(bsm_generator) # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -44,8 +50,8 @@ ament_auto_add_library(${node_lib} SHARED src/bsm_generator_node.cpp ) -ament_auto_add_executable(${node_exec} - src/main.cpp +ament_auto_add_executable(${node_exec} + src/main.cpp ) # Register component @@ -62,7 +68,7 @@ target_link_libraries(${node_exec} ) # Testing -if(BUILD_TESTING) +if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() # This populates the ${${PROJECT_NAME}_FOUND_TEST_DEPENDS} variable diff --git a/bsm_generator/package.xml b/bsm_generator/package.xml index b842b9f0b2..1d387f3f80 100644 --- a/bsm_generator/package.xml +++ b/bsm_generator/package.xml @@ -1,6 +1,6 @@ - carma - 3.3.0 + 5.0.0 The carma package. carma @@ -37,5 +37,5 @@ catkin ament_cmake - + diff --git a/carma_guidance_plugins/CMakeLists.txt b/carma_guidance_plugins/CMakeLists.txt index 339fea3a6f..3405932276 100644 --- a/carma_guidance_plugins/CMakeLists.txt +++ b/carma_guidance_plugins/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(carma_guidance_plugins) # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -42,7 +48,7 @@ ament_auto_add_library(${node_lib} SHARED ) # Testing -if(BUILD_TESTING) +if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() # This populates the ${${PROJECT_NAME}_FOUND_TEST_DEPENDS} variable diff --git a/carma_guidance_plugins/package.xml b/carma_guidance_plugins/package.xml index b0f618869c..d09b938d4e 100644 --- a/carma_guidance_plugins/package.xml +++ b/carma_guidance_plugins/package.xml @@ -1,6 +1,6 @@ - ament_cmake + ament_cmake_auto + + carma_cmake_common - ament_auto_cmake + rclcpp carma_ros2_utils rclcpp_components @@ -43,17 +47,17 @@ j2735_v2x_msgs carma_debug_ros2_msgs rosgraph_msgs - autoware_lanelet2_ros_interface - + ament_lint_auto ament_cmake_gtest + launch launch_ros ament_cmake - + \ No newline at end of file diff --git a/carma_wm/src/Geometry.cpp b/carma_wm/src/Geometry.cpp index 70b5fb7bb1..1a2a0de4f9 100644 --- a/carma_wm/src/Geometry.cpp +++ b/carma_wm/src/Geometry.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include namespace carma_wm diff --git a/carma_wm/test/CollisionDetectionTest.cpp b/carma_wm/test/CollisionDetectionTest.cpp index c93a68a01b..f452d6ff75 100644 --- a/carma_wm/test/CollisionDetectionTest.cpp +++ b/carma_wm/test/CollisionDetectionTest.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "TestHelpers.hpp" diff --git a/carma_wm/test/GeometryTest.cpp b/carma_wm/test/GeometryTest.cpp index 86a605a3bb..04a5377b56 100644 --- a/carma_wm/test/GeometryTest.cpp +++ b/carma_wm/test/GeometryTest.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include "TestHelpers.hpp" diff --git a/carma_wm_ctrl/src/WMBroadcasterNode.cpp b/carma_wm_ctrl/src/WMBroadcasterNode.cpp index fdb43fd9f2..56d22b1e69 100644 --- a/carma_wm_ctrl/src/WMBroadcasterNode.cpp +++ b/carma_wm_ctrl/src/WMBroadcasterNode.cpp @@ -62,8 +62,8 @@ WMBroadcasterNode::WMBroadcasterNode(const rclcpp::NodeOptions &options) config_.participant = declare_parameter("vehicle_participant_type", config_.participant); config_.participant = declare_parameter("config_speed_limit", config_.config_limit); - declare_parameter("intersection_ids_for_correction"); - declare_parameter("intersection_coord_correction"); + declare_parameter("intersection_ids_for_correction", config_.intersection_ids_for_correction); + declare_parameter("intersection_coord_correction", config_.intersection_coord_correction); }; void WMBroadcasterNode::initializeWorker(std::weak_ptr weak_node_pointer) diff --git a/cooperative_lanechange/CMakeLists.txt b/cooperative_lanechange/CMakeLists.txt index e72dc709be..b96af926b0 100644 --- a/cooperative_lanechange/CMakeLists.txt +++ b/cooperative_lanechange/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(cooperative_lanechange) # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -39,8 +45,8 @@ ament_auto_add_library(${node_lib} SHARED src/cooperative_lanechange_node.cpp ) -ament_auto_add_executable(${node_exec} - src/main.cpp +ament_auto_add_executable(${node_exec} + src/main.cpp ) # Register component @@ -53,7 +59,7 @@ target_link_libraries(${node_exec} ) # Testing -if(BUILD_TESTING) +if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() # This populates the ${${PROJECT_NAME}_FOUND_TEST_DEPENDS} variable diff --git a/cooperative_lanechange/package.xml b/cooperative_lanechange/package.xml index 9f38c9e60f..204569ac73 100644 --- a/cooperative_lanechange/package.xml +++ b/cooperative_lanechange/package.xml @@ -1,6 +1,6 @@ - @@ -18,7 +18,7 @@ ament_cmake carma_cmake_common ament_auto_cmake - + carma_planning_msgs rclcpp std_msgs @@ -26,7 +26,7 @@ carma_wm tf tf2 - tf2_geometry_msgs + tf2_geometry_msgs autoware_msgs @@ -39,5 +39,5 @@ ament_cmake - + diff --git a/plan_delegator/src/plan_delegator.cpp b/plan_delegator/src/plan_delegator.cpp index adbf5514d7..4dc44be4c8 100644 --- a/plan_delegator/src/plan_delegator.cpp +++ b/plan_delegator/src/plan_delegator.cpp @@ -129,7 +129,7 @@ namespace plan_delegator PlanDelegator::PlanDelegator(const rclcpp::NodeOptions &options) : carma_ros2_utils::CarmaLifecycleNode(options), - tf2_buffer_(this->get_clock()), + tf2_buffer_(std::make_shared(this->get_clock())), wml_(this->get_node_base_interface(), this->get_node_logging_interface(), this->get_node_topics_interface(), this->get_node_parameters_interface()) { @@ -721,11 +721,11 @@ namespace plan_delegator void PlanDelegator::lookupFrontBumperTransform() { - tf2_listener_.reset(new tf2_ros::TransformListener(tf2_buffer_)); - tf2_buffer_.setUsingDedicatedThread(true); + tf2_listener_ = std::make_shared(*tf2_buffer_); + tf2_buffer_->setUsingDedicatedThread(true); try { - geometry_msgs::msg::TransformStamped tf = tf2_buffer_.lookupTransform("base_link", "vehicle_front", rclcpp::Time(0), rclcpp::Duration(20.0, 0)); //save to local copy of transform 20 sec timeout + geometry_msgs::msg::TransformStamped tf = tf2_buffer_->lookupTransform("base_link", "vehicle_front", rclcpp::Time(0), rclcpp::Duration(20.0, 0)); //save to local copy of transform 20 sec timeout length_to_front_bumper_ = tf.transform.translation.x; RCLCPP_DEBUG_STREAM(rclcpp::get_logger("plan_delegator"),"length_to_front_bumper_: " << length_to_front_bumper_); diff --git a/platooning_control/CMakeLists.txt b/platooning_control/CMakeLists.txt index aaed1a8fa6..d55c9208fa 100644 --- a/platooning_control/CMakeLists.txt +++ b/platooning_control/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(platooning_control) # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() diff --git a/platooning_control/package.xml b/platooning_control/package.xml index 71e3a7ba2e..5d6da25363 100644 --- a/platooning_control/package.xml +++ b/platooning_control/package.xml @@ -15,7 +15,7 @@ platooning_control - 1.0.0 + 5.0.0 The platooning_control package carma diff --git a/platooning_control/test/test_pure.cpp b/platooning_control/test/test_pure.cpp index d2e03cd0c7..cc8330b162 100644 --- a/platooning_control/test/test_pure.cpp +++ b/platooning_control/test/test_pure.cpp @@ -58,7 +58,7 @@ TEST(PurePursuitTest, sanity_check) state_tf.state.y = 0; state_tf.state.longitudinal_velocity_mps = 4.0; //arbitrary speed for first point plan.header.frame_id = state_tf.header.frame_id; - plan.header.stamp = rclcpp::Time(converted_time_now*1e9) + rclcpp::Duration(1.0*1e9); + plan.header.stamp = rclcpp::Time(converted_time_now*1e9) + rclcpp::Duration::from_nanoseconds(1.0*1e9); plan.trajectory_points = { tpp, tpp2, tpp3 }; diff --git a/platooning_tactical_plugin/CMakeLists.txt b/platooning_tactical_plugin/CMakeLists.txt index d2c2efa4bd..dd36549a95 100644 --- a/platooning_tactical_plugin/CMakeLists.txt +++ b/platooning_tactical_plugin/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(platooning_tactical_plugin) # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -40,8 +46,8 @@ ament_auto_add_library(${node_lib} SHARED src/platooning_tactical_plugin.cpp ) -ament_auto_add_executable(${node_exec} - src/main.cpp +ament_auto_add_executable(${node_exec} + src/main.cpp ) # Register component @@ -54,7 +60,7 @@ target_link_libraries(${node_exec} ) # Testing -if(BUILD_TESTING) +if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() # This populates the ${${PROJECT_NAME}_FOUND_TEST_DEPENDS} variable diff --git a/platooning_tactical_plugin/package.xml b/platooning_tactical_plugin/package.xml index a4358b8f5d..3b2ec0740a 100644 --- a/platooning_tactical_plugin/package.xml +++ b/platooning_tactical_plugin/package.xml @@ -1,6 +1,6 @@ - system_controller - 1.0.0 + 5.0.0 A overall system controller for CARMA Platform and CARMA Messenger. Michael McConnell CARMA diff --git a/template_package/CMakeLists.txt b/template_package/CMakeLists.txt index c0091784ef..bc9cb73fab 100644 --- a/template_package/CMakeLists.txt +++ b/template_package/CMakeLists.txt @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project() # Declare carma package and check ROS version @@ -21,6 +21,12 @@ find_package(carma_cmake_common REQUIRED) carma_check_ros_version(2) carma_package() +# Use C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + ## Find dependencies using ament auto find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -39,8 +45,8 @@ ament_auto_add_library(${node_lib} SHARED src/_node.cpp ) -ament_auto_add_executable(${node_exec} - src/main.cpp +ament_auto_add_executable(${node_exec} + src/main.cpp ) # Register component @@ -53,7 +59,7 @@ target_link_libraries(${node_exec} ) # Testing -if(BUILD_TESTING) +if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() # This populates the ${${PROJECT_NAME}_FOUND_TEST_DEPENDS} variable diff --git a/template_package/package.xml b/template_package/package.xml index a487dcad99..76ae353977 100644 --- a/template_package/package.xml +++ b/template_package/package.xml @@ -1,6 +1,6 @@ -