Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gazebo_ros: spawn_entity bond fails to delete entity #1477

Open
agoeckner opened this issue Apr 18, 2023 · 0 comments
Open

gazebo_ros: spawn_entity bond fails to delete entity #1477

agoeckner opened this issue Apr 18, 2023 · 0 comments

Comments

@agoeckner
Copy link

ROS Version: Humble

When using the -b bond option for spawn_entity.py, the entity is not deleted upon node shutdown. Instead, the following occurs:

[spawn_entity.py-15] [INFO] [1681789499.858636142] [agent0.spawn_entity]: Ctrl-C detected
[spawn_entity.py-15] Failed to publish log message to rosout: publisher's context is invalid, at ./src/rcl/publisher.c:389
[spawn_entity.py-15] [INFO] [1681789499.859028577] [agent0.spawn_entity]: Deleting entity [agent0]
[spawn_entity.py-15] Failed to publish log message to rosout: publisher's context is invalid, at ./src/rcl/publisher.c:389
[spawn_entity.py-15] Traceback (most recent call last):
[spawn_entity.py-15]   File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 370, in <module>
[spawn_entity.py-15]     main()
[spawn_entity.py-15]   File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 365, in main
[spawn_entity.py-15]     exit_code = spawn_entity_node.run()
[spawn_entity.py-15]   File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 263, in run
[spawn_entity.py-15]     self._delete_entity()
[spawn_entity.py-15]   File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 299, in _delete_entity
[spawn_entity.py-15]     client = self.create_client(
[spawn_entity.py-15]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py", line 1417, in create_client
[spawn_entity.py-15]     client_impl = _rclpy.Client(
[spawn_entity.py-15] rclpy._rclpy_pybind11.RCLError: failed to create client: rcl node's context is invalid, at ./src/rcl/node.c:428
[ERROR] [spawn_entity.py-15]: process has died [pid 725, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -blah-parameters-here].

As you can see, the service client is not successfully created and thus the entity is not deleted. It seems that @alexfneves and @chapulina fixed this problem a long time ago with #986, but the behavior has reverted.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant