Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions gazebo_ros/scripts/spawn_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def entity_xml_cb(msg):
self.subscription = self.create_subscription(
String, self.args.topic, entity_xml_cb, latched_qos)

self.get_logger().info('Waiting for entity xml on %s' % self.args.topic)
while rclpy.ok() and entity_xml == '':
self.get_logger().info('Waiting for entity xml on %s' % self.args.topic)
rclpy.spin_once(self)
pass

Expand Down Expand Up @@ -271,7 +271,6 @@ def _spawn_entity(self, entity_xml, initial_pose, timeout=5.0):
self.get_logger().info(
'Waiting for service %s/spawn_entity, timeout = %.f' % (
self.args.gazebo_namespace, timeout))
self.get_logger().info('Waiting for service %s/spawn_entity' % self.args.gazebo_namespace)
client = self.create_client(SpawnEntity, '%s/spawn_entity' % self.args.gazebo_namespace)
if client.wait_for_service(timeout_sec=timeout):
req = SpawnEntity.Request()
Expand Down