Gazebo is unable to load urdf

Running on vm, I created a simple launch file to launch Gazebo with the robot urdf, an error was shown.

launch file Content:
<launch><include file="$(find gazebo_ros)/launch/empty_world.launch"/><node name="spawn_model" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -model turtlebot -param robot_description"><param name="robot_description" textfile="$(find multi_robot)/src/turtlebot.urdf"/></node></launch>

<?xml version="1.0"?><robot name="turtlebot"><link name="base_link"><visual><geometry><box size="0.5 0.5 0.5"/></geometry></visual></link></robot>

Attempted to solve the issue:

  1. checked directory, path
  2. remove build and devel, source /opt/ros/noetic/setup.bash, ~/.bashrc and ws setup.bash, redo catkin_make
  3. checked gazebo_msgs, gazebo_ros to have all the packages, script, correct node name, dependencies
  4. rosdep update, sudo apt update, updated noetic, sudo rosdep fix-permissions
  5. reinstalled Gazebo

Persisted issue:
Gazebo was unable to load urdf, robot model, world. But the insert function can manually add them.

Error message:
[ INFO] [1692378515.995051190]: Finished loading Gazebo ROS API Plugin. [spawn_model-4] process has died /home/user/catkin_ws/devel/lib/gazebo_ros/spawn_model -urdf -model turtlebot -param robot_description __name:=spawn_model __log:=/home/user/.ros/log/dd4d5694-3de9-11ee-bbc9-ededcfbcc7ca/spawn_model-4.log]. log file: /home/user/.ros/log/dd4d5694-3de9-11ee-bbc9-ededcfbcc7ca/spawn_model-4*.log [ INFO] [1692378516.697968553]: waitForService: Service [/gazebo/set_physics_properties] is now available. [ INFO] [1692378516.735021098, 0.019000000]: Physics dynamic reconfigure ready.

[rospy.client][INFO] 2023-08-18 17:08:35,621: init_node, name[/spawn_model], pid[64745] [xmlrpc][INFO] 2023-08-18 17:08:35,621: XML-RPC server binding to [xmlrpc][INFO] 2023-08-18 17:08:35,622: Started XML-RPC server [http://a-vm:35987/] [rospy.init][INFO] 2023-08-18 17:08:35,622: ROS Slave URI: [http://a-vm:35987/] [rospy.impl.masterslave][INFO] 2023-08-18 17:08:35,622: _ready: hhttp://a-vm:35987/ [rospy.registration][INFO] 2023-08-18 17:08:35,623: Registering with master node http://localhost:11311 [xmlrpc][INFO] 2023-08-18 17:08:35,623: xml rpc node: starting XML-RPC server [rospy.init][INFO] 2023-08-18 17:08:35,723: registered with master [rospy.rosout][INFO] 2023-08-18 17:08:35,723: initializing /rosout core topic [rospy.rosout][INFO] 2023-08-18 17:08:35,729: connected to core topic /rosout [rospy.simtime][INFO] 2023-08-18 17:08:35,730: initializing /clock core topic [rospy.simtime][INFO] 2023-08-18 17:08:35,732: connected to core topic /clock [rosout][INFO] 2023-08-18 17:08:35,734: Loading model XML from ros parameter robot_description [rospy.core][INFO] 2023-08-18 17:08:35,861: signal_shutdown [atexit] [rospy.impl.masterslave][INFO] 2023-08-18 17:08:35,864: atexit

Hello @RC1 ,

I don’t understand very well your problem. Are you following a course? What is the error you are getting?

Hello Alberto, I’m not following a course. I’m doing this on my vm. It’s a clean vm, don’t know what happened. It suddenly happened in a running Gazebo, Gazebo was not able to show urdf ever since.

I found the solution, I modified the launch file

       <include file="$(find gazebo_ros)/launch/empty_world.launch"/>
       <param name="robot_description" textfile="$(find multi_robot)/src/turtlebot.urdf"/>
       <node name="spawn_model" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -model turtlebot -param robot_description">
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.