Closed EricCousineau-TRI closed 7 months ago
Maybe @mitiguy could work on this?
Q4 is fully booked but looks like a reasonable tech debt reduction for 2020.
in #13921 in order to implement global inverse kinematics, I have to use some functions in MultibodyTree. The reason is that I need to go through the whole tree, and parse the kinematics relationship between adjacent links. The functions I called include
I don't think get_topology()
or get_mobilizer()
are at all necessary in the PR. See review comments:
https://github.com/RobotLocomotion/drake/pull/13921#pullrequestreview-488032873
It should be easy to upgrade their usages?
Luckily, one year later the kuka_iiwa_robot
benchmark is still the only abuser of the MultibodyTree API, so we aren't adding new abuses. It would still be nice to clear away the misleading example from our codebase, though.
A few new uses have cropped up in the past 18 months:
./geometry/optimization/cspace_free_internal.cc:43: const multibody::internal::MultibodyTree<double>& tree =
./multibody/rational/rational_forward_kinematics_internal.cc:19: const MultibodyTreeTopology& topology = GetInternalTree(plant).get_topology();
./multibody/rational/rational_forward_kinematics_internal.cc:72: const MultibodyTree<double>& tree = GetInternalTree(plant);
./multibody/rational/rational_forward_kinematics_internal.cc:76: // path[i] is the child of path[i+1] in MultibodyTreeTopology, they are
./multibody/rational/rational_forward_kinematics_internal.cc:80: // path[i] is the parent of path[i+1] in MultibodyTreeTopology, they are
./multibody/rational/rational_forward_kinematics_internal.cc:98: const MultibodyTree<double>& tree = GetInternalTree(plant);
./multibody/rational/rational_forward_kinematics_internal.h:25: * `MultibodyTreeTopology`.
./multibody/rational/rational_forward_kinematics.h:240: from that in MultibodyTreeTopology. If we designate a certain body as the
./multibody/rational/rational_forward_kinematics.h:243: MultibodyTreeTopology usually designates the world as the root body, but we
./multibody/rational/rational_forward_kinematics.h:246: might be flipped from that defined in MultibodyTreeTopology.
./multibody/rational/rational_forward_kinematics.cc:36: * MultibodyTree's or RationalForwardKinematics's definition; this function
./multibody/rational/rational_forward_kinematics.cc:64: const internal::MultibodyTree<double>& tree = GetInternalTree(plant_);
./multibody/rational/rational_forward_kinematics.cc:233: const internal::MultibodyTree<double>& tree = GetInternalTree(plant_);
I'll look at the kuka_iiwa_robot abuses.
I'm not clear what the problem is here. In general, internal code inside Drake is allowed to call "internal" functions. Having code in Drake use MbT directly doesn't seem like a de-jure defect. If there are acute problems with using MbT in certain places, let's deal with those specifically when they come up.
At 767ec8868:
EDIT: Assigned per issue scrub mtg.