#include <robot.h>
Inheritance diagram for Robot_basic:

Definition at line 216 of file robot.h.
Public Member Functions | |
| Robot_basic (const int ndof=1, const bool dh_parameter=false, const bool min_inertial_para=false) | |
| Constructor. | |
| Robot_basic (const Matrix &initrobot_motor, const bool dh_parameter=false, const bool min_inertial_para=false) | |
| Constructor. | |
| Robot_basic (const Matrix &initrobot, const Matrix &initmotor, const bool dh_parameter=false, const bool min_inertial_para=false) | |
| Constructor. | |
| Robot_basic (const std::string &filename, const std::string &robotName, const bool dh_parameter=false, const bool min_inertial_para=false) | |
| Robot_basic (const Robot_basic &x) | |
| Copy constructor. | |
| virtual | ~Robot_basic () |
| Destructor. | |
| Robot_basic & | operator= (const Robot_basic &x) |
| Overload = operator. | |
| Real | get_q (const int i) const |
| bool | get_DH () const |
| Return true if in DH notation, false otherwise. | |
| int | get_dof () const |
| Return dof. | |
| int | get_available_dof () const |
| Counts number of currently non-immobile links. | |
| int | get_available_dof (const int endlink) const |
| Counts number of currently non-immobile links up to and including endlink. | |
| int | get_fix () const |
| Return fix. | |
| ReturnMatrix | get_q (void) const |
| Return the joint position vector. | |
| ReturnMatrix | get_qp (void) const |
| Return the joint velocity vector. | |
| ReturnMatrix | get_qpp (void) const |
| Return the joint acceleration vector. | |
| ReturnMatrix | get_available_q (void) const |
| Return the joint position vector of available (non-immobile) joints. | |
| ReturnMatrix | get_available_qp (void) const |
| Return the joint velocity vector of available (non-immobile) joints. | |
| ReturnMatrix | get_available_qpp (void) const |
| Return the joint acceleration vector of available (non-immobile) joints. | |
| ReturnMatrix | get_available_q (const int endlink) const |
| Return the joint position vector of available (non-immobile) joints up to and including endlink. | |
| ReturnMatrix | get_available_qp (const int endlink) const |
| Return the joint velocity vector of available (non-immobile) joints up to and including endlink. | |
| ReturnMatrix | get_available_qpp (const int endlink) const |
| Return the joint acceleration vector of available (non-immobile) joints up to and including endlink. | |
| void | set_q (const ColumnVector &q) |
| Set the joint position vector. | |
| void | set_q (const Matrix &q) |
| Set the joint position vector. | |
| void | set_q (const Real q, const int i) |
| void | set_qp (const ColumnVector &qp) |
| Set the joint velocity vector. | |
| void | set_qpp (const ColumnVector &qpp) |
| Set the joint acceleration vector. | |
| void | kine (Matrix &Rot, ColumnVector &pos) const |
| Direct kinematics at end effector. | |
| void | kine (Matrix &Rot, ColumnVector &pos, const int j) const |
| Direct kinematics at end effector. | |
| ReturnMatrix | kine (void) const |
| Return the end effector direct kinematics transform matrix. | |
| ReturnMatrix | kine (const int j) const |
| Return the frame j direct kinematics transform matrix. | |
| ReturnMatrix | kine_pd (const int ref=0) const |
| Direct kinematics with velocity. | |
| virtual void | kine_pd (Matrix &Rot, ColumnVector &pos, ColumnVector &pos_dot, const int ref) const=0 |
| virtual void | robotType_inv_kin ()=0 |
| virtual ReturnMatrix | inv_kin (const Matrix &Tobj, const int mj=0) |
| Numerical inverse kinematics. See inv_kin(const Matrix & Tobj, const int mj, const int endlink, bool & converge). | |
| ReturnMatrix | inv_kin (const Matrix &Tobj, const int mj, bool &converge) |
| virtual ReturnMatrix | inv_kin (const Matrix &Tobj, const int mj, const int endlink, bool &converge) |
| Numerical inverse kinematics. | |
| virtual ReturnMatrix | inv_kin_rhino (const Matrix &Tobj, bool &converge)=0 |
| virtual ReturnMatrix | inv_kin_puma (const Matrix &Tobj, bool &converge)=0 |
| virtual ReturnMatrix | inv_kin_schilling (const Matrix &Tobj, bool &converge)=0 |
| virtual ReturnMatrix | jacobian (const int ref=0) const |
| Jacobian of mobile links expressed at frame ref. | |
| virtual ReturnMatrix | jacobian (const int endlink, const int ref) const=0 |
| virtual ReturnMatrix | jacobian_dot (const int ref=0) const=0 |
| ReturnMatrix | jacobian_DLS_inv (const double eps, const double lambda_max, const int ref=0) const |
| Inverse Jacobian based on damped least squares inverse. | |
| virtual void | dTdqi (Matrix &dRot, ColumnVector &dp, const int i)=0 |
| virtual ReturnMatrix | dTdqi (const int i)=0 |
| ReturnMatrix | acceleration (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &tau) |
| Joints acceleration without contact force. | |
| ReturnMatrix | acceleration (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &tau, const ColumnVector &Fext, const ColumnVector &Next) |
| Joints acceleration. | |
| ReturnMatrix | inertia (const ColumnVector &q) |
| Inertia of the manipulator. | |
| virtual ReturnMatrix | torque_novelocity (const ColumnVector &qpp)=0 |
| virtual ReturnMatrix | torque (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &qpp)=0 |
| virtual ReturnMatrix | torque (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &qpp, const ColumnVector &Fext_, const ColumnVector &Next_)=0 |
| virtual void | delta_torque (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &qpp, const ColumnVector &dq, const ColumnVector &dqp, const ColumnVector &dqpp, ColumnVector &torque, ColumnVector &dtorque)=0 |
| virtual void | dq_torque (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &qpp, const ColumnVector &dq, ColumnVector &torque, ColumnVector &dtorque)=0 |
| virtual void | dqp_torque (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &dqp, ColumnVector &torque, ColumnVector &dtorque)=0 |
| ReturnMatrix | dtau_dq (const ColumnVector &q, const ColumnVector &qp, const ColumnVector &qpp) |
Sensitivity of the dynamics with respect to . | |
| ReturnMatrix | dtau_dqp (const ColumnVector &q, const ColumnVector &qp) |
Sensitivity of the dynamics with respect to . | |
| virtual ReturnMatrix | G ()=0 |
| virtual ReturnMatrix | C (const ColumnVector &qp)=0 |
| void | error (const std::string &msg1) const |
Public Attributes | |
| ColumnVector * | w |
| ColumnVector * | wp |
| ColumnVector * | vp |
| ColumnVector * | a |
| ColumnVector * | f |
| ColumnVector * | f_nv |
| ColumnVector * | n |
| ColumnVector * | n_nv |
| ColumnVector * | F |
| ColumnVector * | N |
| ColumnVector * | p |
| ColumnVector * | pp |
| ColumnVector * | dw |
| ColumnVector * | dwp |
| ColumnVector * | dvp |
| ColumnVector * | da |
| ColumnVector * | df |
| ColumnVector * | dn |
| ColumnVector * | dF |
| ColumnVector * | dN |
| ColumnVector * | dp |
| ColumnVector | z0 |
| Axis vector at each joint. | |
| ColumnVector | gravity |
| Gravity vector. | |
| Matrix * | R |
| Temprary rotation matrix. | |
| Link * | links |
| Pointer on Link cclass. | |
Private Types | |
| enum | EnumRobotType { DEFAULT = 0, RHINO = 1, PUMA = 2, SCHILLING = 3 } |
| enum EnumRobotType More... | |
Private Member Functions | |
| void | cleanUpPointers () |
| Free all vectors and matrix memory. | |
Private Attributes | |
| EnumRobotType | robotType |
| Robot type. | |
| int | dof |
| Degree of freedom. | |
| int | fix |
| Virtual link, used with modified DH notation. | |
Friends | |
| class | Robot |
| class | mRobot |
| class | mRobot_min_para |
| class | Robotgl |
| class | mRobotgl |
enum Robot_basic::EnumRobotType [private] |
| Robot_basic::Robot_basic | ( | const int | ndof = 1, |
|
| const bool | dh_parameter = false, |
|||
| const bool | min_inertial_para = false | |||
| ) |
Constructor.
| ndof,: | Robot degree of freedom. | |
| dh_parameter,: | true if DH notation, false if modified DH notation. | |
| min_inertial_para,: | true inertial parameter are in minimal form. |
Definition at line 573 of file robot.cpp.
References a, cleanUpPointers(), da, dF, df, dN, dn, dof, dp, dvp, dw, dwp, F, f, f_nv, fix, GRAVITY, gravity, links, N, n, n_nv, p, pp, R, threebythreeident, vp, w, wp, and z0.
| Robot_basic::Robot_basic | ( | const Matrix & | dhinit, | |
| const bool | dh_parameter = false, |
|||
| const bool | min_inertial_para = false | |||
| ) |
Constructor.
| dhinit,: | Robot initialization matrix. | |
| dh_parameter,: | true if DH notation, false if modified DH notation. | |
| min_inertial_para,: | true inertial parameter are in minimal form. |
Definition at line 343 of file robot.cpp.
References a, cleanUpPointers(), da, dF, df, dN, dn, dof, dp, dvp, dw, dwp, F, f, f_nv, fix, GRAVITY, gravity, links, N, n, n_nv, p, pp, R, threebythreeident, vp, w, wp, and z0.
| Robot_basic::Robot_basic | ( | const Matrix & | initrobot, | |
| const Matrix & | initmotor, | |||
| const bool | dh_parameter = false, |
|||
| const bool | min_inertial_para = false | |||
| ) |
Constructor.
| initrobot,: | Robot initialization matrix. | |
| initmotor,: | Motor initialization matrix. | |
| dh_parameter,: | true if DH notation, false if modified DH notation. | |
| min_inertial_para,: | true inertial parameter are in minimal form. |
Definition at line 451 of file robot.cpp.
References a, cleanUpPointers(), da, dF, df, dN, dn, dof, dp, dvp, dw, dwp, F, f, f_nv, fix, GRAVITY, gravity, links, N, n, n_nv, p, pp, R, threebythreeident, vp, w, wp, and z0.
| Robot_basic::~Robot_basic | ( | ) | [virtual] |
Destructor.
Free all vectors and matrix memory.
Definition at line 879 of file robot.cpp.
References cleanUpPointers().
| Real Robot_basic::get_q | ( | const int | i | ) | const [inline] |
Definition at line 235 of file robot.h.
Referenced by Clik::Clik(), dynamics_demo(), kinematics_demo(), Dynamics::set_robot_on_first_point_of_splines(), Proportional_Derivative::torque_cmd(), Computed_torque_method::torque_cmd(), and Resolved_acc::torque_cmd().
| void Robot_basic::set_q | ( | const ColumnVector & | q | ) |
Set the joint position vector.
Set the joint position vector and recalculate the orientation matrix R and the position vector p (see Link class). Print an error if the size of q is incorrect.
Definition at line 1137 of file robot.cpp.
References dof, get_available_dof(), links, Link::p, p, and R.
Referenced by mRobot_min_para::delta_torque(), mRobot::delta_torque(), Robot::delta_torque(), mRobot_min_para::dq_torque(), mRobot::dq_torque(), Robot::dq_torque(), mRobot_min_para::dqp_torque(), mRobot::dqp_torque(), Robot::dqp_torque(), dynamics_demo(), Clik::endeff_pos_ori_err(), inertia(), inv_kin(), kinematics_demo(), main(), Clik::q_qdot(), Dynamics::set_robot_on_first_point_of_splines(), mRobot_min_para::torque(), mRobot::torque(), Robot::torque(), and Dynamics::xdot().
| void Robot_basic::set_q | ( | const Matrix & | q | ) |
| void Robot_basic::set_q | ( | const Real | q, | |
| const int | i | |||
| ) | [inline] |
| void Robot_basic::kine | ( | Matrix & | Rot, | |
| ColumnVector & | pos | |||
| ) | const |
Direct kinematics at end effector.
| Rot,: | End effector orientation. | |
| pos,: | Enf effector position. |
Definition at line 92 of file kinemat.cpp.
Referenced by Clik::endeff_pos_ori_err(), Impedance::Impedance(), kinematics_demo(), and main().
| void Robot_basic::kine | ( | Matrix & | Rot, | |
| ColumnVector & | pos, | |||
| const int | j | |||
| ) | const |
Direct kinematics at end effector.
| Rot,: | Frame j orientation. | |
| pos,: | Frame j position. | |
| j,: | Selected frame. |
Definition at line 102 of file kinemat.cpp.
| ReturnMatrix Robot_basic::kine_pd | ( | const int | j = 0 |
) | const |
Direct kinematics with velocity.
Return a
matrix. The first three columns are the frame j to the base rotation, the fourth column is the frame j w.r.t to the base postion vector and the last column is the frame j w.r.t to the base translational velocity vector. Print an error on the console if j is out of range.
Definition at line 142 of file kinemat.cpp.
| ReturnMatrix Robot_basic::inv_kin | ( | const Matrix & | Tobj, | |
| const int | mj, | |||
| const int | endlink, | |||
| bool & | converge | |||
| ) | [virtual] |
Numerical inverse kinematics.
| Tobj,: | Transformation matrix expressing the desired end effector pose. | |
| mj,: | Select algorithm type, 0: based on Jacobian, 1: based on derivative of T. | |
| converge,: | Indicate if the algorithm converge. | |
| endlink,: | the link to pretend is the end effector |
Reimplemented in Robot, mRobot, and mRobot_min_para.
Definition at line 91 of file invkine.cpp.
References dof, get_available_dof(), get_available_q(), ITOL, jacobian(), kine(), links, M_PI, NITMAX, and set_q().
| ReturnMatrix Robot_basic::jacobian_DLS_inv | ( | const double | eps, | |
| const double | lambda_max, | |||
| const int | ref = 0 | |||
| ) | const |
Inverse Jacobian based on damped least squares inverse.
| eps,: | Range of singular region. | |
| lambda_max,: | Value to obtain a good solution in singular region. | |
| ref,: | Selected frame (ex: joint 4). |
where
and
is a damping factor and the identity matrix respectively. Based on SVD (Singular Value Decomposition) the Jacobian is
, where
,
and
are respectively the input vector, the ouput vector and the singular values (
,
is the rank of J). Using the previous equations we obtain
A singular region, based on the smallest singular value, can be defined by
Definition at line 169 of file kinemat.cpp.
Referenced by Clik::q_qdot(), and Resolved_acc::torque_cmd().
| ReturnMatrix Robot_basic::acceleration | ( | const ColumnVector & | q, | |
| const ColumnVector & | qp, | |||
| const ColumnVector & | tau_cmd, | |||
| const ColumnVector & | Fext, | |||
| const ColumnVector & | Next | |||
| ) |
Joints acceleration.
The robot dynamics is
then the joint acceleration is
Definition at line 112 of file dynamics.cpp.
| ReturnMatrix Robot_basic::dtau_dq | ( | const ColumnVector & | q, | |
| const ColumnVector & | qp, | |||
| const ColumnVector & | qpp | |||
| ) |
Sensitivity of the dynamics with respect to
.
This function computes
.
Definition at line 58 of file sensitiv.cpp.
References dof.
| ReturnMatrix Robot_basic::dtau_dqp | ( | const ColumnVector & | q, | |
| const ColumnVector & | qp | |||
| ) |
Sensitivity of the dynamics with respect to
.
This function computes
.
Definition at line 84 of file sensitiv.cpp.
References dof.
1.5.1