Homepage Demos Overview Downloads Tutorials Reference
Credits

ROBOOP::Dynamics Class Reference

#include <dynamics_sim.h>

List of all members.


Detailed Description

Dynamics simulation handling class.

Definition at line 57 of file dynamics_sim.h.

Public Member Functions

 Dynamics (Robot_basic *robot_)
 Constructor.
virtual ~Dynamics ()
void set_dof (Robot_basic *robot_)
 Set the degree of freedom.
short set_controller (const Control_Select &x)
 Set the control variable from the Control_Select reference.
short set_trajectory (const Trajectory_Select &x)
 Set the path_select variable from the Trajectory_Select reference.
ReturnMatrix set_robot_on_first_point_of_splines ()
 Set the robot on first point of trajectory.
void set_time_frame (const int nsteps)
 Set the number of iterations.
void set_final_time (const double tf)
 Set the file time.
void reset_time ()
 Set the simulation time to the inital time.
void Runge_Kutta4_Real_time ()
 Runge Kutta solver for real time.
void Runge_Kutta4 ()
 Runge Kutta solver.
virtual void plot ()
 Virtual plot functions.
ReturnMatrix xdot (const Matrix &xin)
 Obtain state derivative.

Static Public Member Functions

DynamicsInstance ()
 A pointer to Dynamics instance. Pointer is 0 if there is no instance (logic done in Constructor).

Public Attributes

bool first_pass_Kutta
 First time in all Runge_Kutta4 functions.
int ndof
 Degree of freedom.
int dof_fix
 Degree of freedom + virtual link.
int nsteps
 Numbers of iterations between.
double h
 Runge Kutta temporary variable.
double h2
 Runge Kutta temporary variable.
double time
 Time during simulation.
double to
 Initial simulation time.
double tf
 Final time used in Runge_Kutta4_Real_time.
double tf_cont
 Final time used in Runge_Kutta4.
double dt
 Time frame.
Matrix k1
 Runge Kutta temporary variable.
Matrix k2
 Runge Kutta temporary variable.
Matrix k3
 Runge Kutta temporary variable.
Matrix k4
 Runge Kutta temporary variable.
Matrix x
 Stated vector obtain in Runge Kutta functions.
Matrix xd
 Statd vector derivative obtaint in xdot function.
ColumnVector q
 Joints positions.
ColumnVector qp
 Joints velocities.
ColumnVector qpp
 Joints accelerations.
ColumnVector qd
 Desired joints positions.
ColumnVector qpd
 Desired joints velocities.
ColumnVector tau
 Controller output torque.
ColumnVector pd
 Desired end effector cartesian position.
ColumnVector ppd
 Desired end effector cartesian velocity.
ColumnVector pppd
 Desired end effector cartesian acceleration.
ColumnVector wd
 Desired end effector cartesian angular velocity.
ColumnVector wpd
 Desired end effector cartesian angular acceleration.
Quaternion quatd
 Desired orientation express by a quaternion.
Control_Select control
 Instance of Control_Select class.
Trajectory_Select path_select
 Instance of Trajectory_Select class.
Robot_basicrobot
 Pointer on Robot_basic class.

Static Public Attributes

Dynamicsinstance = 0
 Static pointer on Dynamics class.


Constructor & Destructor Documentation

ROBOOP::Dynamics::Dynamics Robot_basic robot_  ) 
 

Constructor.

Definition at line 47 of file dynamics_sim.cpp.

virtual ROBOOP::Dynamics::~Dynamics  )  [inline, virtual]
 

Definition at line 61 of file dynamics_sim.h.


Member Function Documentation

Dynamics * ROBOOP::Dynamics::Instance  )  [static]
 

A pointer to Dynamics instance. Pointer is 0 if there is no instance (logic done in Constructor).

Definition at line 88 of file dynamics_sim.cpp.

virtual void ROBOOP::Dynamics::plot  )  [inline, virtual]
 

Virtual plot functions.

Definition at line 74 of file dynamics_sim.h.

Referenced by xdot().

void ROBOOP::Dynamics::reset_time  ) 
 

Set the simulation time to the inital time.

Definition at line 141 of file dynamics_sim.cpp.

void ROBOOP::Dynamics::Runge_Kutta4  ) 
 

Runge Kutta solver.

Definition at line 340 of file dynamics_sim.cpp.

void ROBOOP::Dynamics::Runge_Kutta4_Real_time  ) 
 

Runge Kutta solver for real time.

Definition at line 318 of file dynamics_sim.cpp.

short ROBOOP::Dynamics::set_controller const Control_Select x  ) 
 

Set the control variable from the Control_Select reference.

Definition at line 147 of file dynamics_sim.cpp.

void ROBOOP::Dynamics::set_dof Robot_basic robot_  ) 
 

Set the degree of freedom.

Obtain the degree of freedom from Robot_basic pointer. Some vectors will be resize with new current dof value.

Definition at line 97 of file dynamics_sim.cpp.

void ROBOOP::Dynamics::set_final_time const double  tf  ) 
 

Set the file time.

Definition at line 135 of file dynamics_sim.cpp.

ReturnMatrix ROBOOP::Dynamics::set_robot_on_first_point_of_splines  ) 
 

Set the robot on first point of trajectory.

Assigned the robot joints position to the first point of the trajectory if the latter is expressed in joint space, or assigned the robot joints position via inverse kinematics if the trajectory is expressed in cartesian space. The function return a message on the console if the format of the trajectory file is incorrect.

Definition at line 176 of file dynamics_sim.cpp.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

void ROBOOP::Dynamics::set_time_frame const int  nsteps  ) 
 

Set the number of iterations.

Definition at line 129 of file dynamics_sim.cpp.

short ROBOOP::Dynamics::set_trajectory const Trajectory_Select x  ) 
 

Set the path_select variable from the Trajectory_Select reference.

Definition at line 160 of file dynamics_sim.cpp.

ReturnMatrix ROBOOP::Dynamics::xdot const Matrix x  ) 
 

Obtain state derivative.

Parameters:
x: state vector (joint speed and joint velocity).
The controller torque is applied if any controller has been selected, then the joint acceleration is obtained.

Definition at line 238 of file dynamics_sim.cpp.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().


Member Data Documentation

Control_Select ROBOOP::Dynamics::control
 

Instance of Control_Select class.

Definition at line 108 of file dynamics_sim.h.

Referenced by set_controller(), set_trajectory(), and xdot().

int ROBOOP::Dynamics::dof_fix
 

Degree of freedom + virtual link.

Definition at line 81 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), and xdot().

double ROBOOP::Dynamics::dt
 

Time frame.

Definition at line 84 of file dynamics_sim.h.

Referenced by Dynamics(), and xdot().

bool ROBOOP::Dynamics::first_pass_Kutta
 

First time in all Runge_Kutta4 functions.

Definition at line 79 of file dynamics_sim.h.

Referenced by Dynamics(), reset_time(), Runge_Kutta4_Real_time(), and set_dof().

double ROBOOP::Dynamics::h
 

Runge Kutta temporary variable.

Definition at line 84 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

double ROBOOP::Dynamics::h2
 

Runge Kutta temporary variable.

Definition at line 84 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

Dynamics * ROBOOP::Dynamics::instance = 0 [static]
 

Static pointer on Dynamics class.

Definition at line 40 of file dynamics_sim.cpp.

Referenced by Dynamics().

Matrix ROBOOP::Dynamics::k1
 

Runge Kutta temporary variable.

Definition at line 91 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

Matrix ROBOOP::Dynamics::k2
 

Runge Kutta temporary variable.

Definition at line 91 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

Matrix ROBOOP::Dynamics::k3
 

Runge Kutta temporary variable.

Definition at line 91 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

Matrix ROBOOP::Dynamics::k4
 

Runge Kutta temporary variable.

Definition at line 91 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

int ROBOOP::Dynamics::ndof
 

Degree of freedom.

Definition at line 81 of file dynamics_sim.h.

Referenced by Dynamics(), set_controller(), set_dof(), set_robot_on_first_point_of_splines(), and xdot().

int ROBOOP::Dynamics::nsteps
 

Numbers of iterations between.

Definition at line 81 of file dynamics_sim.h.

Referenced by Dynamics(), and set_time_frame().

Trajectory_Select ROBOOP::Dynamics::path_select
 

Instance of Trajectory_Select class.

Definition at line 109 of file dynamics_sim.h.

Referenced by set_robot_on_first_point_of_splines(), set_trajectory(), and xdot().

ColumnVector ROBOOP::Dynamics::pd
 

Desired end effector cartesian position.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::ppd
 

Desired end effector cartesian velocity.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::pppd
 

Desired end effector cartesian acceleration.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::q
 

Joints positions.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::qd
 

Desired joints positions.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::qp
 

Joints velocities.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), and xdot().

ColumnVector ROBOOP::Dynamics::qpd
 

Desired joints velocities.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::qpp
 

Joints accelerations.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), and xdot().

Quaternion ROBOOP::Dynamics::quatd
 

Desired orientation express by a quaternion.

Definition at line 107 of file dynamics_sim.h.

Referenced by set_robot_on_first_point_of_splines(), and xdot().

Robot_basic* ROBOOP::Dynamics::robot
 

Pointer on Robot_basic class.

Definition at line 110 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::tau
 

Controller output torque.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_dof(), and xdot().

double ROBOOP::Dynamics::tf
 

Final time used in Runge_Kutta4_Real_time.

Definition at line 84 of file dynamics_sim.h.

Referenced by Dynamics(), and Runge_Kutta4_Real_time().

double ROBOOP::Dynamics::tf_cont
 

Final time used in Runge_Kutta4.

Definition at line 84 of file dynamics_sim.h.

Referenced by Dynamics(), Runge_Kutta4(), set_final_time(), and set_robot_on_first_point_of_splines().

double ROBOOP::Dynamics::time
 

Time during simulation.

Definition at line 84 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), Runge_Kutta4_Real_time(), and xdot().

double ROBOOP::Dynamics::to
 

Initial simulation time.

Definition at line 84 of file dynamics_sim.h.

Referenced by Dynamics().

ColumnVector ROBOOP::Dynamics::wd
 

Desired end effector cartesian angular velocity.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), set_robot_on_first_point_of_splines(), and xdot().

ColumnVector ROBOOP::Dynamics::wpd
 

Desired end effector cartesian angular acceleration.

Definition at line 97 of file dynamics_sim.h.

Referenced by Dynamics(), and xdot().

Matrix ROBOOP::Dynamics::x
 

Stated vector obtain in Runge Kutta functions.

Definition at line 91 of file dynamics_sim.h.

Referenced by Runge_Kutta4(), and Runge_Kutta4_Real_time().

Matrix ROBOOP::Dynamics::xd
 

Statd vector derivative obtaint in xdot function.

Definition at line 91 of file dynamics_sim.h.

Referenced by xdot().


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

ROBOOP v1.21a
Generated Tue Oct 19 14:18:30 2004 by Doxygen 1.3.9.1