maliput / delphyne

Scenario and search based Ego/Ado Car traffic simulations
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Architectural Improvements & Bugfixes #453

Closed stonier closed 5 years ago

stonier commented 6 years ago

Resources

Goals

Keep tabs on the architecture and the complexity. This list will likely evolve as flags get raised while we work on items.

Front Load

Stretch Bugs

Success Criteria

apojomovsky commented 6 years ago

@stonier , FYI. Just added two items to the Work Items list to track the completion of the items discussed here.

hidmic commented 6 years ago

@basicNew @stonier @clalancette @apojomovsky On RigidBodyTree (aka RBT) to MultibodyTree (aka MBT) migration. All RBT uses within Drake's automotive namespace, and to some extent within Delphyne's backend as well, reduce to car and road visual geometry loading (e.g. see PriusVis and AutomotiveSimulator classes).

Now, before delving into details, it's important to understand the differences between RBT and MBT. As I understand it, RBT was designed to provide a self-contained representation of a rigid kinematic chain (e.g. a robotic arm) and thus geometrical (visuals, collisions) and physical (inertias, forces) descriptions are coupled. MBT, however, only provides a representation for a not-strictly rigid multibody physical system in order to solve for its dynamics, while geometry is delegated to the SceneGraph (aka SG) [1]. Coupled with these trees, both RigidBodyPlant (aka RBP) and MultibodyPlant (aka MBP) provide System interfaces for them to be used in simulation context. This is particularly relevant for the latter case, considering SG was designed to work with systems that register geometry and update/query it through ports.

In migrating from one to the other, a couple difficulties have been identified:

The last bullet is the most crucial, as it'll shape how we move forward with this:

Tangentially, we should also decide if we'll be doing the migration within Drake or if we'll be moving away from it, in the spirit of #498.

[1] It was stated that, because of this, for our particular use case we may not even need MBT (given we care about visual geometries only).

basicNew commented 6 years ago

@hidmic thanks for the research and the summary! Just to see if I got it right, the core issues are:

Am I missing anything?

hidmic commented 6 years ago

@basicNew That we need to make a small modification here if we want to get the LCM load message (i.e. the one we query from RBT here for example) out from the SG directly.

Other than that, it's a great TL;DR.

hidmic commented 6 years ago

One more detail that I think is worth mentioning: initially, @SeanCurtis-TRI was straightforward about SG not being ready for automotive. Thus SceneGraph's API may still be subject to changes in a not so distant future, hopefully simplifying our use cases.

clalancette commented 5 years ago

I'm going to close this one out now, since everything in here is either complete or has a separate issue. Feel free to reopen if you think we should continue to use this tracking bug instead.