-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more collision avoidance tests
- Loading branch information
Showing
28 changed files
with
723 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/mpc_tracker/mpc_avoidance_two_should_avoid/config/hw_api_attitude_rate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
input_mode: | ||
actuators: false | ||
control_group: false | ||
attitude_rate: true | ||
attitude: false | ||
acceleration_hdg_rate: false | ||
acceleration_hdg: false | ||
velocity_hdg_rate: false | ||
velocity_hdg: false | ||
position: false |
10 changes: 10 additions & 0 deletions
10
test/mpc_tracker/mpc_avoidance_two_should_avoid/config/hw_api_velocity_hdg.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
input_mode: | ||
actuators: false | ||
control_group: false | ||
attitude_rate: false | ||
attitude: false | ||
acceleration_hdg_rate: false | ||
acceleration_hdg: false | ||
velocity_hdg_rate: false | ||
velocity_hdg: true | ||
position: false |
16 changes: 16 additions & 0 deletions
16
test/mpc_tracker/mpc_avoidance_two_should_avoid/config/network_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 1. This list is used by NimbroNetwork for mutual communication of the UAVs | ||
# The names of the robots have to match hostnames described in /etc/hosts. | ||
# | ||
# 2. This list is used by MpcTracker for mutual collision avoidance of the UAVs. | ||
# The names should match the true "UAV_NAMES" (the topic prefixes). | ||
# | ||
# network_config:=~/config/network_config.yaml | ||
# | ||
# to the core.launch and nimbro.launch. | ||
|
||
network: | ||
|
||
robot_names: [ | ||
uav1, | ||
uav2, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/mpc_tracker/mpc_avoidance_two_should_crash/config/network_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 1. This list is used by NimbroNetwork for mutual communication of the UAVs | ||
# The names of the robots have to match hostnames described in /etc/hosts. | ||
# | ||
# 2. This list is used by MpcTracker for mutual collision avoidance of the UAVs. | ||
# The names should match the true "UAV_NAMES" (the topic prefixes). | ||
# | ||
# network_config:=~/config/network_config.yaml | ||
# | ||
# to the core.launch and nimbro.launch. | ||
|
||
network: | ||
|
||
robot_names: [ | ||
uav1, | ||
uav2, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/mpc_tracker/mpc_avoidance_two_uav1_passive/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
get_filename_component(TEST_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME) | ||
|
||
catkin_add_executable_with_gtest(test_${TEST_NAME} | ||
test.cpp | ||
) | ||
|
||
target_link_libraries(test_${TEST_NAME} | ||
${catkin_LIBRARIES} | ||
) | ||
|
||
add_dependencies(test_${TEST_NAME} | ||
${${PROJECT_NAME}_EXPORTED_TARGETS} | ||
${catkin_EXPORTED_TARGETS} | ||
) | ||
|
||
add_rostest(${TEST_NAME}.test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* UAV1's avoidance is ON | ||
* UAV2's avoidance is OFF | ||
|
||
UAV1 should avoid despite its higher priority |
32 changes: 32 additions & 0 deletions
32
test/mpc_tracker/mpc_avoidance_two_uav1_passive/config/custom_config_uav1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# GET ALL PARAMETERS USABLE FOR CUSTOM CONFIG BY RUNNING: | ||
## -------------------------------------------------------------- | ||
## | rosrun mrs_uav_core get_public_params.py # | ||
## -------------------------------------------------------------- | ||
|
||
mrs_uav_managers: | ||
|
||
estimation_manager: | ||
|
||
# loaded state estimator plugins | ||
state_estimators: [ | ||
"gps_baro", | ||
] | ||
|
||
initial_state_estimator: "gps_baro" # will be used as the first state estimator | ||
agl_height_estimator: "" # only slightly filtered height for checking min height (not used in control feedback) | ||
|
||
uav_manager: | ||
|
||
midair_activation: | ||
|
||
after_activation: | ||
controller: "Se3Controller" | ||
tracker: "MpcTracker" | ||
|
||
mrs_uav_trackers: | ||
|
||
mpc_tracker: | ||
|
||
collision_avoidance: | ||
|
||
enabled: true |
32 changes: 32 additions & 0 deletions
32
test/mpc_tracker/mpc_avoidance_two_uav1_passive/config/custom_config_uav2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# GET ALL PARAMETERS USABLE FOR CUSTOM CONFIG BY RUNNING: | ||
## -------------------------------------------------------------- | ||
## | rosrun mrs_uav_core get_public_params.py # | ||
## -------------------------------------------------------------- | ||
|
||
mrs_uav_managers: | ||
|
||
estimation_manager: | ||
|
||
# loaded state estimator plugins | ||
state_estimators: [ | ||
"gps_baro", | ||
] | ||
|
||
initial_state_estimator: "gps_baro" # will be used as the first state estimator | ||
agl_height_estimator: "" # only slightly filtered height for checking min height (not used in control feedback) | ||
|
||
uav_manager: | ||
|
||
midair_activation: | ||
|
||
after_activation: | ||
controller: "Se3Controller" | ||
tracker: "MpcTracker" | ||
|
||
mrs_uav_trackers: | ||
|
||
mpc_tracker: | ||
|
||
collision_avoidance: | ||
|
||
enabled: false |
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
test/mpc_tracker/mpc_avoidance_two_uav1_passive/config/mrs_simulator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
collisions: | ||
enabled: false | ||
crash: true | ||
|
||
individual_takeoff_platform: | ||
enabled: true | ||
|
||
uav_names: [ | ||
"uav1", | ||
"uav2", | ||
] | ||
|
||
uav1: | ||
type: "x500" | ||
spawn: | ||
x: 0.0 | ||
y: 0.0 | ||
z: 5.0 | ||
heading: 0.0 | ||
|
||
uav2: | ||
type: "x500" | ||
spawn: | ||
x: 5.0 | ||
y: 0.0 | ||
z: 5.0 | ||
heading: 0.0 |
16 changes: 16 additions & 0 deletions
16
test/mpc_tracker/mpc_avoidance_two_uav1_passive/config/network_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 1. This list is used by NimbroNetwork for mutual communication of the UAVs | ||
# The names of the robots have to match hostnames described in /etc/hosts. | ||
# | ||
# 2. This list is used by MpcTracker for mutual collision avoidance of the UAVs. | ||
# The names should match the true "UAV_NAMES" (the topic prefixes). | ||
# | ||
# network_config:=~/config/network_config.yaml | ||
# | ||
# to the core.launch and nimbro.launch. | ||
|
||
network: | ||
|
||
robot_names: [ | ||
uav1, | ||
uav2, | ||
] |
34 changes: 34 additions & 0 deletions
34
test/mpc_tracker/mpc_avoidance_two_uav1_passive/config/world_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
world_origin: | ||
|
||
units: "LATLON" # {"UTM, "LATLON"} | ||
|
||
origin_x: 47.397743 | ||
origin_y: 8.545594 | ||
|
||
safety_area: | ||
|
||
enabled: false | ||
|
||
horizontal: | ||
|
||
# the frame of reference in which the points are expressed | ||
frame_name: "world_origin" | ||
|
||
# polygon | ||
# | ||
# x, y [m] for any frame_name except latlon_origin | ||
# x = latitude, y = longitude [deg] for frame_name=="latlon_origin" | ||
points: [ | ||
-50, -50, | ||
50, -50, | ||
50, 50, | ||
-50, 50, | ||
] | ||
|
||
vertical: | ||
|
||
# the frame of reference in which the max&min z is expressed | ||
frame_name: "world_origin" | ||
|
||
max_z: 15.0 | ||
min_z: -2.0 |
51 changes: 51 additions & 0 deletions
51
test/mpc_tracker/mpc_avoidance_two_uav1_passive/mpc_avoidance_two_uav1_passive.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<launch> | ||
|
||
<arg name="this_path" default="$(dirname)" /> | ||
|
||
<arg name="UAV_TYPE" default="x500" /> | ||
|
||
<!-- automatically deduce the test name --> | ||
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" /> | ||
|
||
<!-- automatically deduce the package name --> | ||
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/> | ||
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" /> | ||
<arg name="package" default="$(eval eval(arg('package_eval')))" /> | ||
|
||
<include file="$(find mrs_uav_testing)/launch/mrs_simulator.launch"> | ||
<arg name="mrs_simulator_config" default="$(dirname)/config/mrs_simulator.yaml" /> | ||
</include> | ||
|
||
<include file="$(find mrs_multirotor_simulator)/launch/hw_api.launch"> | ||
<arg name="UAV_NAME" default="uav1" /> | ||
<arg name="custom_config" default="$(dirname)/config/hw_api.yaml" /> | ||
</include> | ||
|
||
<include file="$(find mrs_multirotor_simulator)/launch/hw_api.launch"> | ||
<arg name="UAV_NAME" default="uav2" /> | ||
<arg name="custom_config" default="$(dirname)/config/hw_api.yaml" /> | ||
</include> | ||
|
||
<include file="$(find mrs_uav_testing)/launch/mrs_uav_system.launch"> | ||
<arg name="automatic_start" default="false" /> | ||
<arg name="platform_config" default="$(find mrs_multirotor_simulator)/config/mrs_uav_system/$(arg UAV_TYPE).yaml" /> | ||
<arg name="custom_config" default="$(dirname)/config/custom_config_uav1.yaml" /> | ||
<arg name="world_config" default="$(dirname)/config/world_config.yaml" /> | ||
<arg name="network_config" default="$(dirname)/config/network_config.yaml" /> | ||
<arg name="UAV_NAME" default="uav1" /> | ||
</include> | ||
|
||
<include file="$(find mrs_uav_testing)/launch/mrs_uav_system.launch"> | ||
<arg name="automatic_start" default="false" /> | ||
<arg name="platform_config" default="$(find mrs_multirotor_simulator)/config/mrs_uav_system/$(arg UAV_TYPE).yaml" /> | ||
<arg name="custom_config" default="$(dirname)/config/custom_config_uav2.yaml" /> | ||
<arg name="world_config" default="$(dirname)/config/world_config.yaml" /> | ||
<arg name="network_config" default="$(dirname)/config/network_config.yaml" /> | ||
<arg name="UAV_NAME" default="uav2" /> | ||
</include> | ||
|
||
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0"> | ||
<param name="test" value="$(arg test_name)" /> | ||
</test> | ||
|
||
</launch> |
Oops, something went wrong.