template<typename T>
class drake::multibody::benchmarks::kuka_iiwa_robot::MG::MGKukaIIwaRobot< T >
This class is Drake's interface to the MotionGenesis solution for a 7DOF KUKA LBR iiwa robot (14 kg payload) which is described at: https://www.kuka.com/ende/products/robotsystems/industrialrobots/lbriiwa Geometry, jointtypes, and mass/inertia properties are contained in: drake/multibody/benchmarks/kuka_iiwa_robot/kuka_iiwa_robot.urdf.
There are 7 revolute motors that connect the Kuka robot's 7 rigid links, herein named A, B, C, D, E, F, G. Rigid link G is the robot's endeffector. Righthanded orthogonal unit vectors Nx, Ny, Nz are fixed in N (Earth) with Nz vertically upward. The origin of frame N (Earth) is denoted No.
Earth (ground body N) is connected to the robot link A with an ideal revolute motor. The motor stator is frame Na (the motor's inboard frame) which is fixed to N whereas the motor's rotor is frame/rigid link A, hence frame A is the motor's outboard frame. Point Nao (origin of frame Na, welded to N) is coincident with Ao (origin of frame A, welded to link A). Hence, these points are at the same location – but fixed to different objects. Frame Na has orthogonal unit vectors Nax, Nay, Naz whereas link A has orthogonal unit vectors Ax, Ay, Ax. The orientation of A relative to Na is described by initially setting Ax = Nax, Ay = Nay, Az = Naz, and then subjecting link A to a right handed rotation relative to Na about Naz = Az (Naz = Az is parallel to the motor's axis of rotation).
Similarly, link A connects to link B at point Abo of frame Ab (fixed on A) to origin Bo of frame B, which unit vector Abz = Bz. Analogous connections exist from B to C, C to D, ..., F to G (with motor revolute axes parallel to the corresponding z
unit vectors). Hence F connects to the endeffector G at origin Go of link G, and righthanded orthogonal unit vectors Gx, Gy, Gz are fixed in G.
This method calculates joint reaction force/torques for the 7 joints that connect frames Na to A, Ab to B, Bc to C, ...
Fg to G.
For example, there is a revolute joint (with motor actuation) between links A and B. The set Sᴮ of forces exerted on link B by the joint can be replaced by an equivalent set consisting of a single force f_Bo applied to point Bo of B, together with a couple of torque t_B on link B (t_B is equal to the moment of the set Sᴮ of forces about point Bo).
When the joint/motor is massless, one can prove that the set Sᴬ of forces exerted on link A by the joint has an action/reaction effect on A. Hence the set Sᴬ of forces on A can be replaced by an equivalent set consisting of a single force f_Abo = f_Bo applied to the point Abo of A that is coincident with Bo, together with a couple of torque t_A = t_B on link A (t_A is equal to the moment of the set Sᴬ of forces about point Abo).
The combination of the torque t_B and force f_Bo can be stored in a spatial force defined as F_Bo = [t_B; f_Bo]. The spatial force can be expressed in whatever basis is helpful (e.g., for computational efficiency or for humanmeaningful interpretation).
Similarly, there is a joint between links B and C. The set of forces on C by that mobilizer is equivalent to the spatial force F_Co = [t_C; f_Co], where t_C and f_Co have analogous meanings as above.
 Parameters

[in]  q  robot's joint angles (generalized coordinates). 
[in]  qDt  1sttimederivatives of q (q̇). 
[in]  qDDt  2ndtimederivatives of q (q̈). 
 Returns
 Machineprecision values as defined below.
std::tuple  Description 
F_Ao_Na  Spatial force on Ao from N, expressed in frame Na. 
F_Bo_Ab  Spatial force on Bo from A, expressed in frame Ab. 
F_Co_Bc  Spatial force on Co from B, expressed in frame Bc. 
F_Do_Cd  Spatial force on Do from C, expressed in frame Cd. 
F_Eo_De  Spatial force on Eo from D, expressed in frame De. 
F_Fo_Ef  Spatial force on Fo from E, expressed in frame Ef. 
F_Go_Fg  Spatial force on Go from F, expressed in frame Fg. 
Vector7d CalcRevoluteMotorZTorques 
( 
const Eigen::Ref< const VectorX< T >> & 
q, 


const Eigen::Ref< const VectorX< T >> & 
qDt, 


const Eigen::Ref< const VectorX< T >> & 
qDDt 

) 
 const 
This method calculates the torques for the 7 revolute motors that connect frames Na to A, Ab to B, Bc to C, ...
Fg to G. These torques arise from an inverse dynamics problem, namely each revolute motor specifies how its outboard mobilizer frame moves relative to its inboard mobilizer frame. Given these specified motion and the mass/inertia/geometry of the robot, one can do the inverse dynamics problem of calculating the motor torques.
For example, there is a zaxis revolute motor between ground N and link A that creates a torque tAz on A (tAz is the Az measure of the torque on A). Similarly, there is a torque tBz on B, tCz on C, ... tGz on G.
 Parameters

[in]  q  robot's joint angles (generalized coordinates). 
[in]  qDt  1sttimederivatives of q (q̇). 
[in]  qDDt  2ndtimederivatives of q (q̈). 
 Returns
 7x1 matrix of machineprecision values for the actuation (generalized) torques tAz, tBz, tCz, tDz, tEz, tFz, tGz.