From 2ea70b127ebb1a1a995b03fa9e94d56b30cde7c1 Mon Sep 17 00:00:00 2001 From: Simon Jones Date: Sat, 27 Jan 2024 15:34:19 -0500 Subject: [PATCH] feat: preventing node creation from single file by default --- src/ddpg_flight.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ddpg_flight.py b/src/ddpg_flight.py index 28bd11e..a6f1a48 100644 --- a/src/ddpg_flight.py +++ b/src/ddpg_flight.py @@ -345,12 +345,15 @@ def episode_take_action(action): # To store average reward history of last few episodes avg_reward_list = [] +# NOTE: set to true to launch nodes from this process +launch_simulation_nodes_manually = False # set up ROS related handles -simulation_nodes.launch_px4() -simulation_nodes.launch_gazebo() -simulation_nodes.launch_clover_services() -simulation_nodes.launch_clover_model() -service_proxies.init() +if launch_simulation_nodes_manually: + simulation_nodes.launch_px4() + simulation_nodes.launch_gazebo() + simulation_nodes.launch_clover_services() + simulation_nodes.launch_clover_model() + service_proxies.init() for ep in range(total_episodes):