Gazebo Launches Empty
I've been following the URDF/XACRO tutorials and I've run into an issue. When I launch Gazebo the model never shows up.
- Ubuntu 18.04
- ROS Melodic
My gazebo.launch file:
<launch>
<!-- This will load Basic_Geometry_Pig as the URDF model -->
<arg name="model" default="$(find little_pig_atv)/basic_geometry_pig.urdf.xacro"/>
<!-- Setting some default args to start Gazebo with -->
<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"/>
<!-- Load an empty Gazebo world with the args above -->
<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)"/>
</include>
<!-- This is set with code from line 4 -->
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" args="-z 1.0 -unpause -urdf -model robot -param robot_description" respawn="false" output="screen" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
</launch>
My basic_geometry_pig.urdf.xacro file:
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="basic_geometry_pig">
<!-- Some color definitions for the URDF Robot -->
<material name="blue">
<color rgba="0 0 0.8 1"/>
</material>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<!-- Basic Geometry of Body -->
<xacro:property name="width" value="0.680618" />
<xacro:property name="height" value="1.065022" />
<xacro:property name="length" value="1.91" />
<!-- The Ackerman Steering Hub -->
<xacro:property name="ackerman_joint_diameter" value="0.09" />
<xacro:property name="ackerman_joint_width" value="0.09" />
<!-- Wheel Properties -->
<xacro:property name="front_wheel_width" value=".254" />
<xacro:property name="front_wheel_diameter" value="0.5588" />
<xacro:property name="rear_wheel_width" value="0.2794" />
<xacro:property name="rear_wheel_diameter" value="0.6096" />
<link name="base_link">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="49.8952"/>
<inertia ixx="11.48" ixy="10.52" ixz="1.737" iyy="1.737" iyz="11.48" izz="10.52"/>
</inertial>
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<box size="${length} ${width} ${height}"/>
</geometry>
<material name="blue"/>
</visual>
<gazebo reference="base_link">
<material>Gazebo/Black</material>
</gazebo>
</link>
<!-- Ackerman Steering Macro -->
<xacro:macro name="ackerman_steering" params="suffix reflect">
<link name="${suffix}_ackerman_component">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0 ...
Chirp Chirp
After examination in the Gazebo UI, I am seeing that the folder in which my urdf.xacro model is there. I see the base_link tree on the left. I am not seeing any robot pieces in the 3D world though.
Topic [//home/coach/catkin_ws/src/little_pig_atv/urdf/basic_geometry_pig.urdf.xacro/base_link/joint_cmd] is not valid.
None of the other links are showing in the tree.