Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error about nested models regarding gps0_joint #536

Closed
julianoes opened this issue Jun 26, 2020 · 17 comments
Closed

Error about nested models regarding gps0_joint #536

julianoes opened this issue Jun 26, 2020 · 17 comments
Labels

Comments

@julianoes
Copy link
Contributor

I get the following error on gzserver startup with iris:

[gzserver    ] [Err] [Model.cc:99] Error Code 16 Msg: Nested models are not yet supported by DOM objects, skipping model [iris].
[gzserver    ] [Err] [Model.cc:99] Error Code 18 Msg: Child link with name[gps0::link] specified by joint with name[gps0_joint] not found in model with name[iris].
[gzserver    ] [Err] [Model.cc:99] Error Code 23 Msg: FrameAttachedToGraph error, Non-LINK vertex with name [gps0_joint] is disconnected; it should have 1 outgoing edge in MODEL attached_to graph.
[gzserver    ] [Err] [Model.cc:99] Error Code 23 Msg: Graph has __model__ scope but sink vertex named [gps0_joint] does not have FrameType LINK when starting from vertex with name [gps0_joint].
[gzserver    ] [Err] [Model.cc:99] Error Code 18 Msg: Child link with name[gps0::link] specified by joint with name[gps0_joint] not found in model with name[iris].
[gzserver    ] [Err] [Model.cc:99] Error Code 26 Msg: PoseRelativeToGraph error, Non-MODEL vertex with name [gps0_joint] is disconnected; it should have 1 incoming edge in MODEL relative_to graph.
[gzserver    ] [Err] [Model.cc:99] Error Code 26 Msg: PoseRelativeToGraph frame with name [gps0_joint] is disconnected; its source vertex has name [gps0_joint], but its source name should be __model__.
[gzserver    ] [Err] [Model.cc:99] Error Code 8 Msg: A <script> element is missing a child <uri> element, or the <uri> element is empty.

FYI @TSC21 @Jaeyoung-Lim

@TSC21
Copy link
Member

TSC21 commented Jun 26, 2020

You are using Gazebo 11 right?

@julianoes
Copy link
Contributor Author

Yes.

@TSC21
Copy link
Member

TSC21 commented Jun 26, 2020

Then I would say that a solution needs to be find in the OSRF side to fix the fact Nested models are not yet supported by DOM objects. Nested models have been supported on DOM since a long time, so I don't get why is this a problem now. Have you looked in the gazebo issues for something similar?

@bperseghetti
Copy link
Member

@julianoes that was the initial issue I had posted till I changed the issue to be about the R1 since it evolved more into an R1 issue for us.

@bperseghetti
Copy link
Member

bperseghetti commented Jun 27, 2020

@julianoes @TSC21 Note The current version of libsdformat's DOM API does not support models defined directly inside parent models. As a workaround, such models can be accessed using the Element API. http://sdformat.org/tutorials?tut=composition

@TSC21 do we even need a nest GPS model, what previous problem does it exactly solve (just curious for background understanding)?

Side note going forward it appears this might be an issue no matter what for any future gazebo or ignition sims with v1.7 so figuring out what works best for current versions (v1.7 SDF) I think is critical. If we don't need the GPS nested the way it was changed recently to be then maybe roll it back to previous method.

@bperseghetti
Copy link
Member

Also looks like work on it is added as a milestone for SDF v1.8, not sure if it will be released ever to v1.7. gazebosim/sdformat#283

@TSC21
Copy link
Member

TSC21 commented Jun 27, 2020

@TSC21 do we even need a nest GPS model, what previous problem does it exactly solve (just curious for background understanding)?

#517

@Jaeyoung-Lim
Copy link
Member

I can reproduce this on Ubuntu Focal, Gazebo 11.0.0

@Jaeyoung-Lim
Copy link
Member

Seems like gazebosim/gazebo-classic#2824 is relent to the discussion here

@Jaeyoung-Lim
Copy link
Member

@TSC21 Is there a reason why we are using nested models verses normal tags for multiple gps models?

@TSC21
Copy link
Member

TSC21 commented Oct 5, 2020

normal tags

What do you mean with normal tags?

@Jaeyoung-Lim
Copy link
Member

@TSC21 Instead of

    <include>
      <uri>model://gps</uri>
      <pose>0 0 0 0 0 0</pose>
      <name>gps</name>
    </include>
    <joint name='gps_joint' type='fixed'>
      <child>gps::link</child>
      <parent>base_link</parent>
    </joint>

we can do

      <link name='link'>
        <pose>0 0 0 0 0 0</pose>
        <inertial>
          <pose>0 0 0 0 0 0</pose>
          <mass>0.01</mass>
          <inertia>
            <ixx>2.1733e-06</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>2.1733e-06</iyy>
            <iyz>0</iyz>
            <izz>1.8e-07</izz>
          </inertia>
        </inertial>
        <visual name='visual'>
          <geometry>
            <cylinder>
              <radius>0.01</radius>
              <length>0.002</length>
            </cylinder>
          </geometry>
          <material>
            <script>
              <name>Gazebo/Black</name>
              <uri>__default__</uri>
            </script>
          </material>
        </visual>
        <sensor name='gps' type='gps'>
          <pose>0 0 0 0 0 0</pose>
          <plugin name='gps_plugin' filename='libgazebo_gps_plugin.so'>
            <robotNamespace/>
            <gpsNoise>1</gpsNoise>
            <gpsXYRandomWalk>2.0</gpsXYRandomWalk>
            <gpsZRandomWalk>4.0</gpsZRandomWalk>
            <gpsXYNoiseDensity>0.0002</gpsXYNoiseDensity>
            <gpsZNoiseDensity>0.0004</gpsZNoiseDensity>
            <gpsVXYNoiseDensity>0.2</gpsVXYNoiseDensity>
            <gpsVZNoiseDensity>0.4</gpsVZNoiseDensity>
          </plugin>
        </sensor>
      </link>
    <joint name='gps0_joint' type='fixed'>
      <parent>base_link</parent>
      <child>gps0::link</child>
    </joint>

This way we don't need to deal with the problems arising from nested models not being supported.

@TSC21
Copy link
Member

TSC21 commented Oct 5, 2020

@TSC21 Instead of

    <include>
      <uri>model://gps</uri>
      <pose>0 0 0 0 0 0</pose>
      <name>gps</name>
    </include>
    <joint name='gps_joint' type='fixed'>
      <child>gps::link</child>
      <parent>base_link</parent>
    </joint>

we can do

      <link name='link'>
        <pose>0 0 0 0 0 0</pose>
        <inertial>
          <pose>0 0 0 0 0 0</pose>
          <mass>0.01</mass>
          <inertia>
            <ixx>2.1733e-06</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>2.1733e-06</iyy>
            <iyz>0</iyz>
            <izz>1.8e-07</izz>
          </inertia>
        </inertial>
        <visual name='visual'>
          <geometry>
            <cylinder>
              <radius>0.01</radius>
              <length>0.002</length>
            </cylinder>
          </geometry>
          <material>
            <script>
              <name>Gazebo/Black</name>
              <uri>__default__</uri>
            </script>
          </material>
        </visual>
        <sensor name='gps' type='gps'>
          <pose>0 0 0 0 0 0</pose>
          <plugin name='gps_plugin' filename='libgazebo_gps_plugin.so'>
            <robotNamespace/>
            <gpsNoise>1</gpsNoise>
            <gpsXYRandomWalk>2.0</gpsXYRandomWalk>
            <gpsZRandomWalk>4.0</gpsZRandomWalk>
            <gpsXYNoiseDensity>0.0002</gpsXYNoiseDensity>
            <gpsZNoiseDensity>0.0004</gpsZNoiseDensity>
            <gpsVXYNoiseDensity>0.2</gpsVXYNoiseDensity>
            <gpsVZNoiseDensity>0.4</gpsVZNoiseDensity>
          </plugin>
        </sensor>
      </link>
    <joint name='gps0_joint' type='fixed'>
      <parent>base_link</parent>
      <child>gps0::link</child>
    </joint>

This way we don't need to deal with the problems arising from nested models not being supported.

That's true, but what exactly is not supported? The include tags?

@TSC21
Copy link
Member

TSC21 commented Oct 5, 2020

The problem with the above is that you need to repeat it to each sensor you add, which is really painful and starts to grow in a crazy way.

@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Oct 5, 2020

That's true, but what exactly is not supported? The include tags?

The include is supported, but nested models are not, as written in the error:

[gzserver    ] [Err] [Model.cc:99] Error Code 16 Msg: Nested models are not yet supported by DOM objects, skipping model [iris].

@TSC21
Copy link
Member

TSC21 commented Oct 5, 2020

That's true, but what exactly is not supported? The include tags?

The include is supported, but nested models are not, as written in the error:

[gzserver    ] [Err] [Model.cc:99] Error Code 16 Msg: Nested models are not yet supported by DOM objects, skipping model [iris].

Since we removed the need for Xacro and replaced with jinja, we can now use include everywhere.

@Jaeyoung-Lim
Copy link
Member

With discussion with @TSC21 this issue should have been fixed when transitioning to sdf templates.

@julianoes Please reopen if the issue persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants