PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
BulletModel Class Referencefinal

Public Member Functions

Construction
 BulletModel (MultiBody *const _mb, Robot *const _robot=nullptr)
 
 ~BulletModel ()
 
void Rebuild ()
 
Accessors
MultiBodyGetPMPLMultiBody () const noexcept
 Get the PMPL multibody.
 
btMultiBody * GetBulletMultiBody () const noexcept
 Get the bullet multibody.
 
Simulation Interface
Cfg GetState () const noexcept
 
void SetState (const Cfg &_c) noexcept
 
void Execute (const Control &_c) noexcept
 
void Execute (const ControlSet &_c) noexcept
 
void ZeroVelocities () noexcept
 
Dynamics World Helpers

These functions handle adding and removing this model from a bullet dynamics world.

void AddToDynamicsWorld (btMultiBodyDynamicsWorld *const _world)
 
void RemoveFromDynamicsWorld ()
 

Detailed Description

A model of a multibody within a bullet simulation.

This structure contains all of the components which make up a bullet multibody model, as well as functions for interfacing with it from PMPL.

Todo:
This model can currently only support robots with revolute joints. Nonactuated and spherical joints don't work right. One problem is that bullet indexes the number of joints while pmpl uses the number of dof, so some of our joint loops don't line up. Another is that bullet only supports 3-dof spherical joints with no way to constrain them.

Constructor & Destructor Documentation

◆ BulletModel()

BulletModel::BulletModel ( MultiBody *const  _mb,
Robot *const  _robot = nullptr 
)

Construct a bullet model of a PMPL multibody.

Parameters
_mbThe PMPL multibody.
_robotThe robot, if any. Static multibodies will not have this.

Member Function Documentation

◆ Rebuild()

void BulletModel::Rebuild ( )

Destroy and rebuild all internal bullet structures. This is intended for edit tools which need to update bullet models to match changes to the PMPL structures. Requires the model to already be part of a dynamics world, but must be done while the simulation isn't stepping.

◆ GetState()

Cfg BulletModel::GetState ( ) const
noexcept

Get the current configuration of the bullet model. Does not work for static multibodies.

◆ SetState()

void BulletModel::SetState ( const Cfg _c)
noexcept

Set the current configuration of the bullet model. Does not work for static multibodies.

Parameters
_cThe configuration to set.

◆ Execute() [1/2]

void BulletModel::Execute ( const Control _c)
noexcept

Execute a control on the bullet model for the next time step.

Parameters
_cThe control to apply.

◆ Execute() [2/2]

void BulletModel::Execute ( const ControlSet &  _c)
noexcept

Execute a set of controls on the bullet model for the next time step.

Parameters
_cThe controls to apply.

◆ ZeroVelocities()

void BulletModel::ZeroVelocities ( )
noexcept

Set all velocities on the bullet model to zero. This does NOT respect the mechanics models and should only be used for initialization and debugging.


The documentation for this class was generated from the following files: