diff --git a/.circleci/config.yml b/.circleci/config.yml index 3aef205a07..5cb8c09aa7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,11 +28,12 @@ jobs: # Pull docker image from docker hub # XTERM used for better catkin_make output docker: - - image: usdotfhwastol/autoware.ai:carma-system-3.9.0 + - image: usdotfhwastol/autoware.ai:carma-system-3.10.0 user: carma environment: TERM: xterm INIT_ENV: /home/carma/.base-image/init-env.sh + resource_class: large # Set working directory working_directory: "/opt/carma/" # Pull code and execute tests @@ -59,13 +60,13 @@ jobs: name: Build CARMA command: | source ${INIT_ENV} - export ROS_PARALLEL_JOBS='-j2 -l2' # Try to reduce memory consumption on build + export ROS_PARALLEL_JOBS='-j3 -l3' # Try to reduce memory consumption on build build-wrapper-linux-x86-64 --out-dir /opt/carma/bw-output bash make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov - run: name: Run C++ Tests command: | source ${INIT_ENV} - export ROS_PARALLEL_JOBS='-j2 -l2' # Try to reduce memory consumption on build + export ROS_PARALLEL_JOBS='-j3 -l3' # Try to reduce memory consumption on build bash make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov # Run SonarCloud analysis diff --git a/.sonarqube/sonar-scanner.properties b/.sonarqube/sonar-scanner.properties index 0a99970d46..f7c394d50d 100644 --- a/.sonarqube/sonar-scanner.properties +++ b/.sonarqube/sonar-scanner.properties @@ -17,6 +17,7 @@ sonar.scanner.force-deprecated-java-version-grace-period=true sonar.projectKey=usdot-fhwa-stol_CARMAPlatform sonar.organization=usdot-fhwa-stol sonar.cfamily.build-wrapper-output=/opt/carma/bw-output +sonar.cfamily.threads=4 sonar.host.url=https://sonarcloud.io sonar.sources=src/main sonar.tests=src/test @@ -182,4 +183,4 @@ basic_autonomy.sonar.tests = test mobilitypath_visualizer.sonar.tests = test wz_strategic_plugin.sonar.tests = test sci_strategic_plugin.sonar.tests = test -stop_controlled_intersection_tactical_plugin.sonar.tests = test \ No newline at end of file +stop_controlled_intersection_tactical_plugin.sonar.tests = test diff --git a/Dockerfile b/Dockerfile index b86047a22e..9a3c97f2ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ # Stage 1 - Acquire the CARMA source as well as any extra packages # ///////////////////////////////////////////////////////////////////////////// -FROM usdotfhwastol/autoware.ai:carma-system-3.9.0 AS base-image +FROM usdotfhwastol/autoware.ai:carma-system-3.10.0 AS base-image FROM base-image AS source-code @@ -52,7 +52,6 @@ FROM base-image AS install RUN mkdir ~/carma_ws COPY --from=source-code --chown=carma /home/carma/src /home/carma/carma_ws/src - RUN ~/carma_ws/src/carma-platform/docker/install.sh # ///////////////////////////////////////////////////////////////////////////// diff --git a/arbitrator/CMakeLists.txt b/arbitrator/CMakeLists.txt index b13cdf0278..6fa39205f3 100644 --- a/arbitrator/CMakeLists.txt +++ b/arbitrator/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 2.8.3) project(arbitrator) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/basic_autonomy/src/basic_autonomy.cpp b/basic_autonomy/src/basic_autonomy.cpp index 29d54b6583..3373ebf87f 100644 --- a/basic_autonomy/src/basic_autonomy.cpp +++ b/basic_autonomy/src/basic_autonomy.cpp @@ -222,8 +222,10 @@ namespace basic_autonomy break; } - // If there are no more points to add but we haven't reached the ending downtrack then get the following lanelet and keep iterating - if (i == points_and_target_speeds.size() - 1) + // If there are no more points to add but we haven't reached the ending downtrack then + // construct an extrapolated straight line from the final point and keep adding to this line until the downtrack is met + // Since this is purely needed to allow for a spline fit edge case, it should have minimal impact on the actual steering behavior of the vehicle + if (i == points_and_target_speeds.size() - 1) // dist_accumulator < ending_downtrack is guaranteed by earlier conditional { ROS_DEBUG_STREAM("Extending trajectory using buffer beyond end of target lanelet"); diff --git a/basic_autonomy/test/test_waypoint_generation.cpp b/basic_autonomy/test/test_waypoint_generation.cpp index 9ac8de2ae5..f93123ac2a 100644 --- a/basic_autonomy/test/test_waypoint_generation.cpp +++ b/basic_autonomy/test/test_waypoint_generation.cpp @@ -22,13 +22,13 @@ #include #include #include -#include #include #include #include #include -#include #include +#include +#include #include #include #include diff --git a/bsm_generator/CMakeLists.txt b/bsm_generator/CMakeLists.txt index 8bead1c9a3..4b80563cd9 100644 --- a/bsm_generator/CMakeLists.txt +++ b/bsm_generator/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(bsm_generator) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/carma-platform.repos b/carma-platform.repos index 29df57b710..4eb43efcad 100644 --- a/carma-platform.repos +++ b/carma-platform.repos @@ -1,77 +1,85 @@ repositories: - carma/src/avt_vimba_camera: + src/astuff_sensor_msgs: + type: git + url: https://github.com/astuff/astuff_sensor_msgs.git + version: melodic + src/autoware.ai: + type: git + url: git@github.com:usdot-fhwa-stol/autoware.ai.git + version: develop + src/avt_vimba_camera: type: git url: git@github.com:usdot-fhwa-stol/avt_vimba_camera.git version: develop - carma/src/carma-base: + src/carma-base: type: git url: git@github.com:usdot-fhwa-stol/carma-base.git version: develop - carma/src/carma-cohda-dsrc-driver: + src/carma-cohda-dsrc-driver: type: git url: git@github.com:usdot-fhwa-stol/carma-cohda-dsrc-driver.git version: develop - carma/src/carma-config: + src/carma-config: type: git url: git@github.com:usdot-fhwa-stol/carma-config.git version: develop - carma/src/carma-delphi-esr-driver: + src/carma-delphi-esr-driver: type: git url: git@github.com:usdot-fhwa-stol/carma-delphi-esr-driver.git version: develop - carma/src/carma-delphi-srr2-driver: + src/carma-delphi-srr2-driver: type: git url: git@github.com:usdot-fhwa-stol/carma-delphi-srr2-driver.git version: develop - carma/src/carma-utils: + src/carma-garmin-lidar-lite-v3-driver-wrapper: type: git - url: git@github.com:usdot-fhwa-stol/carma-utils.git + url: git@github.com:usdot-fhwa-stol/carma-garmin-lidar-lite-v3-driver-wrapper.git version: develop - carma/src/carma-msgs: + src/carma-messenger: type: git - url: git@github.com:usdot-fhwa-stol/carma-msgs.git + url: git@github.com:usdot-fhwa-stol/carma-messenger.git version: develop - carma/src/novatel_gps_driver: + src/carma-msgs: type: git - url: git@github.com:usdot-fhwa-stol/novatel_gps_driver.git + url: git@github.com:usdot-fhwa-stol/carma-msgs.git version: develop - carma/src/carma-platform: + src/carma-platform: type: git url: git@github.com:usdot-fhwa-stol/carma-platform.git version: develop - carma/src/carma-ssc-interface-wrapper: + src/carma-ssc-interface-wrapper: type: git url: git@github.com:usdot-fhwa-stol/carma-ssc-interface-wrapper.git version: develop - carma/src/carma-vehicle-model-framework: + src/carma-utils: + type: git + url: git@github.com:usdot-fhwa-stol/carma-utils.git + version: develop + src/carma-vehicle-model-framework: type: git url: git@github.com:usdot-fhwa-stol/carma-vehicle-model-framework.git version: develop - carma/src/carma-velodyne-lidar-driver: + src/carma-velodyne-lidar-driver: type: git url: git@github.com:usdot-fhwa-stol/carma-velodyne-lidar-driver.git version: develop - carma/src/carma-web-ui: + src/carma-web-ui: type: git url: git@github.com:usdot-fhwa-stol/carma-web-ui.git version: develop - carma/src/carma-garmin-lidar-lite-v3-driver-wrapper: - type: git - url: git@github.com:usdot-fhwa-stol/carma-garmin-lidar-lite-v3-driver-wrapper.git - version: develop - carma/src/carma-lightbar-driver: + src/carma-lightbar-driver: type: git url: git@github.com:usdot-fhwa-stol/carma-lightbar-driver.git version: develop - carma/src/carma-messenger: + src/kvaser_interface: type: git - url: git@github.com:usdot-fhwa-stol/carma-messenger.git + url: git@github.com:astuff/kvaser_interface.git + version: master + src/novatel_gps_driver: + type: git + url: git@github.com:usdot-fhwa-stol/novatel_gps_driver.git version: develop - carma/src/opendrive2lanelet: + src/opendrive2lanelet: type: git url: git@github.com:usdot-fhwa-stol/opendrive2lanelet.git version: develop - autoware.ai: - type: git - url: git@github.com:usdot-fhwa-stol/autoware.ai.git - version: carma-develop diff --git a/carma/CMakeLists.txt b/carma/CMakeLists.txt index c9a0a0c565..d7222b82c2 100644 --- a/carma/CMakeLists.txt +++ b/carma/CMakeLists.txt @@ -30,7 +30,6 @@ find_package(catkin REQUIRED j2735_msgs autoware_msgs derived_object_msgs - radar_msgs ) catkin_package() diff --git a/carma/launch/environment.launch b/carma/launch/environment.launch index bb1ac9ba31..3429f8c98d 100755 --- a/carma/launch/environment.launch +++ b/carma/launch/environment.launch @@ -131,30 +131,30 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -167,45 +167,43 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -213,21 +211,21 @@ - - - - - - - - - - + + + + + + + + + + - + diff --git a/carma/launch/localization.launch b/carma/launch/localization.launch index 54250ae86a..103ec86e00 100755 --- a/carma/launch/localization.launch +++ b/carma/launch/localization.launch @@ -83,7 +83,6 @@ - diff --git a/carma/package.xml b/carma/package.xml index 34c90da90b..203b2b5212 100644 --- a/carma/package.xml +++ b/carma/package.xml @@ -62,7 +62,6 @@ rospy autoware_msgs derived_object_msgs - radar_msgs robot_state_publisher diff --git a/carma_build.bash b/carma_build.bash index 33cb2d3311..f227698f67 100755 --- a/carma_build.bash +++ b/carma_build.bash @@ -97,7 +97,12 @@ fi ### # Build CARMA ### + +source /opt/autoware.ai/ros/install/setup.bash +echo "Autoware built successfuly. Binaries sourced from $(realpath ./install/setup.bash)" + echo "Building CARMA" cd ${carma_workspace} + colcon build --cmake-args ${carma_build_args} -echo echo "CARMA built successfuly. Binaries sourced from $(realpath ./install/setup.bash)" +echo "CARMA built successfuly. Binaries sourced from $(realpath ./install/setup.bash)" diff --git a/carma_wm/CMakeLists.txt b/carma_wm/CMakeLists.txt index 4a59e4d8ca..1acc5ed778 100644 --- a/carma_wm/CMakeLists.txt +++ b/carma_wm/CMakeLists.txt @@ -13,11 +13,11 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.0.2) project(carma_wm) ## Compile as C++14, as it is required by lanelet2 -add_compile_options(-std=c++14) +add_compile_options(-std=c++17) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -35,6 +35,7 @@ set ( PKG_CATKIN_DEPS roscpp tf2 tf2_geometry_msgs + autoware_lanelet2_ros_interface ) ## Find required catkin packages @@ -117,7 +118,7 @@ add_dependencies( # Mark libraries for installation # See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html -install(TARGETS ${PROJECT_NAME} map_update_logger_node +install(TARGETS ${PROJECT_NAME} #map_update_logger_node ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/carma_wm/include/carma_wm/CARMAWorldModel.h b/carma_wm/include/carma_wm/CARMAWorldModel.h index 0217fc24ff..fd62742ad2 100644 --- a/carma_wm/include/carma_wm/CARMAWorldModel.h +++ b/carma_wm/include/carma_wm/CARMAWorldModel.h @@ -250,7 +250,7 @@ class CARMAWorldModel : public WorldModel LaneletRoutePtr route_; LaneletRoutingGraphPtr map_routing_graph_; double route_length_ = 0; - std::unordered_map>>> traffic_light_states_; //[intersection_id][signal_group_id] + std::unordered_map>>> traffic_light_states_; //[intersection_id][signal_group_id] lanelet::LaneletSubmapConstUPtr shortest_path_view_; // Map containing only lanelets along the shortest path of the // route std::vector shortest_path_centerlines_; // List of disjoint centerlines seperated by lane diff --git a/carma_wm/include/carma_wm/WMTestLibForGuidance.h b/carma_wm/include/carma_wm/WMTestLibForGuidance.h index 546376d7f5..81a6bbc412 100644 --- a/carma_wm/include/carma_wm/WMTestLibForGuidance.h +++ b/carma_wm/include/carma_wm/WMTestLibForGuidance.h @@ -492,12 +492,12 @@ inline void setRouteByIds (std::vector lanelet_ids, std::shared_ptr * The default timing plan is 4sec yewllow, 20sec red, 20sec green */ inline void addTrafficLight(std::shared_ptr cmw, lanelet::Id light_id, lanelet::Id owning_lanelet_id, std::vector controlled_lanelet_ids, -std::vector> timing_plan = +std::vector> timing_plan = { - std::make_pair(ros::Time(0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED), // Just ended green - std::make_pair(ros::Time(4.0), lanelet::CarmaTrafficLightState::PROTECTED_CLEARANCE), // 4 sec yellow - std::make_pair(ros::Time(24.0), lanelet::CarmaTrafficLightState::STOP_AND_REMAIN), // 20 sec red - std::make_pair(ros::Time(44.0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED) // 20 sec green + std::make_pair(lanelet::time::timeFromSec(0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED), // Just ended green + std::make_pair(lanelet::time::timeFromSec(4.0), lanelet::CarmaTrafficLightState::PROTECTED_CLEARANCE), // 4 sec yellow + std::make_pair(lanelet::time::timeFromSec(24.0), lanelet::CarmaTrafficLightState::STOP_AND_REMAIN), // 20 sec red + std::make_pair(lanelet::time::timeFromSec(44.0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED) // 20 sec green }) { std::vector controlled_lanelets; diff --git a/carma_wm/package.xml b/carma_wm/package.xml index d6819ff0cd..03f7e92e96 100644 --- a/carma_wm/package.xml +++ b/carma_wm/package.xml @@ -20,6 +20,7 @@ roscpp tf2 tf2_geometry_msgs + autoware_lanelet2_ros_interface diff --git a/carma_wm/src/CARMAWorldModel.cpp b/carma_wm/src/CARMAWorldModel.cpp index d7477ac7f9..37fb3f80e9 100755 --- a/carma_wm/src/CARMAWorldModel.cpp +++ b/carma_wm/src/CARMAWorldModel.cpp @@ -1278,12 +1278,12 @@ void CARMAWorldModel::processSpatFromMsg(const cav_msgs::SPAT& spat_msg) } // raw min_end_time in seconds measured from the most recent full hour - ros::Time min_end_time(current_movement_state.movement_event_list[0].timing.min_end_time); + boost::posix_time::ptime min_end_time = lanelet::time::timeFromSec(current_movement_state.movement_event_list[0].timing.min_end_time); if (curr_intersection.moy_exists) //account for minute of the year { auto inception_boost(boost::posix_time::time_from_string("1970-01-01 00:00:00.000")); // inception of epoch - auto duration_since_inception(boost::posix_time::seconds(ros::Time::now().toSec())); + auto duration_since_inception(lanelet::time::durationFromSec(ros::Time::now().toSec())); auto curr_time_boost = inception_boost + duration_since_inception; ROS_DEBUG_STREAM("Calculated current time: " << boost::posix_time::to_simple_string(curr_time_boost)); @@ -1300,10 +1300,8 @@ void CARMAWorldModel::processSpatFromMsg(const cav_msgs::SPAT& spat_msg) auto curr_day_boost(boost::posix_time::time_from_string(std::to_string(curr_year) + "/" + std::to_string(curr_month) + "/" + std::to_string(curr_day) +" 00:00:00.000")); // GMT is the standard auto curr_hour_boost = curr_day_boost + boost::posix_time::hours(hours_of_day); - auto curr_hour_stamp = ros::Time::fromBoost(curr_hour_boost); - - min_end_time += ros::Duration(curr_hour_stamp.toSec()); - ROS_DEBUG_STREAM("New min_end_time: " << std::to_string(min_end_time.toSec())); + min_end_time += lanelet::time::durationFromSec(lanelet::time::toSec(curr_hour_boost)); + ROS_DEBUG_STREAM("New min_end_time: " << std::to_string(lanelet::time::toSec(min_end_time))); } //if same data as last time: @@ -1322,14 +1320,14 @@ void CARMAWorldModel::processSpatFromMsg(const cav_msgs::SPAT& spat_msg) traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].back().first < min_end_time) { ROS_DEBUG_STREAM("Updated time for state: " << static_cast(current_movement_state.movement_event_list[0].event_state.movement_phase_state) << ", with time: " - << std::to_string(min_end_time.toSec())); + << std::to_string(lanelet::time::toSec(min_end_time))); traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].back().first = min_end_time; continue; } // detected that new state received; therefore, set the last recorded state (not new one received) ROS_DEBUG_STREAM("Received new state for light: " << curr_light_id << ", with state: " << static_cast(current_movement_state.movement_event_list[0].event_state.movement_phase_state) << - ", time: " << ros::Time(min_end_time)); + ", time: " << ros::Time::fromBoost(min_end_time)); if (traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].size() >= 2 @@ -1339,27 +1337,27 @@ void CARMAWorldModel::processSpatFromMsg(const cav_msgs::SPAT& spat_msg) ROS_DEBUG_STREAM("Setting last recorded state for light: " << curr_light_id << ", with state: " << traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].back().second << ", time: " << traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].back().first); curr_light->setStates(traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group], curr_intersection.revision); - ROS_DEBUG_STREAM("Set new cycle of total seconds: " << curr_light->fixed_cycle_duration.toSec()); + ROS_DEBUG_STREAM("Set new cycle of total seconds: " << lanelet::time::toSec(curr_light->fixed_cycle_duration)); } else if (curr_light->recorded_time_stamps.empty()) // if it was never initialized, do its best to plan with the current state until the future state is also received. { - std::vector> default_state; + std::vector> default_state; // green 20sec, yellow 3sec, red 20sec, back to green 20sec etc... - default_state.push_back(std::make_pair(ros::Time(0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); - default_state.push_back(std::make_pair(default_state.back().first + ros::Duration(YELLOW_LIGHT_DURATION), lanelet::CarmaTrafficLightState::PROTECTED_CLEARANCE)); - default_state.push_back(std::make_pair(default_state.back().first + ros::Duration(RED_LIGHT_DURATION), lanelet::CarmaTrafficLightState::STOP_AND_REMAIN)); - default_state.push_back(std::make_pair(default_state.back().first + ros::Duration(GREEN_LIGHT_DURATION), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); + default_state.push_back(std::make_pair(boost::posix_time::from_time_t(0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); + default_state.push_back(std::make_pair(default_state.back().first + lanelet::time::durationFromSec(YELLOW_LIGHT_DURATION), lanelet::CarmaTrafficLightState::PROTECTED_CLEARANCE)); + default_state.push_back(std::make_pair(default_state.back().first + lanelet::time::durationFromSec(RED_LIGHT_DURATION), lanelet::CarmaTrafficLightState::STOP_AND_REMAIN)); + default_state.push_back(std::make_pair(default_state.back().first + lanelet::time::durationFromSec(GREEN_LIGHT_DURATION), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); curr_light->setStates(default_state, curr_intersection.revision); - ROS_DEBUG_STREAM("Set default cycle of total seconds: " << curr_light->fixed_cycle_duration.toSec()); + ROS_DEBUG_STREAM("Set default cycle of total seconds: " << lanelet::time::toSec(curr_light->fixed_cycle_duration)); } else if (traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].size() >= 2 ) { - ros::Duration green_light_duration = ros::Duration(GREEN_LIGHT_DURATION); - ros::Duration yellow_light_duration = ros::Duration(YELLOW_LIGHT_DURATION); - ros::Duration red_light_duration = ros::Duration(RED_LIGHT_DURATION); + auto green_light_duration = lanelet::time::durationFromSec(GREEN_LIGHT_DURATION); + auto yellow_light_duration = lanelet::time::durationFromSec(YELLOW_LIGHT_DURATION); + auto red_light_duration = lanelet::time::durationFromSec(RED_LIGHT_DURATION); - std::vector> partial_states; + std::vector> partial_states; // set the partial cycle. ROS_DEBUG_STREAM("Setting last recorded state for light: " << curr_light_id << ", with state: " << traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].back().second << ", time: " << traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group].back().first); @@ -1377,13 +1375,13 @@ void CARMAWorldModel::processSpatFromMsg(const cav_msgs::SPAT& spat_msg) yellow_light_duration = traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group][i + 1].first - traffic_light_states_[curr_intersection.id.id][current_movement_state.signal_group][i].first; } - partial_states.push_back(std::make_pair(ros::Time(0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); - partial_states.push_back(std::make_pair(partial_states.back().first + yellow_light_duration, lanelet::CarmaTrafficLightState::PROTECTED_CLEARANCE)); - partial_states.push_back(std::make_pair(partial_states.back().first + red_light_duration, lanelet::CarmaTrafficLightState::STOP_AND_REMAIN)); - partial_states.push_back(std::make_pair(partial_states.back().first + green_light_duration, lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); + partial_states.push_back(std::make_pair(boost::posix_time::from_time_t(0), lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); + partial_states.push_back(std::make_pair(partial_states.back().first + yellow_light_duration, lanelet::CarmaTrafficLightState::PROTECTED_CLEARANCE)); + partial_states.push_back(std::make_pair(partial_states.back().first + red_light_duration, lanelet::CarmaTrafficLightState::STOP_AND_REMAIN)); + partial_states.push_back(std::make_pair(partial_states.back().first + green_light_duration, lanelet::CarmaTrafficLightState::PROTECTED_MOVEMENT_ALLOWED)); curr_light->setStates(partial_states, curr_intersection.revision); - ROS_DEBUG_STREAM("Set new partial cycle of total seconds: " << curr_light->fixed_cycle_duration.toSec()); + ROS_DEBUG_STREAM("Set new partial cycle of total seconds: " << lanelet::time::toSec(curr_light->fixed_cycle_duration)); } diff --git a/carma_wm/src/MapUpdateLoggerNode.cpp b/carma_wm/src/MapUpdateLoggerNode.cpp index a97e72e4d3..d51c4446ce 100644 --- a/carma_wm/src/MapUpdateLoggerNode.cpp +++ b/carma_wm/src/MapUpdateLoggerNode.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/carma_wm/src/WMListenerWorker.cpp b/carma_wm/src/WMListenerWorker.cpp index b0f1b79291..da55c974f9 100644 --- a/carma_wm/src/WMListenerWorker.cpp +++ b/carma_wm/src/WMListenerWorker.cpp @@ -14,7 +14,7 @@ * the License. */ -#include +#include #include #include #include diff --git a/carma_wm/test/CARMAWorldModelTest.cpp b/carma_wm/test/CARMAWorldModelTest.cpp index a203590dc1..800949b6ef 100755 --- a/carma_wm/test/CARMAWorldModelTest.cpp +++ b/carma_wm/test/CARMAWorldModelTest.cpp @@ -1338,7 +1338,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) cmw.processSpatFromMsg(spat); auto lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // default - EXPECT_EQ(ros::Duration(43), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(43), lights1[0]->fixed_cycle_duration); // call the processSpatFromMsg with that msg 1 event.event_state.movement_phase_state = 7; @@ -1349,7 +1349,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) cmw.processSpatFromMsg(spat); lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // nothing changed - EXPECT_EQ(ros::Duration(43), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(43), lights1[0]->fixed_cycle_duration); // call the processSpatFromMsg with that msg 2a event.event_state.movement_phase_state = 3; @@ -1360,7 +1360,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) cmw.processSpatFromMsg(spat); lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // partial state 7 - EXPECT_EQ(ros::Duration(44.0), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(44.0), lights1[0]->fixed_cycle_duration); // call the processSpatFromMsg with that msg 2b event.event_state.movement_phase_state = 3; @@ -1371,7 +1371,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) cmw.processSpatFromMsg(spat); lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // partial state 7 - EXPECT_EQ(ros::Duration(44.0), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(44.0), lights1[0]->fixed_cycle_duration); // call the processSpatFromMsg with that msg 3 event.event_state.movement_phase_state = 5; @@ -1382,7 +1382,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) cmw.processSpatFromMsg(spat); lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // partial state 3 - EXPECT_EQ(ros::Duration(45), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(45), lights1[0]->fixed_cycle_duration); // call the processSpatFromMsg with that msg 4 event.event_state.movement_phase_state = 1; @@ -1394,7 +1394,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // and query the regem again to check if its entries are updated, by checking revision or getState or predictState etc - EXPECT_EQ(ros::Duration(46), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(46), lights1[0]->fixed_cycle_duration); ROS_DEBUG_STREAM("Calling again... Should have no change"); // call the processSpatFromMsg with that msg 5 @@ -1407,7 +1407,7 @@ TEST(CARMAWorldModelTest, processSpatFromMsg) lights1 = cmw.getMutableMap()->laneletLayer.get(ll_1.id()).regulatoryElementsAs(); // and query the regem again to check if its entries are updated, by checking revision or getState or predictState etc - EXPECT_EQ(ros::Duration(46), lights1[0]->fixed_cycle_duration); + EXPECT_EQ(lanelet::time::durationFromSec(46), lights1[0]->fixed_cycle_duration); } TEST(CARMAWorldModelTest, getLightsAlongRoute) diff --git a/carma_wm/test/GeometryTest.cpp b/carma_wm/test/GeometryTest.cpp index ba693a395a..095201b722 100644 --- a/carma_wm/test/GeometryTest.cpp +++ b/carma_wm/test/GeometryTest.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/carma_wm/test/SegFaultTest.cpp b/carma_wm/test/SegFaultTest.cpp index f9364d0f87..6f00df6e92 100644 --- a/carma_wm/test/SegFaultTest.cpp +++ b/carma_wm/test/SegFaultTest.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include <../src/WMListenerWorker.h> #include #include @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/carma_wm/test/TrafficControlTest.cpp b/carma_wm/test/TrafficControlTest.cpp index 364c21ab52..b8d7f2da55 100644 --- a/carma_wm/test/TrafficControlTest.cpp +++ b/carma_wm/test/TrafficControlTest.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/carma_wm/test/WMListenerWorkerTest.cpp b/carma_wm/test/WMListenerWorkerTest.cpp index f18d1861b6..3acd896449 100644 --- a/carma_wm/test/WMListenerWorkerTest.cpp +++ b/carma_wm/test/WMListenerWorkerTest.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include <../src/WMListenerWorker.h> #include #include @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/carma_wm_ctrl/CMakeLists.txt b/carma_wm_ctrl/CMakeLists.txt index 439979275c..5da5eeb441 100644 --- a/carma_wm_ctrl/CMakeLists.txt +++ b/carma_wm_ctrl/CMakeLists.txt @@ -33,6 +33,7 @@ set ( PKG_CATKIN_DEPS carma_wm cav_msgs roscpp + autoware_lanelet2_ros_interface ) ## Find required catkin packages diff --git a/carma_wm_ctrl/include/carma_wm_ctrl/WMBroadcaster.h b/carma_wm_ctrl/include/carma_wm_ctrl/WMBroadcaster.h index c9d6eeacc6..2556086215 100644 --- a/carma_wm_ctrl/include/carma_wm_ctrl/WMBroadcaster.h +++ b/carma_wm_ctrl/include/carma_wm_ctrl/WMBroadcaster.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/carma_wm_ctrl/package.xml b/carma_wm_ctrl/package.xml index ce692c3e2a..ad2dcd4a3c 100644 --- a/carma_wm_ctrl/package.xml +++ b/carma_wm_ctrl/package.xml @@ -18,6 +18,7 @@ carma_wm cav_msgs roscpp + autoware_lanelet2_ros_interface diff --git a/carma_wm_ctrl/src/WMBroadcaster.cpp b/carma_wm_ctrl/src/WMBroadcaster.cpp index 998abb4638..bd476e21d1 100644 --- a/carma_wm_ctrl/src/WMBroadcaster.cpp +++ b/carma_wm_ctrl/src/WMBroadcaster.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/carma_wm_ctrl/test/MapToolsTest.cpp b/carma_wm_ctrl/test/MapToolsTest.cpp index 94be6d0d73..58f61660aa 100644 --- a/carma_wm_ctrl/test/MapToolsTest.cpp +++ b/carma_wm_ctrl/test/MapToolsTest.cpp @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/carma_wm_ctrl/test/TCMTest.cpp b/carma_wm_ctrl/test/TCMTest.cpp index bd91c3c4b1..77d17718f0 100644 --- a/carma_wm_ctrl/test/TCMTest.cpp +++ b/carma_wm_ctrl/test/TCMTest.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/carma_wm_ctrl/test/WMBroadcasterTest.cpp b/carma_wm_ctrl/test/WMBroadcasterTest.cpp index d5c306b9ef..e0706e06a0 100644 --- a/carma_wm_ctrl/test/WMBroadcasterTest.cpp +++ b/carma_wm_ctrl/test/WMBroadcasterTest.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cooperative_lanechange/CMakeLists.txt b/cooperative_lanechange/CMakeLists.txt index dd1c1fe333..12aed64c3d 100644 --- a/cooperative_lanechange/CMakeLists.txt +++ b/cooperative_lanechange/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.0.2) project(cooperative_lanechange) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/cooperative_lanechange/package.xml b/cooperative_lanechange/package.xml index 6e95ca9c43..90de0bf833 100644 --- a/cooperative_lanechange/package.xml +++ b/cooperative_lanechange/package.xml @@ -22,5 +22,3 @@ carma_debug_msgs lanelet2_extension - - \ No newline at end of file diff --git a/cooperative_lanechange/src/cooperative_lanechange.cpp b/cooperative_lanechange/src/cooperative_lanechange.cpp index 3f937ad2a3..71f3efe521 100644 --- a/cooperative_lanechange/src/cooperative_lanechange.cpp +++ b/cooperative_lanechange/src/cooperative_lanechange.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/cost_plugin_system/CMakeLists.txt b/cost_plugin_system/CMakeLists.txt index 5460c51647..f0d4739aa7 100644 --- a/cost_plugin_system/CMakeLists.txt +++ b/cost_plugin_system/CMakeLists.txt @@ -16,8 +16,8 @@ cmake_minimum_required(VERSION 2.8.3) project(cost_plugin_system) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/docker/build-image.sh b/docker/build-image.sh index f9ff271367..f281fc55b3 100755 --- a/docker/build-image.sh +++ b/docker/build-image.sh @@ -62,7 +62,10 @@ if [[ $COMPONENT_VERSION_STRING = "develop" ]]; then --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` . else - docker build --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ + #The addition of --network=host was a fix for a DNS resolution error that occured + #when running the platform inside an Ubuntu 20.04 virtual machine. The error and possible soliutions are + # discussed here: https://github.com/moby/moby/issues/41003 + docker build --network=host --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ --build-arg VERSION="$COMPONENT_VERSION_STRING" \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` . diff --git a/docker/checkout.bash b/docker/checkout.bash index 9682d69f29..861994102a 100755 --- a/docker/checkout.bash +++ b/docker/checkout.bash @@ -37,14 +37,20 @@ done cd ${dir}/src + +# clone carma repos + if [[ "$BRANCH" = "develop" ]]; then - git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch carma-system-3.9.0 - git clone --depth=1 https://github.com/usdot-fhwa-stol/novatel_gps_driver.git --branch carma-system-3.9.0 - git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch carma-system-3.9.0 - git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch carma-system-3.9.0 + git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch $BRANCH + git clone --depth=1 https://github.com/usdot-fhwa-stol/novatel_gps_driver.git --branch $BRANCH + git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch $BRANCH + git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch $BRANCH else - git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch carma-system-3.9.0 - git clone --depth=1 https://github.com/usdot-fhwa-stol/novatel_gps_driver.git --branch carma-system-3.9.0 - git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch carma-system-3.9.0 - git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch carma-system-3.9.0 + git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch carma-system-3.10.0 + git clone --depth=1 https://github.com/usdot-fhwa-stol/novatel_gps_driver.git --branch carma-system-3.10.0 + git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch carma-system-3.10.0 + git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch carma-system-3.10.0 fi + +# add astuff messages +git clone https://github.com/astuff/astuff_sensor_msgs -b melodic diff --git a/docker/install.sh b/docker/install.sh index b9c57c2a81..cba916e3d6 100755 --- a/docker/install.sh +++ b/docker/install.sh @@ -19,13 +19,17 @@ set -ex -source /opt/ros/kinetic/setup.bash +# Source the autoware installation source /opt/autoware.ai/ros/install/setup.bash --extend cd ~/carma_ws -./src/carma-platform/carma_build.bash -c ~/carma_ws -a /opt/autoware.ai/ -x -m "-DCMAKE_BUILD_TYPE=Release" -# Copy the installed files -cd ~/carma_ws -cp -r install/. /opt/carma/install -chmod -R +x /opt/carma/install +sudo mkdir -p /opt/carma # Create install directory +sudo chown carma /opt/carma # Set owner to expose permissions for build +sudo chgrp carma /opt/carma # Set group to expose permissions for build + +echo "Building CARMA" +# --packages-up-to traffic_incident_parser platoon_strategic +colcon build --install-base /opt/carma/install --cmake-args -DCMAKE_BUILD_TYPE=Release + +echo "Build Complete" diff --git a/docs/Release_notes.md b/docs/Release_notes.md index c08641eebf..11995d7674 100644 --- a/docs/Release_notes.md +++ b/docs/Release_notes.md @@ -1,6 +1,61 @@ CARMA Platform Release Notes ---------------------------- +Version 3.10.0, released Dec 17th, 2021 +---------------------------------------- + +**Summary:** +Carma-platform release version 3.10.0 is comprised of two major enhancements. First, ROS1 Noetic (Updating the underlying ROS version from ROS Kinetic to ROS Noetic). Second updating the underlying OS from Ubuntu 16.04 to Ubuntu 20.04 to support the ROS2 migration which will use Ubuntu 20.04. Along with the above enhancements, several bug fixes and CI related enhancements are included in this release. + +Enhancements in this release: +- The following changes have been made to the CARMA code bases. +1. Docker base images updated to Ubuntu 20.04 and CUDA 11 +2. ROS version changed to ROS Noetic +3. All python code updated from Python 2 to Python 3 +4. All ROS package manifest files updated from version 2 to 3 +5. Autoware.ai version updated from 1.13 to 1.14 except for the critical NDT node which remains on version 1.13 due to instability in the 1.14 version encountered during testing. +6. Lanelet2 HD maps library updated from v0.9 to v1.1.1 +7. AVT Vimba Camera driver SDK version updated from v3.1 to v5.0 +8. Default C++ version increased from C++ 11 to C++ 14 +9. Handful of small code smells and compile warnings resolved. +10. Default ROS workspace structure changed so autoware.ai and carma-platform exist in the same source directory + +Fixes in this release: +- Issue 1507: Fixed Input vectors empty exception from cooperative lane change +- Issue 1506: Fixed Insufficient spline points exception from inlane-cruising before lane change +- Issue 1496: Fixed No objects reported from lidar detection anomaly +- Issue 1490: Fixed platooning control package is missing autoware_msgs dependency +- Issue 1486: Fixed localization in release/elise is less stable then in 3.8 +- Issue 1485: Fixed avt_vimba_camera driver is highly unstable in release/elise anomaly +- Issue 1484: Fixed Cuda version mismatch in Elise +- Issue 1477: Fixed Noetic version of carma-ssc-interface-wrapper-driver does not contain pacmod3 and kvaser_interface +- Issue 1436: Fixed Mock Controller Driver Dropping Connection Due to Message md5sum Mismatch. + +Version 3.9.0, released Dec 5th, 2021 +---------------------------------------- + +**Summary:** +Carma-platform release version 3.9.0 is comprised of one major enhancements. First, Updated Carma Freight Port Drayage plugin web service integration. Along with the above enhancement, several bug fixes and CI related enhancements are included in this release. + +Enhancements in this release: +- Issue 1438: Updated Port Drayage Plugin to publish UI Instructions to the Web UI when a route to a newly received destination has been generated. +- Issue 1416: Update Port Drayage plugin to receive PICKUP actions and to broadcast an arrival message when arriving at a 'PICKUP' location. +- Issue 1321: Added capability for CARMA Platform to generate a new active route based off a received destination point for Port Drayage. +- Issue 1252: Added incoming Mobility Operation message processing to Port Drayage Plugin when new Mobility Operation message with strategy carma/port drayage received by a carma vehicle and contents of the Mobility Operation message's strategy params field are stored in Port Drayage Worker. + +Fixes in this release: +- Issue 1534: Updated Port Drayage plugin to set its cmv_id using the vehicle_id global parameter, which includes the vehicle's license plate information and updated cmv_id to a string value. +- Issue 1479: Added combined_lidar_frame arg name in the launch files to have default frame for passenger vehicles and freightliners. +- Issue 1438: Updated Port Drayage Plugin to publish UI Instructions to the Web UI when a route to a newly received destination has been generated. +- Issue 1281: +- Issue 1520: Fixed Potential ILC 32-bit range exception for correlation to lane change geometry creation in CLC where it is creating extra lane follow geometry behind the lane change to avoid running out of points that is creating duplicate points when attaching lanelets. +- Issue 1507: Fixed Input vectors empty exception sometimes at the end of the lane change from cooperative lane change plugin. +- Issue 1506: Fixed Insufficient spline points exception from inlane-cruising when executing a lane change. +- Issue 1524: Fixed route node’s logic using non-down track calculation for route completion check. Which is using a different down track frame compliant calculation for its end of route check. +- Issue 125: Updated route event popup text from Restart to "Start A New Route" in web UI. +- Issue 91: Fixed strategy params parsing issues in carma-platform with replacing encoded quotation marks in received Mobility Operation message's strategy params field. + + Version 3.8.2, released Oct 22nd, 2021 ---------------------------------------- diff --git a/engineering_tools/RouteCreation_CSV2Yaml.py b/engineering_tools/RouteCreation_CSV2Yaml.py index 2143048723..b7d26f161d 100755 --- a/engineering_tools/RouteCreation_CSV2Yaml.py +++ b/engineering_tools/RouteCreation_CSV2Yaml.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2017-2021 LEIDOS. # diff --git a/engineering_tools/RouteCreation_KML2CSV.py b/engineering_tools/RouteCreation_KML2CSV.py index 793ddcbd65..07bb919e60 100755 --- a/engineering_tools/RouteCreation_KML2CSV.py +++ b/engineering_tools/RouteCreation_KML2CSV.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Copyright (C) 2018-2021 LEIDOS. # @@ -31,7 +31,7 @@ def convertKMLToWaypoints(filename): for coord in root.findall(".//{http://www.opengis.net/kml/2.2}coordinates"): (lon, lat, _) = coord.text.split(",") - out.append((lat.strip(), lon.strip())) + out.append((lat.strip(), lon.strip())) return out @@ -50,7 +50,7 @@ def main(): count = 0 for waypoint in waypoints: output.write("{},{},{}\n".format(waypoint[0], waypoint[1], args.default_speed)) - count += 1 + count += 1 print("Wrote {} entries to {}.".format(count, args.csv_output)) diff --git a/engineering_tools/extract_rpy_from_quat.py b/engineering_tools/extract_rpy_from_quat.py index c1c694426a..9f7df0e7f5 100644 --- a/engineering_tools/extract_rpy_from_quat.py +++ b/engineering_tools/extract_rpy_from_quat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2020-2021 LEIDOS. # @@ -135,10 +135,10 @@ def run(args): if __name__ == '__main__': try: if (len(sys.argv) < 4 or len(sys.argv) > 5): - print 'At one-two arguments required extract_rpy_from_quat ' + print('At one-two arguments required extract_rpy_from_quat ') run(sys.argv) except rospy.ROSInterruptException: print("ROS Exception") pass - \ No newline at end of file + diff --git a/engineering_tools/reverse_waypoints.py b/engineering_tools/reverse_waypoints.py index e535428c9b..5ff70bc15c 100644 --- a/engineering_tools/reverse_waypoints.py +++ b/engineering_tools/reverse_waypoints.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Copyright (C) 2018-2021 LEIDOS. # diff --git a/engineering_tools/speedharm-cli.py b/engineering_tools/speedharm-cli.py index 7b38395da5..f9badd3127 100755 --- a/engineering_tools/speedharm-cli.py +++ b/engineering_tools/speedharm-cli.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2017-2021 LEIDOS. # diff --git a/engineering_tools/speedharm_auto_configure.py b/engineering_tools/speedharm_auto_configure.py index c29879094d..3ae177ce78 100755 --- a/engineering_tools/speedharm_auto_configure.py +++ b/engineering_tools/speedharm_auto_configure.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2018-2021 LEIDOS. # diff --git a/gnss_to_map_convertor/CMakeLists.txt b/gnss_to_map_convertor/CMakeLists.txt index 11de2083c5..524de40492 100644 --- a/gnss_to_map_convertor/CMakeLists.txt +++ b/gnss_to_map_convertor/CMakeLists.txt @@ -18,7 +18,7 @@ cmake_minimum_required(VERSION 2.8.3) project(gnss_to_map_convertor) -## Compile as C++14 +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/guidance/CMakeLists.txt b/guidance/CMakeLists.txt index 41cd2368f1..9ac75cc0ef 100644 --- a/guidance/CMakeLists.txt +++ b/guidance/CMakeLists.txt @@ -15,8 +15,8 @@ cmake_minimum_required(VERSION 2.8.3) project(guidance) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/guidance/src/guidance/guidance_state_machine.cpp b/guidance/src/guidance/guidance_state_machine.cpp index 02a8fd2d3f..8701b1136c 100644 --- a/guidance/src/guidance/guidance_state_machine.cpp +++ b/guidance/src/guidance/guidance_state_machine.cpp @@ -89,7 +89,7 @@ namespace guidance if (current_guidance_state_ == State::ENTER_PARK) { // '3' indicates vehicle gearshift is currently set to PARK - if(msg->gearshift == 3) + if(msg->current_gear.gear== autoware_msgs::Gear::PARK) { onGuidanceSignal(Signal::OVERRIDE); // Required for ENTER_PARK -> INACTIVE diff --git a/guidance/test/test_guidance_state_machine.cpp b/guidance/test/test_guidance_state_machine.cpp index 2a8388f768..764d7386bf 100644 --- a/guidance/test/test_guidance_state_machine.cpp +++ b/guidance/test/test_guidance_state_machine.cpp @@ -81,7 +81,7 @@ TEST(GuidanceStateMachineTest, testStates) // test ENTER_PARK state at end of route EXPECT_EQ(6, static_cast(gsm.getCurrentState())); autoware_msgs::VehicleStatus vehicle_status; - vehicle_status.gearshift = 3; // '3' indicates gearshift is set to Park + vehicle_status.current_gear.gear = autoware_msgs::Gear::PARK; // '3' indicates gearshift is set to Park autoware_msgs::VehicleStatusConstPtr vehicle_status_pointer(new autoware_msgs::VehicleStatus(vehicle_status)); gsm.onVehicleStatus(vehicle_status_pointer); // test DRIVERS_READY state diff --git a/guidance_command_repeater/CMakeLists.txt b/guidance_command_repeater/CMakeLists.txt index ac4221fa47..ff613a2a6c 100644 --- a/guidance_command_repeater/CMakeLists.txt +++ b/guidance_command_repeater/CMakeLists.txt @@ -16,8 +16,8 @@ cmake_minimum_required(VERSION 2.8.3) project(guidance_command_repeater) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/health_monitor/CMakeLists.txt b/health_monitor/CMakeLists.txt index 66a5dd858c..ade0be7d2e 100644 --- a/health_monitor/CMakeLists.txt +++ b/health_monitor/CMakeLists.txt @@ -15,8 +15,8 @@ cmake_minimum_required(VERSION 2.8.3) project(health_monitor) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/health_monitor/src/driver_manager.cpp b/health_monitor/src/driver_manager.cpp index 64035f7324..1e6f99eb47 100644 --- a/health_monitor/src/driver_manager.cpp +++ b/health_monitor/src/driver_manager.cpp @@ -15,7 +15,6 @@ */ #include "driver_manager.h" - namespace health_monitor { @@ -138,7 +137,7 @@ namespace health_monitor evaluate_sensor(ssc,i->available_,current_time,i->timestamp_,driver_timeout_); } if(em_.is_lidar_gps_entry_required(i->name_)==0) //Lidar - { + { evaluate_sensor(lidar,i->available_,current_time,i->timestamp_,driver_timeout_); } else if(em_.is_lidar_gps_entry_required(i->name_)==1) //GPS diff --git a/health_monitor/src/entry_manager.cpp b/health_monitor/src/entry_manager.cpp index af5e71863f..14b9912fad 100644 --- a/health_monitor/src/entry_manager.cpp +++ b/health_monitor/src/entry_manager.cpp @@ -111,8 +111,9 @@ namespace health_monitor return i; } } - - + + // default like above? + return -1; } } diff --git a/health_monitor/src/health_monitor.cpp b/health_monitor/src/health_monitor.cpp index 09af9f8480..0062969576 100644 --- a/health_monitor/src/health_monitor.cpp +++ b/health_monitor/src/health_monitor.cpp @@ -26,7 +26,6 @@ namespace health_monitor { car_ = false; truck_ = false; - } void HealthMonitor::initialize() { @@ -34,7 +33,6 @@ namespace health_monitor ROS_INFO_STREAM("Initalizing health_monitor node..."); pnh_.reset(new ros::CARMANodeHandle("~")); nh_.reset(new ros::CARMANodeHandle()); - // init ros service servers, publishers and subscribers registered_plugin_service_server_ = nh_->advertiseService("plugins/get_registered_plugins", &HealthMonitor::registered_plugin_cb, this); active_plugin_service_server_ = nh_->advertiseService("plugins/get_active_plugins", &HealthMonitor::active_plugin_cb, this); diff --git a/inlanecruising_plugin/CMakeLists.txt b/inlanecruising_plugin/CMakeLists.txt index bc3c846137..2349b8d3ec 100644 --- a/inlanecruising_plugin/CMakeLists.txt +++ b/inlanecruising_plugin/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(inlanecruising_plugin) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/inlanecruising_plugin/test/test_inlanecruising_plugin_planning.cpp b/inlanecruising_plugin/test/test_inlanecruising_plugin_planning.cpp index 594d972933..01c941a15d 100644 --- a/inlanecruising_plugin/test/test_inlanecruising_plugin_planning.cpp +++ b/inlanecruising_plugin/test/test_inlanecruising_plugin_planning.cpp @@ -27,9 +27,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -37,7 +34,8 @@ #include #include - +#include +#include #include #include #include diff --git a/lightbar_manager/CMakeLists.txt b/lightbar_manager/CMakeLists.txt index 90d39bf738..aeae4d0c25 100644 --- a/lightbar_manager/CMakeLists.txt +++ b/lightbar_manager/CMakeLists.txt @@ -15,8 +15,8 @@ cmake_minimum_required(VERSION 2.8.3) project(lightbar_manager) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/lightbar_manager/include/lightbar_manager/lightbar_manager_node.hpp b/lightbar_manager/include/lightbar_manager/lightbar_manager_node.hpp index cbfe97a25a..04cd09b2b6 100644 --- a/lightbar_manager/include/lightbar_manager/lightbar_manager_node.hpp +++ b/lightbar_manager/include/lightbar_manager/lightbar_manager_node.hpp @@ -94,7 +94,7 @@ class LightBarManager // Node Data std::string node_name_; double spin_rate_; - std::map prev_owners_before_turn_; + std::map prev_owners_before_turn_; // spin callback function bool spinCallBack(); @@ -127,4 +127,4 @@ class LightBarManager }; //class LightBarManagerNode } // namespace lightbar_manager -#endif //_LIGHTBAR_MANAGER_H \ No newline at end of file +#endif //_LIGHTBAR_MANAGER_H diff --git a/lightbar_manager/package.xml b/lightbar_manager/package.xml index df708bf396..fc957d9ac8 100644 --- a/lightbar_manager/package.xml +++ b/lightbar_manager/package.xml @@ -3,9 +3,9 @@ lightbar_manager 3.3.0 LightBar Manager - Misheel Bayartsengel carma Apache 2.0 License + Misheel Bayartsengel catkin carma_utils cav_msgs diff --git a/mobilitypath_visualizer/CMakeLists.txt b/mobilitypath_visualizer/CMakeLists.txt index 1132631424..2493a066c2 100644 --- a/mobilitypath_visualizer/CMakeLists.txt +++ b/mobilitypath_visualizer/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(mobilitypath_visualizer) -## Compile as C++14, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -90,4 +90,4 @@ install(DIRECTORY launch config ############# find_package(rostest REQUIRED) add_rostest_gtest(mob_path_viz test/mob_path_viz.test test/test_mobility_path_visualizer.cpp) -target_link_libraries(mob_path_viz ${PROJECT_NAME}_lib ${catkin_LIBRARIES}) \ No newline at end of file +target_link_libraries(mob_path_viz ${PROJECT_NAME}_lib ${catkin_LIBRARIES}) diff --git a/mock_drivers/mock_lightbar_driver/CMakeLists.txt b/mock_drivers/mock_lightbar_driver/CMakeLists.txt index 574463d8f1..837609efe9 100644 --- a/mock_drivers/mock_lightbar_driver/CMakeLists.txt +++ b/mock_drivers/mock_lightbar_driver/CMakeLists.txt @@ -15,8 +15,8 @@ cmake_minimum_required(VERSION 2.8.3) project(mock_lightbar_driver) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/mock_drivers/mock_lightbar_driver/package.xml b/mock_drivers/mock_lightbar_driver/package.xml index 9f8f3fe6c4..66c84628d6 100644 --- a/mock_drivers/mock_lightbar_driver/package.xml +++ b/mock_drivers/mock_lightbar_driver/package.xml @@ -1,16 +1,13 @@ mock_lightbar_driver - The mock_lightbar_driver package 1.0.0 - catkin - APACHE 2.0 + The mock_lightbar_driver package Jerry Sun + APACHE 2.0 + catkin roscpp cav_srvs cav_msgs carma_utils - - - - \ No newline at end of file + diff --git a/mock_drivers/rosbag_mock_drivers/CMakeLists.txt b/mock_drivers/rosbag_mock_drivers/CMakeLists.txt index e5bc9a18c0..a893375d47 100644 --- a/mock_drivers/rosbag_mock_drivers/CMakeLists.txt +++ b/mock_drivers/rosbag_mock_drivers/CMakeLists.txt @@ -26,9 +26,12 @@ add_compile_options(-std=c++14) set ( PKG_CATKIN_DEPENDS roscpp std_msgs + autoware_msgs carma_utils cav_msgs cav_srvs + radar_msgs + derived_object_msgs ) find_package(catkin REQUIRED COMPONENTS diff --git a/mock_drivers/rosbag_mock_drivers/include/rosbag_mock_drivers/MockRadarDriver.h b/mock_drivers/rosbag_mock_drivers/include/rosbag_mock_drivers/MockRadarDriver.h index 5f6c830cc4..80affcbcda 100644 --- a/mock_drivers/rosbag_mock_drivers/include/rosbag_mock_drivers/MockRadarDriver.h +++ b/mock_drivers/rosbag_mock_drivers/include/rosbag_mock_drivers/MockRadarDriver.h @@ -40,4 +40,4 @@ class MockRadarDriver : public MockDriver unsigned int getRate() override; }; -} // namespace mock_drivers \ No newline at end of file +} // namespace mock_drivers diff --git a/mock_drivers/rosbag_mock_drivers/package.xml b/mock_drivers/rosbag_mock_drivers/package.xml index ef93e2c96c..11914f30dc 100644 --- a/mock_drivers/rosbag_mock_drivers/package.xml +++ b/mock_drivers/rosbag_mock_drivers/package.xml @@ -15,22 +15,21 @@ rosbag_mock_drivers 1.0.0 The rosbag_mock_drivers package - - Peter Guglielmino carma - Apache 2.0 - + Peter Guglielmino catkin roscpp std_msgs carma_utils + autoware_msgs cav_msgs cav_srvs + radar_msgs + derived_object_msgs - diff --git a/motion_computation/CMakeLists.txt b/motion_computation/CMakeLists.txt index cac8547d16..83c37cb6dc 100644 --- a/motion_computation/CMakeLists.txt +++ b/motion_computation/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 2.8.3) project(motion_computation) -## Compile as C++14 +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) ## Find catkin macros and libraries diff --git a/mpc_follower_wrapper/CMakeLists.txt b/mpc_follower_wrapper/CMakeLists.txt index 8b828bf0c5..a440e885b4 100644 --- a/mpc_follower_wrapper/CMakeLists.txt +++ b/mpc_follower_wrapper/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 2.8.3) project(mpc_follower_wrapper) -## Compile as C++14, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/object_detection_tracking/CMakeLists.txt b/object_detection_tracking/CMakeLists.txt index bed6c5a9e5..2659339792 100644 --- a/object_detection_tracking/CMakeLists.txt +++ b/object_detection_tracking/CMakeLists.txt @@ -16,8 +16,8 @@ cmake_minimum_required(VERSION 2.8.3) project(object_detection_tracking) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) diff --git a/plan_delegator/CMakeLists.txt b/plan_delegator/CMakeLists.txt index 6b87988f1d..5e15a0faab 100644 --- a/plan_delegator/CMakeLists.txt +++ b/plan_delegator/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 2.8.3) project(plan_delegator) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/platooning_control/CMakeLists.txt b/platooning_control/CMakeLists.txt index c7a1a62d49..bdb982b58c 100644 --- a/platooning_control/CMakeLists.txt +++ b/platooning_control/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 2.8.3) project(platoon_control) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -26,6 +26,7 @@ find_package(catkin REQUIRED COMPONENTS cav_msgs roscpp std_msgs + autoware_msgs ) ## System dependencies are found with CMake's conventions @@ -38,7 +39,7 @@ find_package(Boost REQUIRED COMPONENTS system) catkin_package( INCLUDE_DIRS include - CATKIN_DEPENDS carma_utils cav_msgs roscpp std_msgs + CATKIN_DEPENDS carma_utils cav_msgs roscpp std_msgs autoware_msgs ) ########### diff --git a/platooning_control/package.xml b/platooning_control/package.xml index 1d002f75a3..9377831807 100644 --- a/platooning_control/package.xml +++ b/platooning_control/package.xml @@ -1,5 +1,5 @@ - + platoon_control 3.3.0 The node is to control a platooning maneuver @@ -10,5 +10,6 @@ cav_msgs roscpp std_msgs + autoware_msgs diff --git a/platooning_strategic/CMakeLists.txt b/platooning_strategic/CMakeLists.txt index a521e30973..a69088ef10 100644 --- a/platooning_strategic/CMakeLists.txt +++ b/platooning_strategic/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 2.8.3) project(platoon_strategic) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -36,7 +36,7 @@ find_package(catkin REQUIRED COMPONENTS ) ## System dependencies are found with CMake's conventions -find_package(Boost REQUIRED COMPONENTS system) +find_package(Boost REQUIRED) ################################### ## catkin specific configuration ## diff --git a/platooning_strategic/include/platoon_manager.h b/platooning_strategic/include/platoon_manager.h index f40e152f47..954be46b4e 100644 --- a/platooning_strategic/include/platoon_manager.h +++ b/platooning_strategic/include/platoon_manager.h @@ -28,6 +28,7 @@ #include #include #include +#include diff --git a/platooning_strategic/include/platoon_strategic.h b/platooning_strategic/include/platoon_strategic.h index 6e61243c42..4a273af52e 100644 --- a/platooning_strategic/include/platoon_strategic.h +++ b/platooning_strategic/include/platoon_strategic.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/platooning_tactical_plugin/CMakeLists.txt b/platooning_tactical_plugin/CMakeLists.txt index 15e065b77a..0e45495bb8 100644 --- a/platooning_tactical_plugin/CMakeLists.txt +++ b/platooning_tactical_plugin/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.0.2) project(platooning_tactical_plugin) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -105,4 +105,4 @@ catkin_add_gmock(${PROJECT_NAME}-test test/test_platooning_tactical_plugin_planning.cpp test/test_platooning_tactical_plugin.cpp ) -target_link_libraries(${PROJECT_NAME}-test platooning_tactical_plugin_library ${catkin_LIBRARIES}) \ No newline at end of file +target_link_libraries(${PROJECT_NAME}-test platooning_tactical_plugin_library ${catkin_LIBRARIES}) diff --git a/platooning_tactical_plugin/test/test_platooning_tactical_plugin_planning.cpp b/platooning_tactical_plugin/test/test_platooning_tactical_plugin_planning.cpp index 6a9fcf5677..bf2272b19b 100644 --- a/platooning_tactical_plugin/test/test_platooning_tactical_plugin_planning.cpp +++ b/platooning_tactical_plugin/test/test_platooning_tactical_plugin_planning.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/port_drayage_plugin/CMakeLists.txt b/port_drayage_plugin/CMakeLists.txt index d2fb38e7e2..092704195c 100644 --- a/port_drayage_plugin/CMakeLists.txt +++ b/port_drayage_plugin/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 2.8.3) project(port_drayage_plugin) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/port_drayage_plugin/package.xml b/port_drayage_plugin/package.xml index 5b7ca0f0f0..ddbe8486df 100644 --- a/port_drayage_plugin/package.xml +++ b/port_drayage_plugin/package.xml @@ -1,5 +1,5 @@ - + port_drayage_plugin 1.0.0 CARMA plugin to support port drayage applications for CARMA Freight diff --git a/port_drayage_plugin/src/port_drayage_worker.cpp b/port_drayage_plugin/src/port_drayage_worker.cpp index 2190613811..6dbd26a953 100644 --- a/port_drayage_plugin/src/port_drayage_worker.cpp +++ b/port_drayage_plugin/src/port_drayage_worker.cpp @@ -45,7 +45,7 @@ namespace port_drayage_plugin bool PortDrayageWorker::check_for_stop(const cav_msgs::ManeuverPlanConstPtr& plan, const geometry_msgs::TwistStampedConstPtr& speed) const { if (plan == nullptr || speed == nullptr) { - ROS_WARN("Checking for stop when PortDrayagePlugin not properly initialized. Speed or plan is null"); + ROS_DEBUG("Checking for stop when PortDrayagePlugin not properly initialized. Speed or plan is null"); return false; } diff --git a/pure_pursuit_wrapper/CMakeLists.txt b/pure_pursuit_wrapper/CMakeLists.txt index 219a039b7f..9023a54efa 100644 --- a/pure_pursuit_wrapper/CMakeLists.txt +++ b/pure_pursuit_wrapper/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 2.8.3) project(pure_pursuit_wrapper) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/roadway_objects/CMakeLists.txt b/roadway_objects/CMakeLists.txt index 9a97f99340..2280743f02 100644 --- a/roadway_objects/CMakeLists.txt +++ b/roadway_objects/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 2.8.3) project(roadway_objects) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) ## Find catkin macros and libraries diff --git a/route/CMakeLists.txt b/route/CMakeLists.txt index 1ee9964611..93dace06e1 100755 --- a/route/CMakeLists.txt +++ b/route/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(route) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/route/test/test_route_generator.cpp b/route/test/test_route_generator.cpp index 9fdc784c59..02e08fd077 100755 --- a/route/test/test_route_generator.cpp +++ b/route/test/test_route_generator.cpp @@ -27,8 +27,6 @@ #include #include #include "route_state_worker.h" -#include -#include #include #include diff --git a/route_following_plugin/CMakeLists.txt b/route_following_plugin/CMakeLists.txt index ee4ef17a41..3c794ce1e3 100644 --- a/route_following_plugin/CMakeLists.txt +++ b/route_following_plugin/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(route_following_plugin) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/stop_and_wait_plugin/CMakeLists.txt b/stop_and_wait_plugin/CMakeLists.txt index 00b44cf5b8..aec6178810 100644 --- a/stop_and_wait_plugin/CMakeLists.txt +++ b/stop_and_wait_plugin/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.0.2) project(stop_and_wait_plugin) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -106,4 +106,4 @@ install(DIRECTORY launch config catkin_add_gmock(${PROJECT_NAME}-test test/test_stopandwait_plugin.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test) -target_link_libraries(${PROJECT_NAME}-test stopandwait_plugin_lib ${catkin_LIBRARIES}) \ No newline at end of file +target_link_libraries(${PROJECT_NAME}-test stopandwait_plugin_lib ${catkin_LIBRARIES}) diff --git a/traffic_incident_parser/CMakeLists.txt b/traffic_incident_parser/CMakeLists.txt index 25adad4ef4..ceefd5a68f 100644 --- a/traffic_incident_parser/CMakeLists.txt +++ b/traffic_incident_parser/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0.2) project(traffic_incident_parser) -## Compile as C++14, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) ## Find catkin macros and libraries @@ -14,8 +14,11 @@ find_package(catkin REQUIRED COMPONENTS lanelet2_extension carma_wm lanelet2_core + autoware_lanelet2_ros_interface ) +## System dependencies are found with CMake's conventions +find_package(Boost REQUIRED) ################################### ## catkin specific configuration ## @@ -29,7 +32,7 @@ find_package(catkin REQUIRED COMPONENTS catkin_package( INCLUDE_DIRS include # LIBRARIES traffic_incident_parser - CATKIN_DEPENDS carma_utils cav_msgs roscpp lanelet2_extension carma_wm lanelet2_core + CATKIN_DEPENDS carma_utils cav_msgs roscpp lanelet2_extension carma_wm lanelet2_core autoware_lanelet2_ros_interface # DEPENDS system_lib ) @@ -42,6 +45,7 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ) add_executable(traffic_incident_parser_node src/main.cpp src/traffic_incident_parser_node.cpp) @@ -50,7 +54,7 @@ add_library(traffic_incident_parser_worker_lib src/traffic_incident_parser_worke add_dependencies(traffic_incident_parser_worker_lib ${catkin_EXPORTED_TARGETS}) ## Specify libraries to link a library or executable target against -target_link_libraries(traffic_incident_parser_node traffic_incident_parser_worker_lib ${catkin_LIBRARIES}) +target_link_libraries(traffic_incident_parser_node traffic_incident_parser_worker_lib ${catkin_LIBRARIES} ${Boost_LIBRARIES}) ############# ## Install ## @@ -84,4 +88,4 @@ catkin_add_gmock(${PROJECT_NAME}-test test/test_traffic_parser.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test # Add test directory as working directory for unit tests ) -target_link_libraries(${PROJECT_NAME}-test traffic_incident_parser_worker_lib ${catkin_LIBRARIES}) +target_link_libraries(${PROJECT_NAME}-test traffic_incident_parser_worker_lib ${catkin_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/traffic_incident_parser/package.xml b/traffic_incident_parser/package.xml index 494829cc84..c56ee5f6b5 100644 --- a/traffic_incident_parser/package.xml +++ b/traffic_incident_parser/package.xml @@ -27,5 +27,6 @@ lanelet2_extension carma_wm lanelet2_core + autoware_lanelet2_ros_interface diff --git a/traffic_incident_parser/test/test_traffic_parser.cpp b/traffic_incident_parser/test/test_traffic_parser.cpp index 9c3cb16f43..29cccb89d8 100644 --- a/traffic_incident_parser/test/test_traffic_parser.cpp +++ b/traffic_incident_parser/test/test_traffic_parser.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/trajectory_executor/CMakeLists.txt b/trajectory_executor/CMakeLists.txt index 694257d88b..dde94ebb72 100644 --- a/trajectory_executor/CMakeLists.txt +++ b/trajectory_executor/CMakeLists.txt @@ -15,8 +15,8 @@ cmake_minimum_required(VERSION 2.8.3) project(trajectory_executor) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/trajectory_visualizer/CMakeLists.txt b/trajectory_visualizer/CMakeLists.txt index 92abefe955..a27c8f0008 100644 --- a/trajectory_visualizer/CMakeLists.txt +++ b/trajectory_visualizer/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(trajectory_visualizer) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/truck_inspection_client/CMakeLists.txt b/truck_inspection_client/CMakeLists.txt index 377c14197e..00b7c53ea9 100644 --- a/truck_inspection_client/CMakeLists.txt +++ b/truck_inspection_client/CMakeLists.txt @@ -17,8 +17,8 @@ cmake_minimum_required(VERSION 2.8.3) project(truck_inspection_client) -## Compile as C++11, supported in ROS Kinetic and newer -add_compile_options(-std=c++11) +## Compile as C++14, supported in ROS Noetic and newer +add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") @@ -31,7 +31,7 @@ find_package(catkin REQUIRED COMPONENTS ) ## System dependencies are found with CMake's conventions -find_package(Boost REQUIRED COMPONENTS system) +find_package(Boost REQUIRED) ################################### ## catkin specific configuration ## diff --git a/truck_inspection_client/include/truck_inspection_client.h b/truck_inspection_client/include/truck_inspection_client.h index d754873f94..54871b4517 100644 --- a/truck_inspection_client/include/truck_inspection_client.h +++ b/truck_inspection_client/include/truck_inspection_client.h @@ -23,7 +23,7 @@ #include #include #include -#include "boost/format.hpp" +#include #include #include diff --git a/unobstructed_lanechange/CMakeLists.txt b/unobstructed_lanechange/CMakeLists.txt index 7a62ea47ce..4c21c55e12 100644 --- a/unobstructed_lanechange/CMakeLists.txt +++ b/unobstructed_lanechange/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 2.8.3) project(unobstructed_lanechange) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/wz_strategic_plugin/src/wz_strategic_plugin.cpp b/wz_strategic_plugin/src/wz_strategic_plugin.cpp index 2c86b85b0c..bb6e97a6df 100644 --- a/wz_strategic_plugin/src/wz_strategic_plugin.cpp +++ b/wz_strategic_plugin/src/wz_strategic_plugin.cpp @@ -261,14 +261,14 @@ void WzStrategicPlugin::planWhenAPPROACHING(const cav_srvs::PlanManeuversRequest ROS_DEBUG_STREAM("early_arrival_time_at_freeflow: " << std::to_string(early_arrival_time_at_freeflow.toSec())); ROS_DEBUG_STREAM("late_arrival_time_at_freeflow: " << std::to_string(late_arrival_time_at_freeflow.toSec())); - auto early_arrival_state_at_freeflow_optional = nearest_traffic_light->predictState(early_arrival_time_at_freeflow); + auto early_arrival_state_at_freeflow_optional = nearest_traffic_light->predictState(lanelet::time::timeFromSec(early_arrival_time_at_freeflow.toSec())); if (!validLightState(early_arrival_state_at_freeflow_optional, early_arrival_time_at_freeflow)) return; ROS_DEBUG_STREAM("early_arrival_state_at_freeflow: " << early_arrival_state_at_freeflow_optional.get()); - auto late_arrival_state_at_freeflow_optional = nearest_traffic_light->predictState(late_arrival_time_at_freeflow); + auto late_arrival_state_at_freeflow_optional = nearest_traffic_light->predictState(lanelet::time::timeFromSec(late_arrival_time_at_freeflow.toSec())); if (!validLightState(late_arrival_state_at_freeflow_optional, late_arrival_time_at_freeflow)) return; @@ -332,7 +332,7 @@ void WzStrategicPlugin::planWhenWAITING(const cav_srvs::PlanManeuversRequest& re ROS_DEBUG("traffic_light_down_track %f", traffic_light_down_track); - auto current_light_state_optional = nearest_traffic_light->predictState(req.header.stamp); + auto current_light_state_optional = nearest_traffic_light->predictState(lanelet::time::timeFromSec(req.header.stamp.toSec())); if (!validLightState(current_light_state_optional, req.header.stamp)) return; @@ -418,11 +418,11 @@ bool WzStrategicPlugin::planManeuverCb(cav_srvs::PlanManeuversRequest& req, cav_ if (!traffic_list.empty()) { auto nearest_traffic_light = traffic_list.front(); ROS_ERROR_STREAM("\n\nCurrent Light State: " << nearest_traffic_light->getState().get() - << std::endl << " 1: " << nearest_traffic_light->predictState(ros::Time::now() + ros::Duration(1.0)).get() - << std::endl << " 2: " << nearest_traffic_light->predictState(ros::Time::now() + ros::Duration(2.0)).get() - << std::endl << " 3: " << nearest_traffic_light->predictState(ros::Time::now() + ros::Duration(3.0)).get() - << std::endl << " 4: " << nearest_traffic_light->predictState(ros::Time::now() + ros::Duration(4.0)).get() - << std::endl << " 5: " << nearest_traffic_light->predictState(ros::Time::now() + ros::Duration(5.0)).get() + << std::endl << " 1: " << nearest_traffic_light->predictState(lanelet::time::timeFromSec((ros::Time::now() + ros::Duration(1.0)).toSec())).get() + << std::endl << " 2: " << nearest_traffic_light->predictState(lanelet::time::timeFromSec((ros::Time::now() + ros::Duration(2.0)).toSec())).get() + << std::endl << " 3: " << nearest_traffic_light->predictState(lanelet::time::timeFromSec((ros::Time::now() + ros::Duration(3.0)).toSec())).get() + << std::endl << " 4: " << nearest_traffic_light->predictState(lanelet::time::timeFromSec((ros::Time::now() + ros::Duration(4.0)).toSec())).get() + << std::endl << " 5: " << nearest_traffic_light->predictState(lanelet::time::timeFromSec((ros::Time::now() + ros::Duration(5.0)).toSec())).get() << std::endl); } */ diff --git a/yield_plugin/CMakeLists.txt b/yield_plugin/CMakeLists.txt index 27b1c22b27..d9964d99ac 100644 --- a/yield_plugin/CMakeLists.txt +++ b/yield_plugin/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 2.8.3) project(yield_plugin) -## Compile as C++11, supported in ROS Kinetic and newer +## Compile as C++14, supported in ROS Noetic and newer add_compile_options(-std=c++14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") diff --git a/yield_plugin/test/test_yield.cpp b/yield_plugin/test/test_yield.cpp index 2ff06aa70e..60f09fb0f2 100644 --- a/yield_plugin/test/test_yield.cpp +++ b/yield_plugin/test/test_yield.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include