ROBOOP, A Robotics Object Oriented Package in C++
|
This is an example of customize Dynamics class. More...
Public Member Functions | |
New_dynamics (Robot_basic *robot_) | |
Constructor. | |
virtual void | plot () |
Customize plot function. More... | |
Public Member Functions inherited from Dynamics | |
Dynamics (Robot_basic *robot_) | |
Constructor. | |
void | set_dof (Robot_basic *robot_) |
Set the degree of freedom. More... | |
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. More... | |
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. | |
ReturnMatrix | xdot (const Matrix &xin) |
Obtain state derivative. More... | |
Public Attributes | |
Robot_basic * | robot |
bool | first_pass_plot |
RowVector | tout |
Matrix | xout |
int | i |
Public Attributes inherited from Dynamics | |
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 | qppd |
Desired joints accelerations. | |
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_basic * | robot |
Pointer on Robot_basic class. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Dynamics | |
static Dynamics * | Instance () |
A pointer to Dynamics instance. Pointer is 0 if there is no instance (logic done in Constructor). | |
Static Public Attributes inherited from Dynamics | |
static Dynamics * | instance = 0 |
Static pointer on Dynamics class. | |
This is an example of customize Dynamics class.
This class enherite from Dynamics class. At every time frame the new virtual plot functions record the current time and the robot joints positions. The data can then be used to create a plot.
Definition at line 60 of file demo_2dof_pd.cpp.
|
virtual |
Customize plot function.
Record the time (tout) and the joints positions (xout). This member function is call by the member function xdot.
Reimplemented from Dynamics.
Definition at line 91 of file demo_2dof_pd.cpp.
References first_pass_plot, i, Dynamics::nsteps, robot, Dynamics::tf_cont, Dynamics::time, Dynamics::to, tout, Dynamics::x, and xout.
bool New_dynamics::first_pass_plot |
First time in plot function.
Definition at line 67 of file demo_2dof_pd.cpp.
Referenced by New_dynamics(), and plot().
int New_dynamics::i |
Temporary index.
Definition at line 70 of file demo_2dof_pd.cpp.
Referenced by New_dynamics(), and plot().
Robot_basic* New_dynamics::robot |
Robot_basic pointer.
Definition at line 66 of file demo_2dof_pd.cpp.
Referenced by New_dynamics(), and plot().
RowVector New_dynamics::tout |
Matrix New_dynamics::xout |