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

Upgrade to SDFormat10 #48

Merged
merged 18 commits into from
Aug 4, 2021
Merged

Upgrade to SDFormat10 #48

merged 18 commits into from
Aug 4, 2021

Conversation

varunagrawal
Copy link
Collaborator

@varunagrawal varunagrawal commented Mar 15, 2021

This PR upgrades from the deprecated SDFormat8 to SDFormat9. Closes #36 and #26.

This upgrade had a bunch of breaking changes, but upgrading to SDFormat10 should not have any hassle. I haven't used SDFormat10 since the docs still seem to be in dev mode rather than a final release. SDFormat10 has an official release.

@varunagrawal varunagrawal added feature New feature or request high priority High priority task item labels Mar 15, 2021
@varunagrawal varunagrawal self-assigned this Mar 15, 2021
@varunagrawal varunagrawal linked an issue Mar 15, 2021 that may be closed by this pull request
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to resolve the joint representation issue first, as discussed.

@varunagrawal
Copy link
Collaborator Author

Cool! I am just glad we have an upgrade in place so the next steps should be pretty straightforward. 🙂

PS also gave me a chance to really understand the SDFormat API.

Copy link
Collaborator

@yetongumich yetongumich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the readme file on the installation of sdformat should also be updated for sdformat9

@dellaert dellaert removed the high priority High priority task item label Mar 17, 2021
Copy link
Collaborator

@yetongumich yetongumich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and it works. Note that the installation for sdformat9 no longer requires brew. You can simply install it with:

sudo apt-get install libsdformat9-dev

@dellaert
Copy link
Member

Sorry, but no, we should hold off on this. We discussed this in GTDynamics meeting on Monday.

@varunagrawal varunagrawal linked an issue Mar 22, 2021 that may be closed by this pull request
@Alescontrela
Copy link
Member

Tested it and it works. Note that the installation for sdformat9 no longer requires brew. You can simply install it with:

sudo apt-get install libsdformat9-dev

I think Mac users still require Brew to install SDFormat (osx's apt-get equivalent is Homebrew).

@varunagrawal
Copy link
Collaborator Author

Homebrew is available for Mac and Linux so using brew should be the default. I also hate how apt-get doesn't give you the choice of version: if only sdformat8 is configured as available, you can't switch to sdformat9 without compiling from source or adding some random PPA which ruins the whole point of apt.

@Alescontrela
Copy link
Member

Yeah that's the main reason I chose SDFormat 8 and not 9 when implementing UniversalRobot v.1. with Yetong. Installing SDFormat 9 on Linux is very tedious, but easier with Brew.

@varunagrawal varunagrawal removed a link to an issue Mar 30, 2021
@varunagrawal varunagrawal mentioned this pull request Apr 2, 2021
@varunagrawal varunagrawal added the high priority High priority task item label Apr 2, 2021
@varunagrawal
Copy link
Collaborator Author

I just tested out loading a URDF with mesh info (e.g. fetch.urdf, anymal_b.urdf) and it works great with SDFormat10. No core dump or any changes needed to the URDF file.

@varunagrawal varunagrawal changed the title Upgrade to SDFormat9 Upgrade to SDFormat10 Jul 25, 2021
@varunagrawal varunagrawal linked an issue Jul 25, 2021 that may be closed by this pull request
@varunagrawal
Copy link
Collaborator Author

varunagrawal commented Aug 3, 2021

@dellaert can we merge this in soon? I know we discussed making the joint and link representations follow SDFormat better, but that is currently a tangential issue since we can upgrade SDFormat and then later continue on that. Merging this PR doesn't break anything, and since there's no movement happening on the representation update, this PR is sitting in limbo for almost half a year.

Currently, this is blocking the CI since brew install sdformat8 has an issue on ubuntu 18.04 and no debian package exists for sdformat8 (we have them for sdformat 6, 9, 10 and 11).

@varunagrawal
Copy link
Collaborator Author

@dellaert I looked at the changes of this PR and the changes are consistent with the correct understanding of link and joint coordinate frames.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask for a review again after changes :-)

gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
gtdynamics/universal_robot/sdf.cpp Outdated Show resolved Hide resolved
@varunagrawal varunagrawal requested a review from dellaert August 3, 2021 21:53
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting there.


// Get the pose of the joint in the parent or child link's frame depending on
// the value of `frame_name`.
Pose3 lTj = Pose3FromIgnition(sdf_joint.RawPose());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, it's not lTj. We don't know that yet... Re-read my comments? :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDF spec mentions that all joint raw poses are with respect to the parent (or in some cases, the child) link's frame. This depends on what relative_to is set to for the joint. Here are the docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. So whether it is lTj is not known yet, hence my comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is known. It's known from the definition of the SDF file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need this last one resolved. Should I rename it to raw_pose?

gtdynamics/universal_robot/sdf.cpp Show resolved Hide resolved
tests/testSdf.cpp Outdated Show resolved Hide resolved
@varunagrawal varunagrawal requested a review from dellaert August 4, 2021 20:29
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve module those 3 comments


// Get the pose of the joint in the parent or child link's frame depending on
// the value of `frame_name`.
Pose3 lTj = Pose3FromIgnition(sdf_joint.RawPose());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. So whether it is lTj is not known yet, hence my comment.

tests/testSdf.cpp Outdated Show resolved Hide resolved
tests/testSdf.cpp Outdated Show resolved Hide resolved
@varunagrawal varunagrawal requested a review from dellaert August 4, 2021 22:58
@varunagrawal
Copy link
Collaborator Author

Merging this. @dellaert we can discuss the last comment on lTj and address it in a future PR.

@varunagrawal varunagrawal merged commit 11f183b into master Aug 4, 2021
@varunagrawal varunagrawal deleted the feature/sdformat9 branch August 4, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request high priority High priority task item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

document install sdf-format9 SDF 8 EOL? SDFormat8 Deprecated. Upgrade to SDFormat 9 or 10 recommended.
4 participants