Drake
Simulation

Algorithms for simulating dynamical systems. More...

Functions

template<typename System >
void runLCM (std::shared_ptr< System > sys, std::shared_ptr< lcm::LCM > lcm, double t0, double tf, const typename System::template StateVector< double > &x0, const SimulationOptions &options=default_simulation_options)
 runLCM More...
 
template<typename System >
double simulate (const System &sys, double ti, double tf, const typename System::template StateVector< double > &xi, const SimulationOptions &options)
 simulate More...
 
template<typename System >
void simulate (const System &sys, double t0, double tf, const typename System::template StateVector< double > &x0)
 simulate More...
 
template<typename System >
void simulate (const System &sys, double t0, double tf)
 simulate More...
 

Detailed Description

Algorithms for simulating dynamical systems.

rigidBodyLCMNode Application

Loads a urdf/sdf and simulates it, subscribing to LCM inputs and publishing LCM outputsThis application loads a robot from urdf or sdf and runs a simulation, with every input with an LCM type defined subscribed to the associated LCM channels, and every output with an LCM type defined publishing on the associate channels. See LCMVector<ScalarType> Concept.
Usage:  rigidBodyLCMNode [options] full_path_to_urdf_or_sdf_file
  with (case sensitive) options:
    --base [floating_type]  // can be "FIXED, ROLLPITCHYAW, or QUATERNION"
(default: QUATERNION)

Function Documentation

void Drake::runLCM ( std::shared_ptr< System >  sys,
std::shared_ptr< lcm::LCM >  lcm,
double  t0,
double  tf,
const typename System::template StateVector< double > &  x0,
const SimulationOptions options = default_simulation_options 
)

runLCM

Simulates the system with the (exposed) inputs being read from LCM and the output being published to LCM.

The input and output vector types must overload a publishLCM namespace method; the default for new vectors is to not publish anything.

Here is the call graph for this function:

Here is the caller graph for this function:

double Drake::simulate ( const System &  sys,
double  ti,
double  tf,
const typename System::template StateVector< double > &  xi,
const SimulationOptions options 
)

simulate

Runs a simulation given a model, it's initial conditions, and a number of simulation parameters

Currently runs with a fixed step integrator using the initial step size in options and stepping from initial time ti to final time tf. There is no error control; if you have accuracy or stability problems try a smaller step size.

Parameters
sysThe system being simulated.
tiThe initial time of the simulation.
tfThe final time of the simulation.
xiThe state vector of the system being simulated.
optionsThe simulation options.
Returns
The final simulation time.

Here is the call graph for this function:

Here is the caller graph for this function:

void Drake::simulate ( const System &  sys,
double  t0,
double  tf,
const typename System::template StateVector< double > &  x0 
)

simulate

Runs a simulation using the default simulation options

Here is the call graph for this function:

void Drake::simulate ( const System &  sys,
double  t0,
double  tf 
)

simulate

Runs a simulation using the default simulation options

Here is the call graph for this function: