Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export BT util test files #3372

Merged
merged 7 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions nav2_behavior_tree/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
ament_add_gtest(test_bt_conversions test_bt_conversions.cpp)
ament_target_dependencies(test_bt_conversions ${dependencies})

include_directories(.)

add_subdirectory(plugins/condition)
add_subdirectory(plugins/decorator)
add_subdirectory(plugins/control)
add_subdirectory(plugins/action)

SteveMacenski marked this conversation as resolved.
Show resolved Hide resolved
install(DIRECTORY utils
DESTINATION include/)

ament_export_include_directories(utils)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/assisted_teleop_action.hpp"

class AssistedTeleopActionServer : public TestActionServer<nav2_msgs::action::AssistedTeleop>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/assisted_teleop_cancel_node.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/back_up_action.hpp"

class BackUpActionServer : public TestActionServer<nav2_msgs::action::BackUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/back_up_cancel_node.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_service.hpp"
#include "utils/test_service.hpp"
#include "nav2_behavior_tree/plugins/action/clear_costmap_service.hpp"

class ClearEntireCostmapService : public TestService<nav2_msgs::srv::ClearEntireCostmap>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/compute_path_through_poses_action.hpp"

class ComputePathThroughPosesActionServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/compute_path_to_pose_action.hpp"

class ComputePathToPoseActionServer : public TestActionServer<nav2_msgs::action::ComputePathToPose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/controller_cancel_node.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <set>
#include <string>

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "behaviortree_cpp_v3/bt_factory.h"
#include "nav2_behavior_tree/plugins/action/controller_selector_node.hpp"
#include "nav_msgs/msg/path.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/drive_on_heading_action.hpp"

class DriveOnHeadingActionServer : public TestActionServer<nav2_msgs::action::DriveOnHeading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/drive_on_heading_cancel_node.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/follow_path_action.hpp"

class FollowPathActionServer : public TestActionServer<nav2_msgs::action::FollowPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <set>
#include <string>

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "behaviortree_cpp_v3/bt_factory.h"
#include "nav2_behavior_tree/plugins/action/goal_checker_selector_node.hpp"
#include "nav_msgs/msg/path.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/navigate_through_poses_action.hpp"

class NavigateThroughPosesActionServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/navigate_to_pose_action.hpp"

class NavigateToPoseActionServer : public TestActionServer<nav2_msgs::action::NavigateToPose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <set>
#include <string>

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "behaviortree_cpp_v3/bt_factory.h"
#include "nav2_behavior_tree/plugins/action/planner_selector_node.hpp"
#include "nav_msgs/msg/path.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_service.hpp"
#include "utils/test_service.hpp"
#include "nav2_behavior_tree/plugins/action/reinitialize_global_localization_service.hpp"

class ReinitializeGlobalLocalizationService : public TestService<std_srvs::srv::Empty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/remove_passed_goals_action.hpp"
#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"

class RemovePassedGoalsTestFixture : public ::testing::Test
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/smooth_path_action.hpp"

class SmoothPathActionServer : public TestActionServer<nav2_msgs::action::SmoothPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <set>
#include <string>

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "behaviortree_cpp_v3/bt_factory.h"
#include "nav2_behavior_tree/plugins/action/smoother_selector_node.hpp"
#include "nav_msgs/msg/path.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/spin_action.hpp"

class SpinActionServer : public TestActionServer<nav2_msgs::action::Spin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/spin_cancel_node.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/truncate_path_action.hpp"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/action/truncate_path_local_action.hpp"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/wait_action.hpp"

class WaitActionServer : public TestActionServer<nav2_msgs::action::Wait>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "behaviortree_cpp_v3/bt_factory.h"

#include "../../test_action_server.hpp"
#include "utils/test_action_server.hpp"
#include "nav2_behavior_tree/plugins/action/wait_cancel_node.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"

Expand Down
1 change: 0 additions & 1 deletion nav2_behavior_tree/test/plugins/condition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ ament_target_dependencies(test_would_a_planner_recovery_help ${dependencies})
ament_add_gtest(test_would_a_smoother_recovery_help test_would_a_smoother_recovery_help.cpp)
target_link_libraries(test_would_a_smoother_recovery_help nav2_would_a_smoother_recovery_help_condition_bt_node)
ament_target_dependencies(test_would_a_smoother_recovery_help ${dependencies})

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <memory>
#include <map>

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/are_error_codes_present_condition.hpp"
#include "nav2_msgs/action/follow_path.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/distance_traveled_condition.hpp"

class DistanceTraveledConditionTestFixture : public nav2_behavior_tree::BehaviorTreeTestFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/globally_updated_goal_condition.hpp"

class GloballyUpdatedGoalConditionTestFixture : public nav2_behavior_tree::BehaviorTreeTestFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "geometry_msgs/msg/pose_stamped.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/goal_reached_condition.hpp"

using namespace std::chrono; // NOLINT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/goal_updated_condition.hpp"

class GoalUpdatedConditionTestFixture : public nav2_behavior_tree::BehaviorTreeTestFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <set>
#include <string>

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/initial_pose_received_condition.hpp"

class TestNode : public BT::SyncActionNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "sensor_msgs/msg/battery_state.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/is_battery_low_condition.hpp"

class IsBatteryLowConditionTestFixture : public ::testing::Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include "rclcpp/rclcpp.hpp"
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"
#include "../../test_service.hpp"
#include "utils/test_service.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/is_path_valid_condition.hpp"

using namespace std::chrono; // NOLINT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/is_stuck_condition.hpp"

using namespace std::chrono; // NOLINT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/path_expiring_timer_condition.hpp"

using namespace std::chrono; // NOLINT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/robot_utils.hpp"

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/time_expired_condition.hpp"

using namespace std::chrono; // NOLINT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <chrono>
#include <string>

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/transform_available_condition.hpp"

class TransformAvailableConditionTestFixture : public ::testing::Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <memory>
#include <map>

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/would_a_controller_recovery_help_condition.hpp"
#include "nav2_msgs/action/follow_path.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <memory>
#include <map>

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/would_a_planner_recovery_help_condition.hpp"
#include "nav2_msgs/action/compute_path_to_pose.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <memory>
#include <map>

#include "../../test_behavior_tree_fixture.hpp"
#include "utils/test_behavior_tree_fixture.hpp"
#include "nav2_behavior_tree/plugins/condition/would_a_smoother_recovery_help_condition.hpp"
#include "nav2_msgs/action/smooth_path.hpp"

Expand Down
Loading