-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run batch simulations over set of startup params in yaml file (#125)
* proof of concept for looping over simulation parameters Signed-off-by: Michael Anderson <[email protected]> * try to fix Signed-off-by: Michael Anderson <[email protected]> * set on_exit shutdown in launch files Signed-off-by: Michael Anderson <[email protected]> * install script and example batch sim params; add launch file; set default to use example sim params Signed-off-by: Michael Anderson <[email protected]> * add rosbag and a log file; rename some things Signed-off-by: Michael Anderson <[email protected]> * fix max scale in example yaml Signed-off-by: Michael Anderson <[email protected]> * typo Signed-off-by: Michael Anderson <[email protected]> * remove noisy prints; get tests passing Signed-off-by: Michael Anderson <[email protected]> * use argparse Signed-off-by: Michael Anderson <[email protected]> * mbari_wec/model.sdf is now generated by empy Signed-off-by: Michael Anderson <[email protected]> * try to debug pc commands test Signed-off-by: Michael Anderson <[email protected]> * debug pc commands test Signed-off-by: Michael Anderson <[email protected]> * increase timeout; remove debugging prints Signed-off-by: Michael Anderson <[email protected]> * keep debugging Signed-off-by: Michael Anderson <[email protected]> * keep debugging Signed-off-by: Michael Anderson <[email protected]> * keep debugging Signed-off-by: Michael Anderson <[email protected]> * remove debugging code Signed-off-by: Michael Anderson <[email protected]> * set z_ww for doors open/closed -- unused until #115 Signed-off-by: Michael Anderson <[email protected]> * fix argparse Signed-off-by: Michael Anderson <[email protected]> * cleanup prints; remove default arg for batch launch Signed-off-by: Michael Anderson <[email protected]> * change iterations to duration in batch params yaml Signed-off-by: Michael Anderson <[email protected]> * clean up Signed-off-by: Michael Anderson <[email protected]> * clean up Signed-off-by: Michael Anderson <[email protected]> * added plumbing for random seed but not yet supported by our version of gz sim Signed-off-by: Michael Anderson <[email protected]> * make new directory for batch results; copy params yaml to results; timestamp everything; put rosbag names in log Signed-off-by: Michael Anderson <[email protected]> * add some info prints Signed-off-by: Michael Anderson <[email protected]> * flake8 Signed-off-by: Michael Anderson <[email protected]> * error checking; let --seed be optional and other params default; duration required Signed-off-by: Michael Anderson <[email protected]> * connect batching template to viscous drag plugin Signed-off-by: Michael Anderson <[email protected]> * retest until pass Signed-off-by: Michael Anderson <[email protected]> --------- Signed-off-by: Michael Anderson <[email protected]>
- Loading branch information
Showing
19 changed files
with
349 additions
and
35 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
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
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
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,44 @@ | ||
# Copyright 2022 Open Source Robotics Foundation, Inc. and Monterey Bay Aquarium Research Institute | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Launch Gazebo world with a buoy.""" | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument, Shutdown | ||
from launch.substitutions import LaunchConfiguration | ||
|
||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
|
||
sim_params_yaml_launch_arg = DeclareLaunchArgument( | ||
'sim_params_yaml', | ||
description='Input batch sim params yaml' | ||
) | ||
|
||
batch_sim = Node( | ||
package='buoy_gazebo', | ||
executable='mbari_wec_batch', | ||
arguments=[ | ||
LaunchConfiguration('sim_params_yaml'), | ||
], | ||
output='screen', | ||
on_exit=Shutdown() | ||
) | ||
|
||
return LaunchDescription([ | ||
sim_params_yaml_launch_arg, | ||
batch_sim, | ||
]) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
seed: 42 | ||
duration: 5 | ||
door_state: ['closed', 'open'] | ||
scale_factor: [0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.375, 1.4] |
Oops, something went wrong.