Does Gazebo support declaration of variables using DOCTYPE?

asked 2022-01-07 04:23:31 -0600

gerald gravatar image

I'm working on an SDF file written in XML used to describe a robotic arm. There are many repeated parts in the robot and I'm trying to declare a variable using DOCTYPE and reuse it in different parts of the code. However, I am unable to insert the model into Gazebo (nothing appears).

This is a snippet of my code (I've omitted some unrelated portions of the code):

<?xml version='1.0'?>

<!DOCTYPE sdf [<!ENTITY basesize "1 1 0.1">]>    
<sdf version='1.7'>
  <model name='working_arm'>
    <link name='base'>
      <visual name='base_visual'>
        <pose>0 0 0.05 0 -0 0</pose>

However, the model appears when I remove the DOCTYPE line and replace &basesize; with 1 1 0.1.

edit retag flag offensive close merge delete