Skip to content

Commit 13244ef

Browse files
jmatejczmaciejmajek
authored andcommitted
refactor: o3de config (#630)
1 parent 0b7aa99 commit 13244ef

File tree

5 files changed

+21
-27
lines changed

5 files changed

+21
-27
lines changed

docs/tutorials/benchmarking.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,10 @@ If your goal is creating custom tasks and scenarios, visit [Creating Custom Task
1616
## Manipulation O3DE
1717

1818
- Follow setup from [Manipulation demo Setup](../demos/manipulation.md#setup)
19-
- Create the O3DE config:
20-
```yaml
21-
binary_path: /path/to/binary/RAIManipulationDemo.GameLauncher
22-
level: RoboticManipulationBenchmark
23-
robotic_stack_command: ros2 launch examples/manipulation-demo-no-binary.launch.py
24-
required_simulation_ros2_interfaces:
25-
services:
26-
- /spawn_entity
27-
- /delete_entity
28-
topics:
29-
- /color_image5
30-
- /depth_image5
31-
- /color_camera_info5
32-
actions: []
33-
required_robotic_ros2_interfaces:
34-
services:
35-
- /grounding_dino_classify
36-
- /grounded_sam_segment
37-
- /manipulator_move_to
38-
topics: []
39-
actions: []
40-
```
4119
- Run the benchmark with:
4220

4321
```bash
44-
python src/rai_bench/rai_bench/examples/manipulation_o3de.py --model-name <your-model> --vendor <your-vendor> --o3de-config-path <path/to/your/config> --levels <trivial, easy>
22+
python src/rai_bench/rai_bench/examples/manipulation_o3de.py --model-name <your-model> --vendor <your-vendor> --levels <trivial, easy>
4523
```
4624

4725
!!! warning

src/rai_bench/rai_bench/manipulation_o3de/benchmark.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __init__(
137137
self.simulation_bridge.init_simulation(simulation_config=simulation_config)
138138
self.simulation_bridge.launch_robotic_stack(
139139
required_robotic_ros2_interfaces=simulation_config.required_robotic_ros2_interfaces,
140-
launch_description=self.launch_description,
140+
launch_description=self.launch_description(),
141141
)
142142
self.num_of_scenarios = len(scenarios)
143143
self.scenarios = enumerate(iter(scenarios))
@@ -146,7 +146,6 @@ def __init__(
146146
self.score_tracing_handler = ScoreTracingHandler()
147147
self.csv_initialize(self.results_filename, ScenarioResult)
148148

149-
@property
150149
def launch_description(self):
151150
launch_moveit = IncludeLaunchDescription(
152151
PythonLaunchDescriptionSource(
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
binary_path: demo_assets/manipulation/RAIManipulationDemo/RAIManipulationDemo.GameLauncher
2+
level: RoboticManipulationBenchmark
3+
required_simulation_ros2_interfaces:
4+
services:
5+
- /spawn_entity
6+
- /delete_entity
7+
topics:
8+
- /color_image5
9+
- /depth_image5
10+
- /color_camera_info5
11+
actions: []
12+
required_robotic_ros2_interfaces:
13+
services:
14+
- /grounding_dino_classify
15+
- /grounded_sam_segment
16+
- /manipulator_move_to
17+
topics: []
18+
actions: []

src/rai_bench/rai_bench/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def parse_manipulation_o3de_benchmark_args():
101101
parser.add_argument(
102102
"--o3de-config-path",
103103
type=str,
104-
required=True,
104+
default="src/rai_bench/rai_bench/manipulation_o3de/predefined/configs/o3de_config.yaml",
105105
help="Path to the O3DE configuration file",
106106
)
107107
parser.add_argument(

tests/rai_sim/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def sample_base_yaml_config(tmp_path: Path) -> Path:
5252
def sample_o3dexros2_config(tmp_path: Path) -> Path:
5353
yaml_content = """
5454
binary_path: /path/to/binary
55-
robotic_stack_command: "ros2 launch robotic_stack.launch.py"
5655
required_simulation_ros2_interfaces:
5756
services:
5857
- /spawn_entity

0 commit comments

Comments
 (0)