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

Pose tag in sensors ignored with fixed links #67

Closed
osrf-migration opened this issue Jul 3, 2014 · 4 comments
Closed

Pose tag in sensors ignored with fixed links #67

osrf-migration opened this issue Jul 3, 2014 · 4 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by adhenning (Bitbucket: adhenning).

The original report had attachments: GearsBot.URDF


When a sensor (or at least camera's in this case) is attached to a fixed link, it's pose tag is ignored and overwritten with the computed pose for the fixed link when the pose tag should be transformed by the computed pose. I've attach the file to reproduce this issue. The following cases show the error. The pose should change, but doesn't.

No pose (0, 0, 0, 0, 0, 0):

<sensor name="robotCamera" type="camera">
  <visualize>true</visualize>
  <!-- <pose>1 1 1 1.570796 1.570796 1.570796</pose> -->
  <camera></camera>
</sensor>

Output:

$ gz sdf -p /usr/share/frcsim/models/GearsBot/robots/GearsBot.URDF | awk "/<sensor name='robotCamera/,/<\/sensor>/"
  <sensor name='robotCamera' type='camera'>
    <visualize>1</visualize>
    <camera name='__default__'>
      <horizontal_fov>1.047</horizontal_fov>
      <image>
        <width>320</width>
        <height>240</height>
      </image>
      <clip>
        <near>0.1</near>
        <far>100</far>
      </clip>
    </camera>
    <pose>-0.20115 0.42488 0.30943 1.5708 -0.89012 1.5708</pose>
  </sensor>

Pose:

<sensor name="robotCamera" type="camera">
  <visualize>true</visualize>
  <pose>1 1 1 1.570796 1.570796 1.570796</pose>
  <camera></camera>
</sensor>

Output:

  $ gz sdf -p /usr/share/frcsim/models/GearsBot/robots/GearsBot.URDF | awk "/<sensor name='robotCamera/,/<\/sensor>/"
  <sensor name='robotCamera' type='camera'>
    <visualize>1</visualize>
    <camera name='__default__'>
      <horizontal_fov>1.047</horizontal_fov>
      <image>
        <width>320</width>
        <height>240</height>
      </image>
      <clip>
        <near>0.1</near>
        <far>100</far>
      </clip>
    </camera>
    <pose>-0.20115 0.42488 0.30943 1.5708 -0.89012 1.5708</pose>
  </sensor>
@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


We should add a test for this to fixed_joint_reduction.cc (see also fixed_joint_reduction.urdf).

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 11, 2020
@peci1
Copy link
Contributor

peci1 commented Aug 7, 2020

There's even a TODO for it in the code: https://github.com/osrf/sdformat/blob/master/src/parser_urdf.cc#L3374 . This issue is very impractical...

@peci1
Copy link
Contributor

peci1 commented Mar 30, 2021

Fixed by #525 .

@peci1
Copy link
Contributor

peci1 commented Apr 7, 2021

The fix has been released. This bug can be closed now, @nkoenig .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

3 participants