diff --git a/src/lib/avoidance/ObstacleAvoidanceTest.cpp b/src/lib/avoidance/ObstacleAvoidanceTest.cpp index d9c0b52e40..593bbabbd7 100644 --- a/src/lib/avoidance/ObstacleAvoidanceTest.cpp +++ b/src/lib/avoidance/ObstacleAvoidanceTest.cpp @@ -68,7 +68,7 @@ TEST_F(ObstacleAvoidanceTest, instantiation) { ObstacleAvoidance oa(nullptr); } TEST_F(ObstacleAvoidanceTest, oa_enabled_healthy) { - // GIVEN: the flight controller setpoints from FlightTaskAutoMapper and a vehicle_trajectory_waypoint message coming + // GIVEN: the flight controller setpoints from FlightTaskAuto and a vehicle_trajectory_waypoint message coming // from offboard TestObstacleAvoidance oa; @@ -104,7 +104,7 @@ TEST_F(ObstacleAvoidanceTest, oa_enabled_healthy) TEST_F(ObstacleAvoidanceTest, oa_enabled_healthy_bezier) { - // GIVEN: the flight controller setpoints from FlightTaskAutoMapper and a vehicle_trajectory_waypoint message coming + // GIVEN: the flight controller setpoints from FlightTaskAuto and a vehicle_trajectory_waypoint message coming // from offboard TestObstacleAvoidance oa; @@ -147,7 +147,7 @@ TEST_F(ObstacleAvoidanceTest, oa_enabled_healthy_bezier) TEST_F(ObstacleAvoidanceTest, oa_enabled_not_healthy) { - // GIVEN: the flight controller setpoints from FlightTaskAutoMapper and a vehicle_trajectory_waypoint message + // GIVEN: the flight controller setpoints from FlightTaskAuto and a vehicle_trajectory_waypoint message TestObstacleAvoidance oa; vehicle_trajectory_waypoint_s message = empty_trajectory_waypoint; @@ -177,7 +177,7 @@ TEST_F(ObstacleAvoidanceTest, oa_enabled_not_healthy) TEST_F(ObstacleAvoidanceTest, oa_desired) { - // GIVEN: the flight controller setpoints from FlightTaskAutoMapper and the waypoints from FLightTaskAuto + // GIVEN: the flight controller setpoints from FlightTaskAuto and the waypoints from FLightTaskAuto TestObstacleAvoidance oa; pos_sp = Vector3f(1.f, 1.2f, NAN); diff --git a/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/CMakeLists.txt b/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/CMakeLists.txt index 11aa634814..c5d222ad0f 100644 --- a/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/CMakeLists.txt +++ b/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/CMakeLists.txt @@ -35,5 +35,5 @@ px4_add_library(FlightTaskAutoLineSmoothVel FlightTaskAutoLineSmoothVel.cpp ) -target_link_libraries(FlightTaskAutoLineSmoothVel PUBLIC FlightTaskAutoMapper FlightTaskUtility) +target_link_libraries(FlightTaskAutoLineSmoothVel PUBLIC FlightTaskAuto FlightTaskUtility) target_include_directories(FlightTaskAutoLineSmoothVel PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp b/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp index 3622adb997..2b0ab8a9cd 100644 --- a/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp +++ b/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp @@ -79,7 +79,7 @@ bool FlightTaskAutoLineSmoothVel::activate(const vehicle_local_position_setpoint void FlightTaskAutoLineSmoothVel::reActivate() { - FlightTaskAutoMapper::reActivate(); + FlightTaskAuto::reActivate(); // On ground, reset acceleration and velocity to zero _position_smoothing.reset({0.f, 0.f, 0.f}, {0.f, 0.f, 0.7f}, _position); @@ -298,7 +298,7 @@ void FlightTaskAutoLineSmoothVel::_updateTrajConstraints() // The constraints are broken because they are used as hard limits by the position controller, so put this here // until the constraints don't do things like cause controller integrators to saturate. Once the controller - // doesn't use z speed constraints, this can go in AutoMapper::_prepareTakeoffSetpoints(). Accel limit is to + // doesn't use z speed constraints, this can go in _prepareTakeoffSetpoints(). Accel limit is to // emulate the motor ramp (also done in the controller) so that the controller can actually track the setpoint. if (_type == WaypointType::takeoff && _dist_to_ground < _param_mpc_land_alt1.get()) { z_vel_constraint = _param_mpc_tko_speed.get(); diff --git a/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.hpp b/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.hpp index c36c1688db..ef16aac990 100644 --- a/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.hpp +++ b/src/modules/flight_mode_manager/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.hpp @@ -40,13 +40,13 @@ #pragma once -#include "FlightTaskAutoMapper.hpp" +#include "FlightTaskAuto.hpp" #include #include "Sticks.hpp" #include "StickAccelerationXY.hpp" #include "StickYaw.hpp" -class FlightTaskAutoLineSmoothVel : public FlightTaskAutoMapper +class FlightTaskAutoLineSmoothVel : public FlightTaskAuto { public: FlightTaskAutoLineSmoothVel(); diff --git a/src/modules/flight_mode_manager/tasks/AutoMapper/CMakeLists.txt b/src/modules/flight_mode_manager/tasks/AutoMapper/CMakeLists.txt deleted file mode 100644 index 28d05f051d..0000000000 --- a/src/modules/flight_mode_manager/tasks/AutoMapper/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################ -# -# Copyright (c) 2018 PX4 Development Team. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name PX4 nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -px4_add_library(FlightTaskAutoMapper - FlightTaskAutoMapper.cpp -) - -target_link_libraries(FlightTaskAutoMapper PUBLIC FlightTaskAuto) -target_include_directories(FlightTaskAutoMapper PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/modules/flight_mode_manager/tasks/AutoMapper/FlightTaskAutoMapper.cpp b/src/modules/flight_mode_manager/tasks/AutoMapper/FlightTaskAutoMapper.cpp deleted file mode 100644 index d2386ad746..0000000000 --- a/src/modules/flight_mode_manager/tasks/AutoMapper/FlightTaskAutoMapper.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2018 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/** - * @file FlightAutoMapper.cpp - */ - -#include "FlightTaskAutoMapper.hpp" diff --git a/src/modules/flight_mode_manager/tasks/AutoMapper/FlightTaskAutoMapper.hpp b/src/modules/flight_mode_manager/tasks/AutoMapper/FlightTaskAutoMapper.hpp deleted file mode 100644 index 4f49f5f3eb..0000000000 --- a/src/modules/flight_mode_manager/tasks/AutoMapper/FlightTaskAutoMapper.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2018 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/** - * @file FlightTaskAutoMapper.hpp - * - * Abstract Flight task which generates local setpoints - * based on the triplet type. - */ - -#pragma once - -#include "FlightTaskAuto.hpp" - -class FlightTaskAutoMapper : public FlightTaskAuto -{ -public: - FlightTaskAutoMapper() = default; - virtual ~FlightTaskAutoMapper() = default; - -}; diff --git a/src/modules/flight_mode_manager/tasks/CMakeLists.txt b/src/modules/flight_mode_manager/tasks/CMakeLists.txt index ede187999d..e49d9c4857 100644 --- a/src/modules/flight_mode_manager/tasks/CMakeLists.txt +++ b/src/modules/flight_mode_manager/tasks/CMakeLists.txt @@ -35,7 +35,6 @@ add_subdirectory(FlightTask) add_subdirectory(Utility) add_subdirectory(Auto) -add_subdirectory(AutoMapper) # add all additional flight tasks foreach(task ${flight_tasks_all})