|
94 | 94 | connector_path = configs_dir + "o3de_config.yaml"
|
95 | 95 | #### Create scenarios manually
|
96 | 96 | # load different scenes
|
97 |
| - # one_carrot_simulation_config = O3DExROS2SimulationConfig.load_config( |
98 |
| - # base_config_path=Path(configs_dir + "scene1.yaml"), |
99 |
| - # connector_config_path=Path(connector_path), |
100 |
| - # ) |
101 |
| - # multiple_carrot_simulation_config = O3DExROS2SimulationConfig.load_config( |
102 |
| - # base_config_path=Path(configs_dir + "scene2.yaml"), |
103 |
| - # connector_config_path=Path(connector_path), |
104 |
| - # ) |
105 |
| - # red_cubes_simulation_config = O3DExROS2SimulationConfig.load_config( |
106 |
| - # base_config_path=Path(configs_dir + "scene3.yaml"), |
107 |
| - # connector_config_path=Path(connector_path), |
108 |
| - # ) |
109 |
| - # multiple_cubes_simulation_config = O3DExROS2SimulationConfig.load_config( |
110 |
| - # base_config_path=Path(configs_dir + "scene4.yaml"), |
111 |
| - # connector_config_path=Path(connector_path), |
112 |
| - # ) |
113 |
| - # # combine different scene configs with the tasks to create various scenarios |
114 |
| - # scenarios = [ |
115 |
| - # Scenario( |
116 |
| - # task=GrabCarrotTask(logger=bench_logger), |
117 |
| - # simulation_config=one_carrot_simulation_config, |
118 |
| - # ), |
119 |
| - # Scenario( |
120 |
| - # task=GrabCarrotTask(logger=bench_logger), |
121 |
| - # simulation_config=multiple_carrot_simulation_config, |
122 |
| - # ), |
123 |
| - # Scenario( |
124 |
| - # task=PlaceCubesTask(logger=bench_logger), |
125 |
| - # simulation_config=red_cubes_simulation_config, |
126 |
| - # ), |
127 |
| - # Scenario( |
128 |
| - # task=PlaceCubesTask(logger=bench_logger), |
129 |
| - # simulation_config=multiple_cubes_simulation_config, |
130 |
| - # ), |
131 |
| - # ] |
| 97 | + one_carrot_simulation_config = O3DExROS2SimulationConfig.load_config( |
| 98 | + base_config_path=Path(configs_dir + "scene1.yaml"), |
| 99 | + connector_config_path=Path(connector_path), |
| 100 | + ) |
| 101 | + multiple_carrot_simulation_config = O3DExROS2SimulationConfig.load_config( |
| 102 | + base_config_path=Path(configs_dir + "scene2.yaml"), |
| 103 | + connector_config_path=Path(connector_path), |
| 104 | + ) |
| 105 | + red_cubes_simulation_config = O3DExROS2SimulationConfig.load_config( |
| 106 | + base_config_path=Path(configs_dir + "scene3.yaml"), |
| 107 | + connector_config_path=Path(connector_path), |
| 108 | + ) |
| 109 | + multiple_cubes_simulation_config = O3DExROS2SimulationConfig.load_config( |
| 110 | + base_config_path=Path(configs_dir + "scene4.yaml"), |
| 111 | + connector_config_path=Path(connector_path), |
| 112 | + ) |
| 113 | + # combine different scene configs with the tasks to create various scenarios |
| 114 | + scenarios = [ |
| 115 | + Scenario( |
| 116 | + task=GrabCarrotTask(logger=bench_logger), |
| 117 | + simulation_config=one_carrot_simulation_config, |
| 118 | + ), |
| 119 | + # Scenario( |
| 120 | + # task=GrabCarrotTask(logger=bench_logger), |
| 121 | + # simulation_config=multiple_carrot_simulation_config, |
| 122 | + # ), |
| 123 | + # Scenario( |
| 124 | + # task=PlaceCubesTask(logger=bench_logger), |
| 125 | + # simulation_config=red_cubes_simulation_config, |
| 126 | + # ), |
| 127 | + # Scenario( |
| 128 | + # task=PlaceCubesTask(logger=bench_logger), |
| 129 | + # simulation_config=multiple_cubes_simulation_config, |
| 130 | + # ), |
| 131 | + ] |
132 | 132 |
|
133 | 133 | ### Create scenarios automatically
|
134 |
| - scene_paths = [ |
135 |
| - configs_dir + "scene1.yaml", |
136 |
| - configs_dir + "scene2.yaml", |
137 |
| - configs_dir + "scene3.yaml", |
138 |
| - configs_dir + "scene4.yaml", |
139 |
| - ] |
140 |
| - simulations_configs = [ |
141 |
| - O3DExROS2SimulationConfig.load_config(Path(path), Path(connector_path)) |
142 |
| - for path in scene_paths |
143 |
| - ] |
144 |
| - tasks = [ |
145 |
| - GrabCarrotTask(logger=bench_logger), |
146 |
| - PlaceCubesTask(logger=bench_logger), |
147 |
| - ] |
148 |
| - scenarios = Benchmark.create_scenarios( |
149 |
| - tasks=tasks, simulation_configs=simulations_configs |
150 |
| - ) |
| 134 | + # scene_paths = [ |
| 135 | + # configs_dir + "scene1.yaml", |
| 136 | + # configs_dir + "scene2.yaml", |
| 137 | + # configs_dir + "scene3.yaml", |
| 138 | + # configs_dir + "scene4.yaml", |
| 139 | + # ] |
| 140 | + # simulations_configs = [ |
| 141 | + # O3DExROS2SimulationConfig.load_config(Path(path), Path(connector_path)) |
| 142 | + # for path in scene_paths |
| 143 | + # ] |
| 144 | + # tasks = [ |
| 145 | + # GrabCarrotTask(logger=bench_logger), |
| 146 | + # PlaceCubesTask(logger=bench_logger), |
| 147 | + # ] |
| 148 | + # scenarios = Benchmark.create_scenarios( |
| 149 | + # tasks=tasks, simulation_configs=simulations_configs |
| 150 | + # ) |
151 | 151 |
|
152 | 152 | # custom request to arm
|
153 | 153 | base_arm_pose = PoseModel(translation=Translation(x=0.3, y=0.0, z=0.5))
|
|
0 commit comments