Skip to content

Commit

Permalink
Remove setup.py and minor lifecycle callback changes
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Strøm <[email protected]>
  • Loading branch information
chrstrom committed Aug 8, 2024
1 parent 3ac0bc4 commit a7b6cdd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 30 deletions.
10 changes: 9 additions & 1 deletion mission/system_monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)

Expand All @@ -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()
2 changes: 2 additions & 0 deletions mission/system_monitor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<license>TODO: License declaration</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<exec_depend>launch_ros</exec_depend>
<exec_depend>launch</exec_depend>
Expand All @@ -16,6 +17,7 @@

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>


<export>
<build_type>ament_cmake</build_type>
Expand Down
26 changes: 0 additions & 26 deletions mission/system_monitor/setup.py

This file was deleted.

6 changes: 3 additions & 3 deletions motion/thruster_allocator/src/allocator_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ 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;
}

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;
Expand Down

0 comments on commit a7b6cdd

Please sign in to comment.