From a4fce48d10a86331b82d981b8f66d60940261d55 Mon Sep 17 00:00:00 2001 From: Hongkai Dai Date: Mon, 13 May 2024 14:06:16 -0700 Subject: [PATCH] Update the frame name in multibody_plant.h to stay in consistent with pybind code. (#21428) Rename frame_F/frame_G to frame_A/frame_B in MultibodyPlant::CalcRelativeTransform() and CalcRelativeRotationMatrix. --- multibody/plant/multibody_plant.h | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/multibody/plant/multibody_plant.h b/multibody/plant/multibody_plant.h index 75d4c32e0b5b..25537b2ce114 100644 --- a/multibody/plant/multibody_plant.h +++ b/multibody/plant/multibody_plant.h @@ -3374,39 +3374,39 @@ class MultibodyPlant : public internal::MultibodyTreeSystem { } } - /// Calculates the rigid transform (pose) `X_FG` relating frame F and frame G. + /// Calculates the rigid transform (pose) `X_AB` relating frame A and frame B. /// @param[in] context /// The state of the multibody system, which includes the system's - /// generalized positions q. Note: `X_FG` is a function of q. - /// @param[in] frame_F - /// The frame F designated in the rigid transform `X_FG`. - /// @param[in] frame_G - /// The frame G designated in the rigid transform `X_FG`. - /// @retval X_FG - /// The RigidTransform relating frame F and frame G. + /// generalized positions q. Note: `X_AB` is a function of q. + /// @param[in] frame_A + /// The frame A designated in the rigid transform `X_AB`. + /// @param[in] frame_B + /// The frame G designated in the rigid transform `X_AB`. + /// @retval X_AB + /// The RigidTransform relating frame A and frame B. math::RigidTransform CalcRelativeTransform( - const systems::Context& context, const Frame& frame_F, - const Frame& frame_G) const { + const systems::Context& context, const Frame& frame_A, + const Frame& frame_B) const { this->ValidateContext(context); - return internal_tree().CalcRelativeTransform(context, frame_F, frame_G); + return internal_tree().CalcRelativeTransform(context, frame_A, frame_B); } - /// Calculates the rotation matrix `R_FG` relating frame F and frame G. + /// Calculates the rotation matrix `R_AB` relating frame A and frame B. /// @param[in] context /// The state of the multibody system, which includes the system's - /// generalized positions q. Note: `R_FG` is a function of q. - /// @param[in] frame_F - /// The frame F designated in the rigid transform `R_FG`. - /// @param[in] frame_G - /// The frame G designated in the rigid transform `R_FG`. - /// @retval R_FG - /// The RigidTransform relating frame F and frame G. + /// generalized positions q. Note: `R_AB` is a function of q. + /// @param[in] frame_A + /// The frame A designated in the rigid transform `R_AB`. + /// @param[in] frame_B + /// The frame G designated in the rigid transform `R_AB`. + /// @retval R_AB + /// The RigidTransform relating frame A and frame B. math::RotationMatrix CalcRelativeRotationMatrix( - const systems::Context& context, const Frame& frame_F, - const Frame& frame_G) const { + const systems::Context& context, const Frame& frame_A, + const Frame& frame_B) const { this->ValidateContext(context); - return internal_tree().CalcRelativeRotationMatrix(context, frame_F, - frame_G); + return internal_tree().CalcRelativeRotationMatrix(context, frame_A, + frame_B); } /// Given the positions `p_BQi` for a set of points `Qi` measured and