Multi-body articulated system made from rigid links and joints.
More...
#include <rigid_assembly.hpp>
Multi-body articulated system made from rigid links and joints.
Physics principle: an assembly forms a constrained rigid-body graph where each joint removes degrees of freedom and the solver enforces those constraints through impulses each step.
Reference: https://en.wikipedia.org/wiki/Multibody_system
◆ RigidAssembly()
| frcsim::RigidAssembly::RigidAssembly |
( |
| ) |
|
|
default |
◆ addBody()
| RigidBody * frcsim::RigidAssembly::addBody |
( |
double | mass_kg | ) |
|
Add a body to this assembly (takes ownership).
◆ addFixedJoint()
| FixedJoint * frcsim::RigidAssembly::addFixedJoint |
( |
size_t | body_a_idx, |
|
|
size_t | body_b_idx ) |
◆ addPrismaticJoint()
| PrismaticJoint * frcsim::RigidAssembly::addPrismaticJoint |
( |
size_t | body_a_idx, |
|
|
size_t | body_b_idx, |
|
|
const Vector3 & | axis_local ) |
◆ addRevoluteJoint()
| RevoluteJoint * frcsim::RigidAssembly::addRevoluteJoint |
( |
size_t | body_a_idx, |
|
|
size_t | body_b_idx, |
|
|
const Vector3 & | axis_local ) |
Create joints between bodies in this assembly.
◆ bodies() [1/2]
| std::vector< RigidBody > & frcsim::RigidAssembly::bodies |
( |
| ) |
|
|
inline |
◆ bodies() [2/2]
| const std::vector< RigidBody > & frcsim::RigidAssembly::bodies |
( |
| ) |
const |
|
inline |
◆ centerOfMass()
| Vector3 frcsim::RigidAssembly::centerOfMass |
( |
| ) |
const |
Compute assembly center of mass in world space.
◆ enableConstraints()
| void frcsim::RigidAssembly::enableConstraints |
( |
bool | enable | ) |
|
Disable/enable all constraints in assembly.
◆ joints() [1/2]
| std::vector< std::shared_ptr< JointBase > > & frcsim::RigidAssembly::joints |
( |
| ) |
|
|
inline |
◆ joints() [2/2]
| const std::vector< std::shared_ptr< JointBase > > & frcsim::RigidAssembly::joints |
( |
| ) |
const |
|
inline |
◆ rootBodyIndex()
| size_t frcsim::RigidAssembly::rootBodyIndex |
( |
| ) |
const |
|
inline |
◆ setRootBodyIndex()
| void frcsim::RigidAssembly::setRootBodyIndex |
( |
size_t | idx | ) |
|
Mark one body as the "root" or primary reference (no physical meaning, just organization)
◆ solveConstraints()
| void frcsim::RigidAssembly::solveConstraints |
( |
double | dt_s, |
|
|
int | iterations ) |
◆ totalMass()
| double frcsim::RigidAssembly::totalMass |
( |
| ) |
const |
The documentation for this class was generated from the following file: