I have a launch file for gazebo that works fine in terms of loading the robot into the world. But the problem I have is that I have to keep ending Gazebo in terminal by using CTRL + C and then wait for it to stop fully and then relaunch it with the new changes. Is there a more efficient way to load new changes to Gazebo? I have tried searching online but I couldn't find anything that I understood. My launch file is included below:

<?xml version="1.0"?>

<param name="robot_description" command="xacro '$(find my_robot)/urdf/my_1st_robot.urdf.xacro'"/>

<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"/>
<node pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" name="joint_state_publisher_gui"/>

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="paused" value="false" />
    <arg name="use_sim_time" value="true" />
    <arg name="gui" value="true" />
    <arg name="headless" value="false" />
    <arg name="debug" value="false" />

<node name="spawning_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model my_1st_robot -param robot_description"/>



1 Answer 1


There is a package called xacro live, which may do what you want: https://github.com/orise-robotics/xacro_live But I haven't used it myself yet.

  • $\begingroup$ Thanks for sending that, but its for ROS2. I am using ROS1 Melodic. $\endgroup$
    – Balen
    Commented Jan 18 at 10:12
  • $\begingroup$ At least in ROS2, Gazebo has a service ros2 service call /spawn_entity. This way you can spawn new things while it runs. There is also delete_model to remove things, which works for ros(1), see gazebo_ros_pkgs repo issue $\endgroup$
    – Scoeerg
    Commented Jun 16 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.