From 57187c7b5384a7fde42026247c140f8bfb803da2 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 13:57:17 +0800 Subject: [PATCH 01/10] Update CI to Humble Signed-off-by: Luca Della Vedova --- .github/workflows/build.yaml | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 08f8f53..af2e78e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,18 +1,31 @@ name: build -on: [push, pull_request] +on: + push: + branches: [ main ] + pull_request: + schedule: + - cron: '0 0 * * *' + jobs: build_and_test: name: Build and test - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + container: + image: rostooling/setup-ros-docker:ubuntu-jammy-latest steps: - name: deps - uses: ros-tooling/setup-ros@v0.2 + uses: ros-tooling/setup-ros@v0.3 with: - required-ros-distributions: foxy + required-ros-distributions: humble + - name: install_clang + run: sudo apt update && sudo apt install -y clang clang-tools lld - name: build uses: ros-tooling/action-ros-ci@v0.2 + env: + CC: clang + CXX: clang++ with: - target-ros2-distro: foxy + target-ros2-distro: humble # build all packages listed in the meta package package-name: | rmf_visualization @@ -21,18 +34,23 @@ jobs: rmf_visualization_rviz2_plugins rmf_visualization_schedule vcs-repo-file-url: | - https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos + https://raw.githubusercontent.com/open-rmf/rmf/humble-image/rmf.repos colcon-defaults: | { "build": { - "mixin": ["coverage-gcc"] + "mixin": ["coverage-gcc", "lld"] } } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + - name: Upload failed test results + uses: actions/upload-artifact@v2 + if: failure() + with: + name: test-results + path: ros_ws/build/*/test_results/*/*.catch2.xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: files: ros_ws/lcov/total_coverage.info flags: tests name: lean_and_mean_codecov_bot - From 0488d17eb9668e1d790e7ad34219a0cea360e61b Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 14:26:05 +0800 Subject: [PATCH 02/10] Add style action Signed-off-by: Luca Della Vedova --- .github/workflows/style.yaml | 24 ++++++++++++++++++++++++ README.md | 1 + 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/style.yaml diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml new file mode 100644 index 0000000..97ff234 --- /dev/null +++ b/.github/workflows/style.yaml @@ -0,0 +1,24 @@ +name: style +on: + pull_request: + push: + branches: [ main ] +defaults: + run: + shell: bash +jobs: + linter: + runs-on: ubuntu-latest + strategy: + matrix: + docker_image: ['ros:humble-ros-base'] + container: + image: ${{ matrix.docker_image }} + steps: + - name: checkout + uses: actions/checkout@v2 + - name: uncrustify + run: | + sudo apt update && sudo apt install wget + wget https://raw.githubusercontent.com/open-rmf/rmf_utils/main/rmf_utils/test/format/rmf_code_style.cfg + /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ diff --git a/README.md b/README.md index 83add65..6f2fc31 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # rmf_schedule_visualizer ![](https://github.com/open-rmf/rmf_visualization/workflows/build/badge.svg) +![](https://github.com/open-rmf/rmf_visualization/workflows/style/badge.svg) [![codecov](https://codecov.io/gh/open-rmf/rmf_visualization/branch/main/graph/badge.svg)](https://codecov.io/gh/open-rmf/rmf_visualization) This repository contains several packages that aid with visualizing various entities within RMF via RViz. From 65dcc67036713aa1f46fc7069a87c9f8dd91e0c0 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 15:22:39 +0800 Subject: [PATCH 03/10] Exclude vendored libraries from uncrustify Signed-off-by: Luca Della Vedova --- .github/workflows/style.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 97ff234..849dcba 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -21,4 +21,4 @@ jobs: run: | sudo apt update && sudo apt install wget wget https://raw.githubusercontent.com/open-rmf/rmf_utils/main/rmf_utils/test/format/rmf_code_style.cfg - /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ + /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ --exclude json.hpp jwt From 9bf8efe1db8e37c0a4bb9c443f1ec464d77cf1cf Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 15:22:55 +0800 Subject: [PATCH 04/10] Uncrustify Signed-off-by: Luca Della Vedova --- .../src/FleetStatesVisualizer.cpp | 132 +++++++++--------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/rmf_visualization_fleet_states/src/FleetStatesVisualizer.cpp b/rmf_visualization_fleet_states/src/FleetStatesVisualizer.cpp index e39ca74..76f2f76 100644 --- a/rmf_visualization_fleet_states/src/FleetStatesVisualizer.cpp +++ b/rmf_visualization_fleet_states/src/FleetStatesVisualizer.cpp @@ -67,76 +67,76 @@ FleetStatesVisualizer::FleetStatesVisualizer(const rclcpp::NodeOptions& options) using Location = rmf_fleet_msgs::msg::Location; auto set_body_pose = - [](const Location& loc, Marker& marker) - { - marker.pose.position.x = loc.x; - marker.pose.position.y = loc.y; - marker.pose.position.z = 0.0; - marker.pose.orientation.w = 1.0; - }; + [](const Location& loc, Marker& marker) + { + marker.pose.position.x = loc.x; + marker.pose.position.y = loc.y; + marker.pose.position.z = 0.0; + marker.pose.orientation.w = 1.0; + }; auto set_nose_pose = - [](const Location& loc, const double radius, Marker& marker) - { - marker.pose.position.x = loc.x + radius * std::cos(loc.yaw); - marker.pose.position.y = loc.y + radius * std::sin(loc.yaw); - marker.pose.position.z = 0.0; - marker.pose.orientation.w = 1.0; - }; + [](const Location& loc, const double radius, Marker& marker) + { + marker.pose.position.x = loc.x + radius * std::cos(loc.yaw); + marker.pose.position.y = loc.y + radius * std::sin(loc.yaw); + marker.pose.position.z = 0.0; + marker.pose.orientation.w = 1.0; + }; auto set_text_pose = - [](const Location& loc, const double radius, Marker& marker) - { - marker.pose.position.x = - loc.x + 2.0 * radius * std::cos(loc.yaw - 0.7853); - marker.pose.position.y = - loc.y + 2.0 * radius * std::sin(loc.yaw - 0.7853); - marker.pose.position.z = 0.0; - marker.pose.orientation.w = 1.0; - }; + [](const Location& loc, const double radius, Marker& marker) + { + marker.pose.position.x = + loc.x + 2.0 * radius * std::cos(loc.yaw - 0.7853); + marker.pose.position.y = + loc.y + 2.0 * radius * std::sin(loc.yaw - 0.7853); + marker.pose.position.z = 0.0; + marker.pose.orientation.w = 1.0; + }; auto fill_markers = - [&]( - const RobotState& state, - const double radius, - const std::size_t id, - MarkerArray& marker_array) - { - const auto& loc = state.location; - - Marker body_marker; - body_marker.header.frame_id = "map"; - body_marker.header.stamp = state.location.t; - body_marker.ns = "body"; - body_marker.id = id; - body_marker.type = body_marker.SPHERE; - body_marker.action = body_marker.MODIFY; - set_body_pose(loc, body_marker); - body_marker.scale.x = 2.0 * radius; - body_marker.scale.y = 2.0 * radius; - body_marker.scale.z = 2.0 * radius; - // TODO(YV): Get the color to match that of the navigation graph - body_marker.color.r = 1.0; - body_marker.color.b = 1.0; - body_marker.color.a = 1.0; - body_marker.lifetime = rclcpp::Duration(std::chrono::seconds(1)); - - auto nose_marker = body_marker; - nose_marker.ns = "nose"; - set_nose_pose(loc, radius, nose_marker); - nose_marker.scale.x = this->_nose_scale * radius; - nose_marker.scale.y = this->_nose_scale * radius; - nose_marker.scale.z = this->_nose_scale * radius; - - auto text_marker = body_marker; - text_marker.ns = "name"; - text_marker.type = text_marker.TEXT_VIEW_FACING; - set_text_pose(loc, radius, text_marker); - text_marker.text = state.name; - text_marker.scale.z = 0.3; - - marker_array.markers.push_back(std::move(body_marker)); - marker_array.markers.push_back(std::move(nose_marker)); - marker_array.markers.push_back(std::move(text_marker)); - }; + [&]( + const RobotState& state, + const double radius, + const std::size_t id, + MarkerArray& marker_array) + { + const auto& loc = state.location; + + Marker body_marker; + body_marker.header.frame_id = "map"; + body_marker.header.stamp = state.location.t; + body_marker.ns = "body"; + body_marker.id = id; + body_marker.type = body_marker.SPHERE; + body_marker.action = body_marker.MODIFY; + set_body_pose(loc, body_marker); + body_marker.scale.x = 2.0 * radius; + body_marker.scale.y = 2.0 * radius; + body_marker.scale.z = 2.0 * radius; + // TODO(YV): Get the color to match that of the navigation graph + body_marker.color.r = 1.0; + body_marker.color.b = 1.0; + body_marker.color.a = 1.0; + body_marker.lifetime = rclcpp::Duration(std::chrono::seconds(1)); + + auto nose_marker = body_marker; + nose_marker.ns = "nose"; + set_nose_pose(loc, radius, nose_marker); + nose_marker.scale.x = this->_nose_scale * radius; + nose_marker.scale.y = this->_nose_scale * radius; + nose_marker.scale.z = this->_nose_scale * radius; + + auto text_marker = body_marker; + text_marker.ns = "name"; + text_marker.type = text_marker.TEXT_VIEW_FACING; + set_text_pose(loc, radius, text_marker); + text_marker.text = state.name; + text_marker.scale.z = 0.3; + + marker_array.markers.push_back(std::move(body_marker)); + marker_array.markers.push_back(std::move(nose_marker)); + marker_array.markers.push_back(std::move(text_marker)); + }; if (msg->name.empty() || msg->robots.empty()) return; From f9289b41cf4524c80ca21b04a46cd72ad76312a4 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 15:41:21 +0800 Subject: [PATCH 05/10] Ignore vendored package pt.2 Signed-off-by: Luca Della Vedova --- .github/workflows/style.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 849dcba..ce95db0 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -21,4 +21,4 @@ jobs: run: | sudo apt update && sudo apt install wget wget https://raw.githubusercontent.com/open-rmf/rmf_utils/main/rmf_utils/test/format/rmf_code_style.cfg - /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ --exclude json.hpp jwt + /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ --exclude rmf_visualization_schedule/include/json.hpp rmf_visualization_schedule/include/jwt/* rmf_visualization_schedule/jwt/*/* From 95bb05b4220e663c807bd1364a812a1f4ed22c67 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 15:41:33 +0800 Subject: [PATCH 06/10] Style Signed-off-by: Luca Della Vedova --- rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp b/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp index 822708c..271347b 100644 --- a/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp +++ b/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp @@ -203,7 +203,8 @@ auto NavGraphVisualizer::FleetNavGraph::update_lane_states( std::optional map_name_filter) -> std::vector { if (!traffic_graph.has_value()) - return {}; + return {} + ; // TODO(YV): Avoid this copy by storing Maker::ConstSharedPtr in the cache std::vector marker_updates = {}; From a03f95d82c767dd48eaec9921870cba02250bb3e Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 15:47:39 +0800 Subject: [PATCH 07/10] Recursive path for jwt Signed-off-by: Luca Della Vedova --- .github/workflows/style.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index ce95db0..21e873c 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -21,4 +21,4 @@ jobs: run: | sudo apt update && sudo apt install wget wget https://raw.githubusercontent.com/open-rmf/rmf_utils/main/rmf_utils/test/format/rmf_code_style.cfg - /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ --exclude rmf_visualization_schedule/include/json.hpp rmf_visualization_schedule/include/jwt/* rmf_visualization_schedule/jwt/*/* + /ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ --exclude rmf_visualization_schedule/include/json.hpp rmf_visualization_schedule/include/jwt/* rmf_visualization_schedule/include/jwt/*/* From fff0db63beff675d8c9abe04f1cc9b53b32845c8 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 1 Sep 2022 18:31:29 +0800 Subject: [PATCH 08/10] Cleanup uncrustify CMakeLists Signed-off-by: Luca Della Vedova --- rmf_visualization_obstacles/CMakeLists.txt | 2 +- rmf_visualization_rviz2_plugins/CMakeLists.txt | 2 +- rmf_visualization_schedule/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rmf_visualization_obstacles/CMakeLists.txt b/rmf_visualization_obstacles/CMakeLists.txt index 9116a1e..0aa211c 100644 --- a/rmf_visualization_obstacles/CMakeLists.txt +++ b/rmf_visualization_obstacles/CMakeLists.txt @@ -54,7 +54,7 @@ if(BUILD_TESTING) PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") ament_uncrustify( - include/rmf_visualization_schedule src test + ARGN src CONFIG_FILE ${uncrustify_config_file} MAX_LINE_LENGTH 80 ) diff --git a/rmf_visualization_rviz2_plugins/CMakeLists.txt b/rmf_visualization_rviz2_plugins/CMakeLists.txt index a826905..35a868c 100644 --- a/rmf_visualization_rviz2_plugins/CMakeLists.txt +++ b/rmf_visualization_rviz2_plugins/CMakeLists.txt @@ -40,7 +40,7 @@ if(BUILD_TESTING) PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") ament_uncrustify( - src test + ARGN src CONFIG_FILE ${uncrustify_config_file} MAX_LINE_LENGTH 80 ) diff --git a/rmf_visualization_schedule/CMakeLists.txt b/rmf_visualization_schedule/CMakeLists.txt index a3df1c1..aea8ddf 100644 --- a/rmf_visualization_schedule/CMakeLists.txt +++ b/rmf_visualization_schedule/CMakeLists.txt @@ -37,7 +37,7 @@ if(BUILD_TESTING) PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") ament_uncrustify( - include/rmf_visualization_schedule src test + ARGN include/rmf_visualization_schedule src test CONFIG_FILE ${uncrustify_config_file} MAX_LINE_LENGTH 80 ) From 8a1d69e1e54a35a83ecfe42475f4f1796c0f31f1 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Fri, 2 Sep 2022 10:13:25 +0800 Subject: [PATCH 09/10] Add rmf_utils testing dependency Signed-off-by: Luca Della Vedova --- rmf_visualization_fleet_states/CMakeLists.txt | 1 + rmf_visualization_fleet_states/package.xml | 1 + rmf_visualization_floorplans/CMakeLists.txt | 1 + rmf_visualization_floorplans/package.xml | 1 + rmf_visualization_navgraphs/CMakeLists.txt | 1 + rmf_visualization_navgraphs/package.xml | 1 + rmf_visualization_obstacles/CMakeLists.txt | 1 + rmf_visualization_obstacles/package.xml | 1 + rmf_visualization_rviz2_plugins/CMakeLists.txt | 1 + rmf_visualization_rviz2_plugins/package.xml | 1 + rmf_visualization_schedule/CMakeLists.txt | 1 + rmf_visualization_schedule/package.xml | 1 + 12 files changed, 12 insertions(+) diff --git a/rmf_visualization_fleet_states/CMakeLists.txt b/rmf_visualization_fleet_states/CMakeLists.txt index 75394d6..401e5cf 100644 --- a/rmf_visualization_fleet_states/CMakeLists.txt +++ b/rmf_visualization_fleet_states/CMakeLists.txt @@ -53,6 +53,7 @@ rclcpp_components_register_node(fleetstates_visualizer #=============================================================================== if(BUILD_TESTING) find_package(ament_cmake_uncrustify REQUIRED) + find_package(rmf_utils REQUIRED) find_file(uncrustify_config_file NAMES "rmf_code_style.cfg" PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") diff --git a/rmf_visualization_fleet_states/package.xml b/rmf_visualization_fleet_states/package.xml index e6e9e42..7291907 100644 --- a/rmf_visualization_fleet_states/package.xml +++ b/rmf_visualization_fleet_states/package.xml @@ -19,6 +19,7 @@ ament_lint_auto ament_lint_common + rmf_utils ament_cmake diff --git a/rmf_visualization_floorplans/CMakeLists.txt b/rmf_visualization_floorplans/CMakeLists.txt index 24ea4a4..46e57ab 100644 --- a/rmf_visualization_floorplans/CMakeLists.txt +++ b/rmf_visualization_floorplans/CMakeLists.txt @@ -61,6 +61,7 @@ rclcpp_components_register_node(floorplan_visualizer #=============================================================================== if(BUILD_TESTING) find_package(ament_cmake_uncrustify REQUIRED) + find_package(rmf_utils REQUIRED) find_file(uncrustify_config_file NAMES "rmf_code_style.cfg" PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") diff --git a/rmf_visualization_floorplans/package.xml b/rmf_visualization_floorplans/package.xml index 578ea66..bd10213 100644 --- a/rmf_visualization_floorplans/package.xml +++ b/rmf_visualization_floorplans/package.xml @@ -20,6 +20,7 @@ ament_lint_auto ament_lint_common + rmf_utils ament_cmake diff --git a/rmf_visualization_navgraphs/CMakeLists.txt b/rmf_visualization_navgraphs/CMakeLists.txt index 9039d72..8148d67 100644 --- a/rmf_visualization_navgraphs/CMakeLists.txt +++ b/rmf_visualization_navgraphs/CMakeLists.txt @@ -64,6 +64,7 @@ rclcpp_components_register_node(navgraph_visualizer #=============================================================================== if(BUILD_TESTING) find_package(ament_cmake_uncrustify REQUIRED) + find_package(rmf_utils REQUIRED) find_file(uncrustify_config_file NAMES "rmf_code_style.cfg" PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") diff --git a/rmf_visualization_navgraphs/package.xml b/rmf_visualization_navgraphs/package.xml index f0295ba..633b9c7 100644 --- a/rmf_visualization_navgraphs/package.xml +++ b/rmf_visualization_navgraphs/package.xml @@ -21,6 +21,7 @@ ament_lint_auto ament_lint_common + rmf_utils ament_cmake diff --git a/rmf_visualization_obstacles/CMakeLists.txt b/rmf_visualization_obstacles/CMakeLists.txt index 0aa211c..b6d7815 100644 --- a/rmf_visualization_obstacles/CMakeLists.txt +++ b/rmf_visualization_obstacles/CMakeLists.txt @@ -49,6 +49,7 @@ rclcpp_components_register_node(obstacle_visualizer #=============================================================================== if(BUILD_TESTING) find_package(ament_cmake_uncrustify REQUIRED) + find_package(rmf_utils REQUIRED) find_file(uncrustify_config_file NAMES "rmf_code_style.cfg" PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") diff --git a/rmf_visualization_obstacles/package.xml b/rmf_visualization_obstacles/package.xml index 3af7608..7754001 100644 --- a/rmf_visualization_obstacles/package.xml +++ b/rmf_visualization_obstacles/package.xml @@ -18,6 +18,7 @@ rmf_visualization_msgs ament_cmake_uncrustify + rmf_utils ament_cmake diff --git a/rmf_visualization_rviz2_plugins/CMakeLists.txt b/rmf_visualization_rviz2_plugins/CMakeLists.txt index 35a868c..f0e2890 100644 --- a/rmf_visualization_rviz2_plugins/CMakeLists.txt +++ b/rmf_visualization_rviz2_plugins/CMakeLists.txt @@ -35,6 +35,7 @@ find_package(Qt5 REQUIRED COMPONENTS Widgets Test) if(BUILD_TESTING) find_package(ament_cmake_uncrustify REQUIRED) + find_package(rmf_utils REQUIRED) find_file(uncrustify_config_file NAMES "rmf_code_style.cfg" PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") diff --git a/rmf_visualization_rviz2_plugins/package.xml b/rmf_visualization_rviz2_plugins/package.xml index 8dd7805..1a512be 100644 --- a/rmf_visualization_rviz2_plugins/package.xml +++ b/rmf_visualization_rviz2_plugins/package.xml @@ -28,6 +28,7 @@ libqt5-widgets ament_cmake_uncrustify + rmf_utils ament_cmake diff --git a/rmf_visualization_schedule/CMakeLists.txt b/rmf_visualization_schedule/CMakeLists.txt index aea8ddf..c7cdd7a 100644 --- a/rmf_visualization_schedule/CMakeLists.txt +++ b/rmf_visualization_schedule/CMakeLists.txt @@ -32,6 +32,7 @@ find_package(Threads) if(BUILD_TESTING) find_package(ament_cmake_uncrustify REQUIRED) + find_package(rmf_utils REQUIRED) find_file(uncrustify_config_file NAMES "rmf_code_style.cfg" PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/") diff --git a/rmf_visualization_schedule/package.xml b/rmf_visualization_schedule/package.xml index dfe684d..31d42e7 100644 --- a/rmf_visualization_schedule/package.xml +++ b/rmf_visualization_schedule/package.xml @@ -28,6 +28,7 @@ ament_lint_auto ament_lint_common ament_cmake_uncrustify + rmf_utils rosidl_interface_packages From fcddd3713890f0a0c9c76d1c90377019d5041c40 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Fri, 2 Sep 2022 11:43:42 +0800 Subject: [PATCH 10/10] Wrap if statement in curly braces Signed-off-by: Luca Della Vedova --- rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp b/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp index 271347b..8ce7438 100644 --- a/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp +++ b/rmf_visualization_navgraphs/src/NavGraphVisualizer.cpp @@ -203,8 +203,9 @@ auto NavGraphVisualizer::FleetNavGraph::update_lane_states( std::optional map_name_filter) -> std::vector { if (!traffic_graph.has_value()) - return {} - ; + { + return {}; + } // TODO(YV): Avoid this copy by storing Maker::ConstSharedPtr in the cache std::vector marker_updates = {};