diff --git a/CMakeLists.txt b/CMakeLists.txt index dc37f55d..4ab29818 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,13 +116,15 @@ endif() # Python ## ########### -# Install Python modules +# Install Python modules in px4_ros_com/ (the Python package folder) ament_python_install_package(${PROJECT_NAME}) -# Install Python executables +# Install Python executable with a non-conflicting name +# (requires the script to have a shebang and executable bit) install(PROGRAMS src/examples/offboard_py/offboard_control.py DESTINATION lib/${PROJECT_NAME} + RENAME offboard_control_py ) ament_package() diff --git a/src/examples/offboard_py/offboard_control.py b/src/examples/offboard_py/offboard_control.py index 7d59f536..15e83711 100755 --- a/src/examples/offboard_py/offboard_control.py +++ b/src/examples/offboard_py/offboard_control.py @@ -32,7 +32,7 @@ def __init__(self) -> None: self.vehicle_local_position_subscriber = self.create_subscription( VehicleLocalPosition, '/fmu/out/vehicle_local_position', self.vehicle_local_position_callback, qos_profile) self.vehicle_status_subscriber = self.create_subscription( - VehicleStatus, '/fmu/out/vehicle_status', self.vehicle_status_callback, qos_profile) + VehicleStatus, '/fmu/out/vehicle_status_v1', self.vehicle_status_callback, qos_profile) # Initialize variables self.offboard_setpoint_counter = 0