Drake's core library has 3 big parts:
Drake provides tools to model the physics of a dynamic system, which can be used for analysis and simulation.
Drake's system modeling works like Matlab Simulink. Drake constructs complex systems from blocks called
systemhas input/output ports that could be connected with other systems. A
systemblock can be a
leafsystemis the minimum build block, and a
diagramis composed of multiple
leafsystemfunctions as basic components in robotics systems, such as signals, sensors, controllers, planners, etc.
diagramto represent compound
diagraminternally contain several connected subsystems.
diagramitself is a
systemand can be nested. The root diagram contains all the subsystems and subdiagrams.
The main function in Drake usually starts from a blank root
systemsare added to the root
diagramand connected through their input/output ports.
contextcontains the data of system states and parameters cached in a separate place. Each
systemhas its own
diagramare the only information a
simulatorrequires to simulate. Given the
context, all methods called on a
systemshould be completely deterministic and repeatable (Ref. Underactuated Robotics textbook).
Drake has a method
diagram->CreateDefaultContext()to create the context with default values for all the subsystems. Values in the context, such as the initial state and the initial time, can be independently set before the simulation begins.
A context can have continuous state, discrete state, and abstract variable. Based on the variable type, the simulator would update the context data by either numerically integrating the continuous derivative or updating the states using state-space dynamics.
Drake is a simulation software. The Drake
simulatortakes in the system
diagramtogether with its
contextto simulate by updating parameters such as integral continuous state derivatives, compute discrete state updates, allocates the various outputs of a
Drake incorporates famous and useful optimization tools, for example, Gurobi, SNOPT, IPOPT, SCS, MOSEK. These tools help to solve mathematical problems in robotics, such as motion planning and control.
To use Mathematical Programming, there is a very good starting point written in python. The same idea applies to C++.
Multibody means multiple rigid bodies connected in an articulated structure. The root
diagramthat contains a unique
MultibodyPlantis considered as a robotic system.
MultibodyPlantinternally uses rigid body tree algorithms to compute the robot's kinematics, dynamics, jacobian, etc.
system. So it has input/output ports that could be connected to other systems like controllers and visualizers.
A convenient technique to compute Derivative. Computing Integral is trivial and computing Derivative is non-trivial. AutoDiff is a good solution that Eigen provides to solve the derivative.
LCM is a multi-process communication tool. LCM is everywhere in Drake. It serves as the bridge between system ports, so all the communications between systems are transported using LCM, which can be inspected by LCM spy tool.
A handy tool that parses XML files, enables Drake to parse URDF and SDF, thus creating
Drake uses VTK as a geometry rendering tool. The Drake visualizer communicates with the simulator through LCM.