-
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
Added support for loading the same SDF file multiple times. #2426
Added support for loading the same SDF file multiple times. #2426
Conversation
Reviewed 9 of 9 files at r1. drake/examples/Cars/CMakeLists.txt, line 38 [r1] (raw file):
add as a test, too? drake/examples/Cars/multi_car_sim.cpp, line 118 [r1] (raw file):
looks like it's already been moved there. obviously zap all of the above before your actual merge. drake/systems/plants/RigidBodySystem.h, line 181 [r1] (raw file):
inserting this in the middle of the arguments will unnecessarily break the api. recommend putting it at the end? drake/systems/plants/RigidBodyTree.cpp, line 107 [r1] (raw file):
i think that the longer-term fix is probably to purge all occurrences of robotnum which is essentially a UID, in favor of some data interface using pointers (e.g. the RigidBody has a link to the specific model_name string (or object), which no longer has to be unique). We should figure out the best design for the c++ and then I'm happy to help connect it back through to matlab. this is a good fix for the short term. drake/systems/plants/RigidBodyTree.h, line 118 [r1] (raw file):
again, recommend it as the last argument. Comments from Reviewable |
…e/multi_prius_demo # Conflicts: # drake/examples/Cars/car_simulation.cc # drake/systems/plants/RigidBodySystem.cpp # drake/systems/plants/RigidBodyTreeSDF.cpp
…e/multi_prius_demo # Conflicts: # drake/examples/Cars/car_simulation.cc
…into feature/multi_prius_demo
…pp" to be "multi_car_sim_lcm.cpp".
… to co-exist in the rigid body tree. They are differentiated by the model ID.
I addressed all reviewer comments and also updated this PR based on recent discussions about keeping the model name intact without adding a postfix. A model ID is still being used to differentiate between models within a rigid body tree. A future PR will be issued that removes this ID and switch to using pointers to differentiate between different models. +@RussTedrake for feature review and +@jwnimmer-tri for platform review
|
Two unit tests are failing:
|
…tion instead of returning a nullptr when finding a non-existent link in a rigid body tree.
This PR passed https://drake-jenkins.csail.mit.edu/job/experimental/1946/ and is thus ready for review.
|
I started reading this, but TBH I'm not sure this is a direction I want to support. Robot instancing would be trivial with a different RBT design; bolting it onto this design is just more difficult-to-get-right complexity. If there is no immediate need (in other words, if this PR was only for my benefit), I'd rather stack this PR after a general cleanup / redesign of the RB/RBT interfaces. Adding one more hand-crafted underdocumented public integer into the mix doesn't seem worth it, if nobody is chomping at the bit for the feature. If there is a quick need for this, let me know and I can try to find a good compromise.
|
@liangfok this still has status "do not review" -- should that be removed? |
@jwnimmer-tri: +1 for overhauling the rigid body tree design. I'm thinking there should be a "robot" abstraction that sits between the rigid body tree and the rigid body abstractions. However, I'm not sure this is enough since how would one identify a particular robot unless there were some unique ID included with each "robot" abstraction? @sherm1: Oops. I will remove the the "do not merge" label. |
|
I addressed all reviewer comments. PTAL.
|
This PR passed https://drake-jenkins.csail.mit.edu/job/experimental/2047/ and is thus ready for review. |
Platform review pass done.
|
I addressed all reviewer comments. PTAL.
|
Review pass done -- almost there! Reviewed 11 of 11 files at r12. drake/examples/Cars/car_simulation.h, line 76 [r11] (raw file):
|
I've addressed all reviewer comments. PTAL. There are still at least two things I need to do:
Review status: 19 of 21 files reviewed at latest revision, 27 unresolved discussions. drake/systems/plants/RigidBodySystem.cpp, line 819 [r5] (raw file):
|
This PR passed https://drake-jenkins.csail.mit.edu/job/experimental/2068/ and is thus ready for review. Review status: 19 of 21 files reviewed at latest revision, 27 unresolved discussions. Comments from Reviewable |
I added the unit test for Review status: 14 of 26 files reviewed at latest revision, 26 unresolved discussions. Comments from Reviewable |
This PR passed https://drake-jenkins.csail.mit.edu/job/experimental/2094/ and is thus ready for review. Review status: 13 of 26 files reviewed at latest revision, 26 unresolved discussions. Comments from Reviewable |
Liang, did this PR pick up some unrelated commits? Reviewed 1 of 2 files at r13, 7 of 11 files at r15. drake/systems/plants/RigidBodySystem.cpp, line 819 [r5] (raw file):
|
I just scanned through the commits associated with this PR and don't see anything out of the ordinary. Review status: 21 of 26 files reviewed at latest revision, 27 unresolved discussions. drake/systems/plants/RigidBodySystem.cpp, line 819 [r5] (raw file):
|
This PR passed https://drake-jenkins.csail.mit.edu/job/experimental/2096/ and is thus ready for review. Review status: 21 of 26 files reviewed at latest revision, 27 unresolved discussions. Comments from Reviewable |
Reviewed 3 of 11 files at r15, 2 of 2 files at r16. drake/systems/plants/test/rigid_body_system/rigid_body_system_test.cc, line 120 [r16] (raw file):
BTW, test looks good! Comments from Reviewable |
Closes #2546.
This PR contains changes necessary to load the same SDF file multiple times.
You can run the demo by executing the following:
Here's what you should see in Drake Visualizer:
The example source code is in
[drake distro]/drake/examples/cars/multi_car_sim_lcm.cc
.You can also run the following unit test:
This change is