Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Destroy nodes after node creation tests.
The test teardown method is calling rclpy.shutdown() before the nodes created here are destroyed. With the inclusion of parameter services this is causing the tests to hang after printing the following exceptions: ========================================================================================================================== 7 passed in 0.11 seconds Exception ignored in: <bound method Node.__del__ of <rclpy.node.Node object at 0x7fc321e0fd30>> Traceback (most recent call last): File "/tmp/scree/src/rclpy-mount/rclpy/rclpy/node.py", line 410, in __del__ self.destroy_node() File "/tmp/scree/src/rclpy-mount/rclpy/rclpy/node.py", line 353, in destroy_node _rclpy.rclpy_destroy_node_entity(srv.service_handle, self.handle) RuntimeError: Failed to fini 'rcl_service_t': rcl node is invalid, rcl instance id does not match, at /tmp/scree/src/ros2/rcl/rcl/src/rcl/node.c:461 Exception ignored in: <bound method Node.__del__ of <rclpy.node.Node object at 0x7fc320597828>> Traceback (most recent call last): File "/tmp/scree/src/rclpy-mount/rclpy/rclpy/node.py", line 410, in __del__ self.destroy_node() File "/tmp/scree/src/rclpy-mount/rclpy/rclpy/node.py", line 353, in destroy_node _rclpy.rclpy_destroy_node_entity(srv.service_handle, self.handle) RuntimeError: Failed to fini 'rcl_service_t': rcl node is invalid, rcl instance id does not match, at /tmp/scree/src/ros2/rcl/rcl/src/rcl/node.c:461 Exception ignored in: <bound method Node.__del__ of <rclpy.node.Node object at 0x7fc320597b70>> Traceback (most recent call last): File "/tmp/scree/src/rclpy-mount/rclpy/rclpy/node.py", line 410, in __del__ self.destroy_node() File "/tmp/scree/src/rclpy-mount/rclpy/rclpy/node.py", line 353, in destroy_node _rclpy.rclpy_destroy_node_entity(srv.service_handle, self.handle) RuntimeError: Failed to fini 'rcl_service_t': rcl node is invalid, rcl instance id does not match, at /tmp/scree/src/ros2/rcl/rcl/src/rcl/node.c:461 Destroying the nodes before the teardown runs resolves both the indefinite hang and the exceptions.
- Loading branch information