You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The issue related to rai_sim package, commit: f243525
When running scene_setup method of O3DExROS2Bridge in a loop the following error occurs after some successful attempts:
Exception in thread Thread-1 (spin):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 294, in spin
self.spin_once()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 794, in spin_once
self._spin_once_impl(timeout_sec)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 791, in _spin_once_impl
future.result()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 94, in result
raise self.exception()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in __call__
self._handler.send(None)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 430, in handler
arg = take_from_wait_list(entity)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 354, in _take_subscription
with sub.handle:
rclpy._rclpy_pybind11.InvalidHandle: cannot use Destroyable because destruction was requested
The number of attempts after the error occurs is different each time.
Run the following python script (adjust paths to yaml configs if needed):
import rclpy
from rai_sim.o3de.o3de_bridge import O3DExROS2Bridge, O3DExROS2SimulationConfig
from rai.communication.ros2.connectors import ROS2ARIConnector
import time
from pathlib import Path
if __name__ == "__main__":
try:
rclpy.init()
connector = ROS2ARIConnector()
o3de = O3DExROS2Bridge(connector)
for i in range(300):
print("ATTEMPT NUMBER: ", i)
scene_config = O3DExROS2SimulationConfig.load_config(base_config_path=Path("base_config1.yaml"), connector_config_path=Path("o3de_config.yaml"))
o3de.setup_scene(scene_config)
except Exception as e:
raise e
finally:
o3de.shutdown()
connector.shutdown()
rclpy.shutdown()
Expected behavior
After i-th attempt it is expected to have the following error:
Exception in thread Thread-1 (spin):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 294, in spin
self.spin_once()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 794, in spin_once
self._spin_once_impl(timeout_sec)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 791, in _spin_once_impl
future.result()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 94, in result
raise self.exception()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in __call__
self._handler.send(None)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 430, in handler
arg = take_from_wait_list(entity)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 354, in _take_subscription
with sub.handle:
rclpy._rclpy_pybind11.InvalidHandle: cannot use Destroyable because destruction was requested
Describe the bug
The issue related to rai_sim package, commit: f243525
When running scene_setup method of O3DExROS2Bridge in a loop the following error occurs after some successful attempts:
The number of attempts after the error occurs is different each time.
The errors occurs here when
trying to call service spawn_entity and is not being catched through try-except (when trying to do so).
To Reproduce
Steps to reproduce the behavior:
base_config1.yaml
:o3de_config.yaml
(adjust path to binary and launch file if needed):Expected behavior
After i-th attempt it is expected to have the following error:
Platform
Version
f243525
The text was updated successfully, but these errors were encountered: