Skip to content

Commit b5ca72d

Browse files
committed
Remove no needed changes
1 parent 00893d8 commit b5ca72d

File tree

1 file changed

+10
-14
lines changed
  • client/python/projectairsim/src/projectairsim

1 file changed

+10
-14
lines changed

client/python/projectairsim/src/projectairsim/utils.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -518,21 +518,17 @@ def load_scene_config_as_dict(
518518
actor["robot-config"] = combined_config
519519

520520
if "environment-actors" in data:
521+
# read and write the env-actor-config param in each env actor
521522
for env_actor in data["environment-actors"]:
522-
if env_actor["type"] in ["env_actor"]:
523-
env_actor_configs = env_actor["env-actor-config"]
524-
combined_config = {}
525-
if not isinstance(env_actor_configs, list):
526-
env_actor_configs = [env_actor_configs]
527-
for env_actor_path in env_actor_configs:
528-
total_env_actor_path = os.path.join(sim_config_path, env_actor_path)
529-
filepaths[2].append(env_actor_path)
530-
with open(total_env_actor_path) as e:
531-
temp = commentjson.load(e)
532-
if temp.get("script") is not None:
533-
validate_trajectory_json(temp["script"])
534-
combined_config = merge_dicts(combined_config, temp)
535-
env_actor["env-actor-config"] = combined_config
523+
if env_actor["type"] == "env_actor":
524+
env_actor_path = env_actor["env-actor-config"]
525+
total_env_actor_path = os.path.join(sim_config_path, env_actor_path)
526+
filepaths[2].append(env_actor_path)
527+
with open(total_env_actor_path) as e:
528+
temp = commentjson.load(e)
529+
if temp.get("script") != None:
530+
validate_trajectory_json(temp["script"])
531+
env_actor["env-actor-config"] = temp
536532

537533
if "tiles-dir" in data and data.get("tiles-dir-is-client-relative"):
538534
# Convert client-relative path into an absolute path before sending to sim

0 commit comments

Comments
 (0)