Cannot spawn a .xacro model using a launch file

asked 2020-07-17 13:42:46 -0500

vvami gravatar image

Hello. I'm very new to ROS & gazebo.

After I run the launch file the terminal gets stuck with: [INFO] [1595010136.688080, 0.000000]: Waiting for service /gazebo/spawn_urdf_model

The launch file:


<!-- These are the arguments you can pass to this launch file, for example paused:=true -->
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>

<!-- We resume the logic in empty_world.launch -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="$(arg debug)" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="paused" value="$(arg paused)" />
    <arg name="use_sim_time" value="$(arg use_sim_time)" />
    <arg name="headless" value="$(arg headless)" />

<!-- Load the URDF into the ROS parameter server -->
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro'" />

<!-- Run a python script to send a service call to gazebo_ros to spawn a URDF robot-->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-urdf -model seven_dof_arm -param robot_description"/>


Basically this is the package I am trying to replicate as a way of practicing ROS/gazebo: link

In addition, I get this error (?): [gazebo-2] process has died [pid 27516, exit code 255, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode worlds/ __name:=gazebo __log:=/home/ami/.ros/log/6e5a50b4-c85a-11ea-abae-0800279c7921/gazebo-2.log]. log file: /home/ami/.ros/log/6e5a50b4-c85a-11ea-abae-0800279c7921/gazebo-2*.log

Not sure if it's related to the issue of spawning the model.

Would really appreciate any help with trying to figure out the problem. Thank you in advance.

edit retag flag offensive close merge delete