diff --git a/gazebo_ros/scripts/spawn_entity.py b/gazebo_ros/scripts/spawn_entity.py index a5bef27d4..998af5d72 100755 --- a/gazebo_ros/scripts/spawn_entity.py +++ b/gazebo_ros/scripts/spawn_entity.py @@ -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 @@ -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()