Spawn entity timeout in Gazebo from Ros2

ErrorsGazeboRoboticsros

Hi everyone,

I’m currently following a tutorial to simulate a fairly basic lidar robot with ROS2 and Gazebo: https://www.youtube.com/watch?v=laWn7_cj434. Unfortunately, there have been a few updates since the tutorial was created and a number of the commands don’t map 1:1 (no copy and paste).

While trying to create a launch file I ran into the following error:

<code>[create-3] [ERROR] [1668289712.483268807] [ros_gz_sim]: Request to create entity from service [/world/deafult/create] timed out.</code>

This was the relevant line in the launch file:

# Run the spawner node from the gazebo_ros package. The entity name doesn't really matter if you only have a single robot.<br>spawn_entity = Node(package='ros_ign_gazebo', executable='create',<br>arguments=[<br>'-world', 'deafult',<br>'-topic', 'robot_description',<br>'-entity', 'my_bot'],<br>output='screen')

The issue causing it to hang is that the world doesn’t exist. In my case, it’s because of a typo. However, if you’ve defined a world that you haven’t created yet it will result in the same error.