|
|
|
|
|
|
|
|
|
@@ -4,7 +4,7 @@ import copy |
|
|
|
from gym_art.quadrotor_multi.quad_scenarios_utils import QUADS_PARAMS_DICT, update_formation_and_max_agent_per_layer, \ |
|
update_layer_dist, get_formation_range, get_goal_by_formation, get_z_value, QUADS_MODE_LIST, \ |
|
- QUADS_MODE_LIST_OBSTACLES |
|
+ QUADS_MODE_LIST_OBSTACLES, QUADS_MODE_LIST_SIMPLE |
|
from gym_art.quadrotor_multi.quad_utils import generate_points, get_grid_dim_number |
|
|
|
|
|
@@ -623,7 +623,9 @@ class Scenario_mix(QuadrotorScenario): |
|
# Once change the parameter here, should also update QUADS_PARAMS_DICT to make sure it is same as run a single scenario |
|
# key: quads_mode |
|
# value: 0. formation, 1: [formation_low_size, formation_high_size], 2: episode_time |
|
- if obst_mode == 'no_obstacles': |
|
+ if num_agents == 1: |
|
+ self.quads_mode_list = QUADS_MODE_LIST_SIMPLE |
|
+ elif obst_mode == 'no_obstacles': |
|
self.quads_mode_list = QUADS_MODE_LIST |
|
else: |
|
self.quads_mode_list = QUADS_MODE_LIST_OBSTACLES |
|
|
|
|
|
|
|
|
|
@@ -208,7 +208,7 @@ def points_in_sphere(n, x): |
|
|
|
def generate_points(n=3): |
|
if n < 3: |
|
- print("The number of goals can not smaller than 3, The system has cast it to 3") |
|
+ # print("The number of goals can not smaller than 3, The system has cast it to 3") |
|
n = 3 |
|
return points_in_sphere(n, 0.1 + 1.2 * n) |
|
|
|
|