Drake
|
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... | |
Algorithms for simulating dynamical systems.
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)
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.
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.
sys | The system being simulated. |
ti | The initial time of the simulation. |
tf | The final time of the simulation. |
xi | The state vector of the system being simulated. |
options | The simulation options. |
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