Gazebo does not read the .xacro

asked 2021-08-18 18:29:21 -0600

martinuacm gravatar image

Hello I hope you can help me.

Performing the following tutorial:

Everything is fine, but when I have to run Gazebo to see the chassis, I don't see anything, the chassis does not come out. I continue with the tutorial and I still don't see the robot.

I am using Ubuntu 20.04, ros noetic, and gazebo 11.

These are my .xacro files:


    ?xml version="1.0"?>
<robot name="mybot" xmlns:xacro="">
        <!-- Put here the robot description -->

    <xacro:property name="PI" value="3.1415926535897931"/>
<xacro:property name="chassisHeight" value="0.1"/>
<xacro:property name="chassisLength" value="0.4"/>
<xacro:property name="chassisWidth" value="0.2"/>
<xacro:property name="chassisMass" value="50"/>

<xacro:property name="casterRadius" value="0.05"/>
<xacro:property name="casterMass" value="5"/>

<xacro:property name="wheelWidth" value="0.05"/>
<xacro:property name="wheelRadius" value="0.1"/>    
<xacro:property name="wheelPos" value="0.2"/>
<xacro:property name="wheelMass" value="5"/>

<xacro:property name="cameraSize" value="0.05"/>
<xacro:property name="cameraMass" value="0.1"/>

<xacro:include filename="$(find mybot_description)/urdf/mybot.gazebo" />
<xacro:include filename="$(find mybot_description)/urdf/materials.xacro" />
<xacro:include filename="$(find mybot_description)/urdf/macros.xacro" />

<link name="footprint" />

<joint name="base_joint" type="fixed">
  <parent link="footprint"/>
  <child link="chassis"/>

<link name='chassis'>
            <origin xyz="0 0 ${wheelRadius}" rpy="0 0 0"/> 
                <box size="${chassisLength} ${chassisWidth} ${chassisHeight}"/> 
            <origin xyz="0 0 ${wheelRadius}" rpy="0 0 0"/> 
                <box size="${chassisLength} ${chassisWidth} ${chassisHeight}"/> 
                   <material name="orange"/>
            <origin xyz="0 0 ${wheelRadius}" rpy="0 0 0"/> 
            <mass value="${chassisMass}"/> 
            <box_inertia m="${chassisMass}" x="${chassisLength}" y="${chassisWidth}" z="${chassisHeight}"/>

<joint name="fixed" type="fixed">
      <parent link="chassis"/>
      <child link="caster_wheel"/>



<?xml version="1.0"?>

<robot <a="" href="http://xmlns:xacro="" name="mybot">xmlns:xacro="> </robot>

    <gazebo reference="chassis">



<?xml version="1.0"?>

<robot <a="" href="http://xmlns:xacro="" name="mybot">xmlns:xacro="> </robot>

    <xacro:macro name="cylinder_inertia" params="m r h">
    <inertia  ixx="${m*(3*r*r+h*h)/12}" ixy = "0" ixz = "0"
                  iyy="${m*(3*r*r+h*h)/12}" iyz = "0"

<xacro:macro name="box_inertia" params="m x y z">
    <inertia  ixx="${m*(y*y+z*z)/12}" ixy = "0" ixz = "0"
              iyy="${m*(x*x+z*z)/12}" iyz = "0"
    /> ...
edit retag flag offensive close merge delete