diff --git a/mission/system_monitor/CMakeLists.txt b/mission/system_monitor/CMakeLists.txt index 0290a85f..d5dd4386 100644 --- a/mission/system_monitor/CMakeLists.txt +++ b/mission/system_monitor/CMakeLists.txt @@ -12,7 +12,7 @@ ament_python_install_package(${PROJECT_NAME}) # Install Python executables install(PROGRAMS - scripts/system_monitor_node.py + system_monitor/system_monitor_node.py DESTINATION lib/${PROJECT_NAME} ) @@ -23,4 +23,12 @@ install(DIRECTORY DESTINATION share/${PROJECT_NAME} ) +# Install the package.xml file +install(FILES package.xml DESTINATION share/${PROJECT_NAME}) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + ament_package() \ No newline at end of file diff --git a/mission/system_monitor/package.xml b/mission/system_monitor/package.xml index 572e89a4..717985cd 100644 --- a/mission/system_monitor/package.xml +++ b/mission/system_monitor/package.xml @@ -8,6 +8,7 @@ TODO: License declaration ament_cmake + ament_cmake_python launch_ros launch @@ -16,6 +17,7 @@ ament_lint_auto ament_lint_common + ament_cmake diff --git a/mission/system_monitor/setup.py b/mission/system_monitor/setup.py deleted file mode 100644 index 7f8e7692..00000000 --- a/mission/system_monitor/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -from setuptools import setup - -package_name = 'system_monitor' - -setup( - name=package_name, - version='0.0.1', - packages=[package_name], - data_files=[ - ('share/ament_index/resource_index/packages', - ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='Your Name', - maintainer_email='your.email@example.com', - description='System Monitor for ROS2', - license='TODO: License declaration', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'system_monitor_node = system_monitor.system_monitor_node:main' - ], - }, -) \ No newline at end of file diff --git a/mission/system_monitor/scripts/system_monitor_node.py b/mission/system_monitor/system_monitor/system_monitor_node.py similarity index 100% rename from mission/system_monitor/scripts/system_monitor_node.py rename to mission/system_monitor/system_monitor/system_monitor_node.py diff --git a/motion/thruster_allocator/src/allocator_ros.cpp b/motion/thruster_allocator/src/allocator_ros.cpp index e6677548..f7d5c508 100644 --- a/motion/thruster_allocator/src/allocator_ros.cpp +++ b/motion/thruster_allocator/src/allocator_ros.cpp @@ -68,9 +68,6 @@ ThrusterAllocator::on_deactivate(const rclcpp_lifecycle::State &) { rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ThrusterAllocator::on_cleanup(const rclcpp_lifecycle::State &) { - thruster_forces_publisher_.reset(); - wrench_subscriber_.reset(); - calculate_thrust_timer_.reset(); RCLCPP_INFO(get_logger(), "Thruster allocator cleaned up"); return rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface:: CallbackReturn::SUCCESS; @@ -78,6 +75,9 @@ ThrusterAllocator::on_cleanup(const rclcpp_lifecycle::State &) { rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ThrusterAllocator::on_shutdown(const rclcpp_lifecycle::State &) { + thruster_forces_publisher_.reset(); + wrench_subscriber_.reset(); + calculate_thrust_timer_.reset(); RCLCPP_INFO(get_logger(), "Thruster allocator shutting down"); return rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface:: CallbackReturn::SUCCESS;