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

parser_urdf: add //frame for reduced links/joints (garden) #1149

Closed
wants to merge 9 commits into from

Conversation

scpeters
Copy link
Member

Draft pull request until #1137 and #1126 are merged to sdf13

🎉 New feature

Forward port of #1148, built on top of #1137 and #1126, related to #1110

Summary

This differs from #1148 by using sdf::Frame::ToElement()::ToString to serialize the new frames to an XML string and also has better floating point precision due to #1137.

Original summary from #1148

Currently the location of some links and joints is lost when fixed joints are reduced and links lumped together. For example, the first snippet below is a URDF with two links outlined in red and a fixed joint outlined in blue. The child link has a visual outlined in green. The second snippet shows what results when converting to SDFormat, with the fixed joint and child link removed, and the visual moved to the parent link.

fixed_joint_simple_urdf

fixed_joint_simple_sdf

This process of "fixed joint reduction" reduces the complexity of a simulation, particularly for solvers using maximal coordinates, but it does lose some frame information. This pull request adds //model/frame tags with the same name and pose of the reduced links and joints. For example, the following would be added for the examples shown above.

    <frame name='fixed_joint' attached_to='base'>
      <pose>0 0 0 0 0 0</pose>
    </frame>
    <frame name='child_link' attached_to='fixed_joint'>
      <pose>0 0 0 0 0 0</pose>
    </frame>

Test it

Compile and run INTEGRATION_urdf_gazebo_extensions

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

The urdf_gazebo_extensions.urdf file had incorrect kinematics
with link3 being the child of two different joints.
This adds a link4 and converts joint13 to joint14.
This also fixes some expectations about the
implicit_spring_damper tags.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Remove some unused parameters, and make some const.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Prevent truncation of floating point digits in
Param::Set and Param::GetDefault.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Currently the location of some links and joints is lost
when fixed joints are reduced and links lumped together.
This adds //model/frame tags with the same name and
pose of the reduced links and joints.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@osrf-triage osrf-triage added this to Inbox in Core development Sep 16, 2022
@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Merging #1149 (7352b5a) into sdf13 (dc5720a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            sdf13    #1149      +/-   ##
==========================================
+ Coverage   87.00%   87.02%   +0.01%     
==========================================
  Files         125      125              
  Lines       15834    15852      +18     
==========================================
+ Hits        13777    13795      +18     
  Misses       2057     2057              
Impacted Files Coverage Δ
include/sdf/Param.hh 80.72% <100.00%> (ø)
src/parser_urdf.cc 87.91% <100.00%> (+0.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@scpeters scpeters moved this from Inbox to To do in Core development Sep 19, 2022
@scpeters scpeters moved this from To do to In progress in Core development Sep 19, 2022
Base automatically changed from scpeters/param_set_digits to sdf13 September 28, 2022 18:21
@scpeters
Copy link
Member Author

these changes are now in #1182

@scpeters scpeters closed this Sep 30, 2022
Core development automation moved this from In progress to Done Sep 30, 2022
@scpeters scpeters deleted the scpeters/debug_urdf_frame_13 branch September 30, 2022 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant