From f47454a0b644d69b7fcef0e0f71fbf02c8ce3a07 Mon Sep 17 00:00:00 2001 From: joel-mb Date: Thu, 21 Jul 2022 16:00:34 +0200 Subject: [PATCH] Fixed scenario runner node shutdown (#629) * Fix scenario runner node for foxy * CHANGELOG updated --- CHANGELOG.md | 2 ++ carla_ad_demo/CMakeLists.txt | 2 +- .../carla_ros_scenario_runner_node.py | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a76d9037..ee767257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Latest changed +* Fixed scenario runner node shutdown for foxy +* Fixed actor synchronization creation * Fix of scenario runner status ## CARLA-ROS-Bridge 0.9.11 diff --git a/carla_ad_demo/CMakeLists.txt b/carla_ad_demo/CMakeLists.txt index 7d377dab..b57753a1 100644 --- a/carla_ad_demo/CMakeLists.txt +++ b/carla_ad_demo/CMakeLists.txt @@ -26,7 +26,7 @@ elseif(${ROS_VERSION} EQUAL 2) find_package(ament_cmake REQUIRED) - install(DIRECTORY config/ DESTINATION share/${PROJECT_NAME}) + install(DIRECTORY config/ DESTINATION share/${PROJECT_NAME}/config) install(DIRECTORY launch/ DESTINATION share/${PROJECT_NAME}) diff --git a/carla_ros_scenario_runner/src/carla_ros_scenario_runner/carla_ros_scenario_runner_node.py b/carla_ros_scenario_runner/src/carla_ros_scenario_runner/carla_ros_scenario_runner_node.py index 448494d7..ef8796e6 100755 --- a/carla_ros_scenario_runner/src/carla_ros_scenario_runner/carla_ros_scenario_runner_node.py +++ b/carla_ros_scenario_runner/src/carla_ros_scenario_runner/carla_ros_scenario_runner_node.py @@ -176,16 +176,16 @@ def main(args=None): try: scenario_runner.run() except KeyboardInterrupt: - loginfo("User requested shut down.") + scenario_runner.loginfo("User requested shut down.") finally: if scenario_runner._scenario_runner.is_running(): scenario_runner.loginfo("Scenario Runner still running. Shutting down.") scenario_runner._scenario_runner.shutdown() del scenario_runner - if ROS_VERSION == 2: - spin_thread.join() roscomp.shutdown() + if ROS_VERSION == 2: + spin_thread.join() if __name__ == "__main__":