-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix PopulateUpstreamToDrake for checkout not named drake #7864
Conversation
+@soonho-tri for all review please. I will find someone to test locally also. |
Reviewed 2 of 2 files at r1. multibody/parsers/package_map.cc, line 135 at r1 (raw file):
BTW, multibody/parsers/package_map.cc, line 139 at r1 (raw file):
OK. multibody/parsers/package_map.h, line 82 at r1 (raw file):
BTW, need to update the doc section? Comments from Reviewable |
The prior version relied on "/drake/" appearing in absolute pathnames to URDF files, then looked for package.xml files in the trip from the URDF down to drake's root. This worked when all resources were in drake-distro/drake. When we got rid of drake-distro, it still worked if your git clone was named drake, or if you were running a test in the bazel sandbox where the workspace is named drake. If you were running from the command line, it would give up because it didn't know where drake was. The fix is to use GetDrakePath to establish the coordinate to search up until. This still might fail if the URDF is from some foreign Drake tree, but GetDrakePath is finding the current tree (it won't add the foreign packages), but at least this is an improvement.
d003af8
to
10c5f33
Compare
Reviewed 2 of 2 files at r2. Comments from Reviewable |
Good to merge this as @rdeits tested it? Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
Hmm, this had the side-effect that merely loading URDFs requires that FindResource works now, even if the user never wants or tries to use FindResource to locate URDFs. I will try to follow-up and weaken that. |
The prior version relied on
"/drake/"
appearing in absolute pathnames to URDF files, then looked forpackage.xml
files in the trip from the URDF down to drake's root. This worked when all resources were indrake-distro/drake
. When we got rid ofdrake-distro
, it still worked if your git clone was nameddrake
, or if you were running a test in the bazel sandbox where the workspace is nameddrake
. If you were running from the command line, it would give up because it didn't know where Drake was.The fix is to use
GetDrakePath
to establish the coordinate to search up until. This still might fail if the URDF is from some foreign Drake tree, butGetDrakePath
is finding the current tree (it won't add the foreign packages), but at least this is an improvement.Fixes #7855. Relates #6996.
This change is