Giter Club home page Giter Club logo

Comments (6)

chapulina avatar chapulina commented on July 21, 2024

I suspect this may be related to changes from libSDFormat 9 (Citadel) to libSDFormat 10 (Dome), because that's where the URDF gets parsed into SDF. In fact, a quicker way of reproducing this can be achieved with the ign sdf tool:

Citadel has the sensor pose:

ign sdf --force-version 9.5.0 -p /tmp/urdf
<sdf version='1.7'>
  <model name='will_be_ignored'>
    <link name='base_footprint'>
      <inertial>
        <pose>0 0 1.5 0 -0 0</pose>
        <mass>2</mass>
        <inertia>
          <ixx>6.5</ixx>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyy>6.5</iyy>
          <iyz>0</iyz>
          <izz>2</izz>
        </inertia>
      </inertial>
      <collision name='base_footprint_collision'>
        <pose>0 0 0 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>0.5</radius>
          </sphere>
        </geometry>
      </collision>
      <collision name='base_footprint_fixed_joint_lump__link_collision_1'>
        <pose>0 0 3 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>1</radius>
          </sphere>
        </geometry>
        <surface>
          <contact>
            <ode/>
          </contact>
          <friction>
            <ode/>
          </friction>
        </surface>
      </collision>
      <visual name='base_footprint_visual'>
        <pose>0 0 0 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>0.5</radius>
          </sphere>
        </geometry>
      </visual>
      <visual name='base_footprint_fixed_joint_lump__link_visual_1'>
        <pose>0 0 3 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>1</radius>
          </sphere>
        </geometry>
      </visual>
      <gravity>1</gravity>
      <velocity_decay/>
      <sensor name='link' type='gpu_lidar'>
        <topic>scan</topic>
        <update_rate>30</update_rate>
        <lidar>
          <scan>
            <horizontal>
              <samples>2800</samples>
              <resolution>1</resolution>
              <min_angle>-2.09</min_angle>
              <max_angle>2.09</max_angle>
            </horizontal>
            <vertical>
              <samples>1</samples>
              <resolution>0.1</resolution>
              <min_angle>0</min_angle>
              <max_angle>0</max_angle>
            </vertical>
          </scan>
          <range>
            <min>0.05</min>
            <max>30</max>
            <resolution>0.01</resolution>
          </range>
        </lidar>
        <visualize>1</visualize>
        <pose>0 0 3 0 -0 0</pose>
        <alwaysOn>1</alwaysOn>
      </sensor>
    </link>
    <static>0</static>
    <plugin name='ignition::gazebo::systems::Sensors' filename='ignition-gazebo-sensors-system'>
      <render_engine>ogre2</render_engine>
    </plugin>
  </model>
</sdf>

Dome doesn't:

ign sdf --force-version 10.3.0 -p /tmp/urdf
<sdf version='1.7'>
  <model name='will_be_ignored'>
    <link name='base_footprint'>
      <inertial>
        <pose>0 0 1.5 0 -0 0</pose>
        <mass>2</mass>
        <inertia>
          <ixx>6.5</ixx>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyy>6.5</iyy>
          <iyz>0</iyz>
          <izz>2</izz>
        </inertia>
      </inertial>
      <collision name='base_footprint_collision'>
        <pose>0 0 0 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>0.5</radius>
          </sphere>
        </geometry>
      </collision>
      <collision name='base_footprint_fixed_joint_lump__link_collision_1'>
        <pose>0 0 3 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>1</radius>
          </sphere>
        </geometry>
        <surface>
          <contact>
            <ode/>
          </contact>
          <friction>
            <ode/>
          </friction>
        </surface>
      </collision>
      <visual name='base_footprint_visual'>
        <pose>0 0 0 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>0.5</radius>
          </sphere>
        </geometry>
      </visual>
      <visual name='base_footprint_fixed_joint_lump__link_visual_1'>
        <pose>0 0 3 0 -0 0</pose>
        <geometry>
          <sphere>
            <radius>1</radius>
          </sphere>
        </geometry>
      </visual>
      <gravity>1</gravity>
      <velocity_decay/>
      <sensor name='link' type='gpu_lidar'>
        <topic>scan</topic>
        <update_rate>30</update_rate>
        <lidar>
          <scan>
            <horizontal>
              <samples>2800</samples>
              <resolution>1</resolution>
              <min_angle>-2.09</min_angle>
              <max_angle>2.09</max_angle>
            </horizontal>
            <vertical>
              <samples>1</samples>
              <resolution>0.1</resolution>
              <min_angle>0</min_angle>
              <max_angle>0</max_angle>
            </vertical>
          </scan>
          <range>
            <min>0.05</min>
            <max>30</max>
            <resolution>0.01</resolution>
          </range>
        </lidar>
        <visualize>1</visualize>
        <alwaysOn>1</alwaysOn>
      </sensor>
    </link>
    <static>0</static>
    <plugin name='ignition::gazebo::systems::Sensors' filename='ignition-gazebo-sensors-system'>
      <render_engine>ogre2</render_engine>
    </plugin>
  </model>
</sdf>

Looking through SDFormat's changelog, nothing stood out as being the culprit though.

from ros_gz.

scpeters avatar scpeters commented on July 21, 2024

I believe this is connected to fixed-joint reduction with the libsdformat parser_urdf.cc file

from ros_gz.

chapulina avatar chapulina commented on July 21, 2024

I think this was fixed by gazebosim/sdformat#525

from ros_gz.

doisyg avatar doisyg commented on July 21, 2024

Hopefully. It looks like it is related. Will test once merged or released in sdf11

from ros_gz.

doisyg avatar doisyg commented on July 21, 2024

Confirmed fixed in dome/sdf10, still need a merge in edifice/sdf11

from ros_gz.

chapulina avatar chapulina commented on July 21, 2024

The SDFormat fix has been forward-ported to Edifice. I'm closing this. ROS users will get the updated versions as the fix is released and ported to packages.ros.org.

from ros_gz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.