xacro macros model not showing up in rviz(noetic)
hi, I am trying to visualize xacro macros model on rviz which works fine in gazebo but i have few issues while visualizing it in rviz. in gazebo i am able to visualize the links, collision and inertia are properly configured but when i launch rviz i get this warning
Unable to parse component [${base_length}] to a double (while parsing a vector value)
[ERROR] [1623216223.772835121, 69.582000000]: Could not parse visual element for Link [base_link]
i tried rosparam load <myxacro.urdf.xacro> robot_description
and the same error. i followed the solution in this thread but no luck.
and i also get robotmodel error.
Parameter [robot_description] does not exist, and was not found by searchParam()
i tried running export LC_NUMERIC="en_US.UTF-8"
before rviz but does not solve it.
my xacro files
inertials.xacro
<?xml version="1.0" ?>
<!-- xacro macros for inertials.
Define xacro macros for math constants and inertials:
- solid cuboid
- solid cylinder
- null (a placeholder inertial for logical link elements)
-->
<robot name="inertials" xmlns:xacro="http://wiki.ros.org/xacro">
<!-- Math constants -->
<xacro:property name="math_pi" value="3.141592653589793" />
<xacro:property name="math_pi_over_2" value="1.5707963267948966" />
<xacro:property name="math_pi_over_4" value="0.785398163397448" />
<!-- Inertial for solid cuboid with dimensions x y z -->
<xacro:macro name="solid_cuboid_inertial" params="rpy xyz mass x y z">
<inertial>
<origin rpy="${rpy}" xyz="${xyz}"/>
<mass value="${mass}" />
<inertia
ixx="${mass * (y * y + z * z) / 12.0}" ixy="0.0" ixz="0.0"
iyy="${mass * (x * x + z * z) / 12.0}" iyz="0.0"
izz="${mass * (x * x + y * y) / 12.0}" />
</inertial>
</xacro:macro>
<solid_cuboid_inertial/>
<!-- Inertial for solid cylinder with radius and length aligned to z-axis -->
<xacro:macro name="solid_cylinder_inertial" params="rpy xyz mass radius length">
<inertial>
<origin rpy="${rpy}" xyz="${xyz}"/>
<mass value="${mass}" />
<inertia
ixx="${mass * (3.0 * radius * radius + length * length) / 12.0}" ixy="0.0" ixz="0.0"
iyy="${mass * (3.0 * radius * radius + length * length) / 12.0}" iyz="0.0"
izz="${mass * (radius * radius) / 2.0}" />
</inertial>
</xacro:macro>
<solid_cylinder_inertial/>
<!-- A null inertial - used in placeholder links to esure the model will work in Gazebo -->
<xacro:macro name="null_inertial">
<inertial>
<mass value="0.001"/>
<inertia ixx="0.001" ixy="0" ixz="0" iyy="0.001" iyz="0" izz="0.001"/>
</inertial>
</xacro:macro>
<null_inertial/>
</robot>
materials.xacro
<?xml version="1.0" ?>
<!-- xacro macros for robot materials.
-->
<robot name="materials" xmlns:xacro="http://wiki.ros.org/xacro">
<material name="red">
<color rgba="0.8 0 0 1"/>
</material>
<material name="green">
<color rgba="0 0.8 0 1"/>
</material>
<material name="blue">
<color rgba="0 0 0.8 1"/>
</material>
<material name="orange">
<color rgba="0.8 0.25 0 1"/>
</material>
wheel.xacro
< ...