spatial-dyn
Functions
Simulation

Functions

void spatial_dyn::Integrate (ArticulatedBody &ab, const Eigen::VectorXd &tau, double dt, const std::map< size_t, SpatialForced > &f_external, const IntegrationOptions &options)
 

Detailed Description

C++ implementation of spatial_dyn simulation utilities.

See also
Python: py_simulation

Function Documentation

◆ Integrate()

void spatial_dyn::Integrate ( ArticulatedBody ab,
const Eigen::VectorXd &  tau,
double  dt,
const std::map< size_t, SpatialForced > &  f_external = {},
const IntegrationOptions options = {} 
)

Apply the commanded joint torques and integrate by the given timestep to get the robot's next state.

Computes the robot's acceleration with forward dynamics and integrates the resulting acceleration along with robot's velocity by one timestep to get the robot's next position and velocity. The forward dynamics algorithm and integration method can be specified in the options.

Parameters
abArticulatedBody.
tauCommanded joint torques.
dtIntegration timestep.
f_externalMap of (index, force) pairs where the force is the sum of all external spatial forces (represented in the world frame) applied to the associated rigid body index.
optionsIntegrationOptions.
See also
Python: spatialdyn.integrate()