Skip to content

Commit a93ea48

Browse files
Tomas BacaTomas Baca
authored andcommitted
+ modalities tests
1 parent 9f296f6 commit a93ea48

16 files changed

+497
-1
lines changed

test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ function(add_ros_isolated_launch_test path)
88
endfunction()
99

1010
add_subdirectory(./failsafe_controller)
11+
12+
add_subdirectory(./modalities)

test/modalities/CMakeLists.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
get_filename_component(TEST_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
2+
3+
set(CONTROLLERS
4+
se3
5+
mpc
6+
)
7+
8+
set(MODALITIES
9+
actuators
10+
control_group
11+
attitude_rate
12+
attitude
13+
acceleration_hdg_rate
14+
acceleration_hdg
15+
velocity_hdg_rate
16+
velocity_hdg
17+
position
18+
)
19+
20+
add_executable(test_${TEST_NAME}
21+
test.cpp
22+
)
23+
24+
ament_target_dependencies(test_${TEST_NAME}
25+
rclcpp
26+
mrs_lib
27+
mrs_msgs
28+
mrs_uav_testing
29+
backward_ros
30+
)
31+
32+
install(TARGETS
33+
test_${TEST_NAME}
34+
DESTINATION lib/${PROJECT_NAME}
35+
)
36+
37+
foreach(CONTROLLER ${CONTROLLERS})
38+
39+
foreach(MODALITY ${MODALITIES})
40+
41+
add_ros_isolated_launch_test(test.py
42+
TARGET "${TEST_NAME}_${CONTROLLER}_${MODALITY}"
43+
ARGS "controller:=${CONTROLLER}" "modality:=${MODALITY}"
44+
)
45+
46+
endforeach()
47+
48+
endforeach()
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# GET ALL PARAMETERS USABLE FOR CUSTOM CONFIG BY RUNNING:
2+
## --------------------------------------------------------------
3+
## | rosrun mrs_uav_core get_public_params.py #
4+
## --------------------------------------------------------------
5+
6+
mrs_uav_managers:
7+
8+
estimation_manager:
9+
10+
# loaded state estimator plugins
11+
state_estimators: [
12+
"gps_garmin",
13+
]
14+
15+
initial_state_estimator: "gps_garmin" # will be used as the first state estimator
16+
agl_height_estimator: "garmin_agl" # only slightly filtered height for checking min height (not used in control feedback)
17+
18+
uav_manager:
19+
20+
midair_activation:
21+
22+
after_activation:
23+
controller: "MpcController"
24+
tracker: "MpcTracker"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# GET ALL PARAMETERS USABLE FOR CUSTOM CONFIG BY RUNNING:
2+
## --------------------------------------------------------------
3+
## | rosrun mrs_uav_core get_public_params.py #
4+
## --------------------------------------------------------------
5+
6+
mrs_uav_managers:
7+
8+
estimation_manager:
9+
10+
# loaded state estimator plugins
11+
state_estimators: [
12+
"gps_garmin",
13+
]
14+
15+
initial_state_estimator: "gps_garmin" # will be used as the first state estimator
16+
agl_height_estimator: "garmin_agl" # only slightly filtered height for checking min height (not used in control feedback)
17+
18+
uav_manager:
19+
20+
midair_activation:
21+
22+
after_activation:
23+
controller: "Se3Controller"
24+
tracker: "MpcTracker"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugin:
2+
input_mode:
3+
actuators: false
4+
control_group: false
5+
attitude_rate: false
6+
attitude: false
7+
acceleration_hdg_rate: false
8+
acceleration_hdg: true
9+
velocity_hdg_rate: false
10+
velocity_hdg: false
11+
position: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugin:
2+
input_mode:
3+
actuators: false
4+
control_group: false
5+
attitude_rate: false
6+
attitude: false
7+
acceleration_hdg_rate: true
8+
acceleration_hdg: false
9+
velocity_hdg_rate: false
10+
velocity_hdg: false
11+
position: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugin:
2+
input_mode:
3+
actuators: true
4+
control_group: false
5+
attitude_rate: false
6+
attitude: false
7+
acceleration_hdg_rate: false
8+
acceleration_hdg: false
9+
velocity_hdg_rate: false
10+
velocity_hdg: false
11+
position: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugin:
2+
input_mode:
3+
actuators: false
4+
control_group: false
5+
attitude_rate: false
6+
attitude: true
7+
acceleration_hdg_rate: false
8+
acceleration_hdg: false
9+
velocity_hdg_rate: false
10+
velocity_hdg: false
11+
position: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugin:
2+
input_mode:
3+
actuators: false
4+
control_group: false
5+
attitude_rate: true
6+
attitude: false
7+
acceleration_hdg_rate: false
8+
acceleration_hdg: false
9+
velocity_hdg_rate: false
10+
velocity_hdg: false
11+
position: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugin:
2+
input_mode:
3+
actuators: false
4+
control_group: true
5+
attitude_rate: false
6+
attitude: false
7+
acceleration_hdg_rate: false
8+
acceleration_hdg: false
9+
velocity_hdg_rate: false
10+
velocity_hdg: false
11+
position: false

0 commit comments

Comments
 (0)