Skip to content

Commit

Permalink
perf: improve performance of O3DE Benchmark (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmatejcz authored Feb 28, 2025
1 parent 70e824f commit e7527b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/rai_bench/rai_bench/examples/o3de_test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@

# custom request to arm
base_arm_pose = Pose(
translation=Translation(x=0.5, y=0.1, z=0.3),
translation=Translation(x=0.1, y=0.5, z=0.4),
rotation=Rotation(x=1.0, y=0.0, z=0.0, w=0.0),
)

Expand All @@ -183,7 +183,7 @@
final_gripper_state=False,
frame_id="panda_link0",
) # return to case position
time.sleep(2) # admire the end position for a second ;)
time.sleep(0.2) # admire the end position for a second ;)

bench_logger.info("===============================================================")
bench_logger.info("ALL SCENARIOS DONE. BENCHMARK COMPLETED!")
Expand Down
6 changes: 3 additions & 3 deletions src/rai_sim/rai_sim/o3de/o3de_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_scene_state(self) -> SceneState:
return SceneState(entities=entities)

def _is_ros2_stack_ready(
self, required_ros2_stack: dict[str, List[str]], retries: int = 30
self, required_ros2_stack: dict[str, List[str]], retries: int = 120
) -> bool:
for i in range(retries):
available_topics = self.connector.get_topics_names_and_types()
Expand Down Expand Up @@ -259,7 +259,7 @@ def _is_ros2_stack_ready(
self.logger.info("All required ROS2 stack components are available.")
return True

time.sleep(3)
time.sleep(0.5)

self.logger.error(
"Maximum number of retries reached. Required ROS2 stack components are not fully available."
Expand Down Expand Up @@ -408,7 +408,7 @@ def move_arm(
request.target_pose.header.frame_id = frame_id

request.target_pose.pose.position.x = pose.translation.x
request.target_pose.pose.position.x = pose.translation.y
request.target_pose.pose.position.y = pose.translation.y
request.target_pose.pose.position.z = pose.translation.z

if pose.rotation:
Expand Down

0 comments on commit e7527b5

Please sign in to comment.