- 3.0.2 models module.
InvertedPendulumWithActuatorCodeGen.cpp File Reference
#include <ct/rbd/rbd.h>
#include <cmath>
#include <memory>
#include <ct/models/InvertedPendulum/InvertedPendulum.h>
#include <ct/rbd/systems/FixBaseFDSystem.h>
#include <ct/models/CodegenOutputDirs.h>

Typedefs

using Scalar = ct::core::ADCodegenLinearizer< state_dim_full, njoints >::ADCGScalar
 
using SEADynamicsFirstOrderAD = ct::rbd::SEADynamicsFirstOrder< njoints, Scalar >
 
using InvertedPendulumDynamicsAD = ct::rbd::InvertedPendulum::tpl::Dynamics< Scalar >
 
using InvertedPendulumSystemAD = ct::rbd::FixBaseFDSystem< InvertedPendulumDynamicsAD, actuator_state_dim, false >
 
template<typename SCALAR >
using control_vector_t = typename ct::rbd::InvertedPendulum::tpl::Dynamics< SCALAR >::control_vector_t
 
template<typename SCALAR >
using ExtLinkForces_t = typename ct::rbd::InvertedPendulum::tpl::Dynamics< SCALAR >::ExtLinkForces_t
 

Functions

int main (int argc, char **argv)
 

Variables

const double K_SPRING = 180.9
 
const double R_GEAR = 50.0
 uniform spring constant More...
 
const size_t njoints = ct::rbd::InvertedPendulum::Kinematics::NJOINTS
 constant gear ratio More...
 
const size_t actuator_state_dim = 1
 
const size_t state_dim_full = 2 * njoints + actuator_state_dim
 

Typedef Documentation

◆ Scalar

using Scalar = ct::core::ADCodegenLinearizer<state_dim_full, njoints>::ADCGScalar

◆ SEADynamicsFirstOrderAD

◆ InvertedPendulumDynamicsAD

◆ InvertedPendulumSystemAD

◆ control_vector_t

◆ ExtLinkForces_t

template<typename SCALAR >
using ExtLinkForces_t = typename ct::rbd::InvertedPendulum::tpl::Dynamics<SCALAR>::ExtLinkForces_t

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

References K_SPRING, and R_GEAR.

Variable Documentation

◆ K_SPRING

const double K_SPRING = 180.9

In this file, derivative code including the actuator dynamics is generated.

Referenced by main().

◆ R_GEAR

const double R_GEAR = 50.0

uniform spring constant

Referenced by main().

◆ njoints

const size_t njoints = ct::rbd::InvertedPendulum::Kinematics::NJOINTS

constant gear ratio

◆ actuator_state_dim

const size_t actuator_state_dim = 1

◆ state_dim_full

const size_t state_dim_full = 2 * njoints + actuator_state_dim