RML  1.0
Robotics Mathematical Library
Loading...
Searching...
No Matches
rml::VehicleModel Class Reference

Vehicle Model base class. More...

#include <VehicleModel.h>

Inheritance diagram for rml::VehicleModel:
[legend]

Public Member Functions

 VehicleModel (const std::string id)
 Default constructor.
 
virtual ~VehicleModel ()
 Default destructor.
 
void Jacobian (Eigen::Matrix6d J)
 Jacobian initialization.
 
Eigen::MatrixXd Jacobian (const std::string &ID) noexcept(false)
 Method returning the jacobian related to the frame id in input.
 
void PositionOnInertialFrame (const Eigen::TransformationMatrix &inertialF_T_vehicleF)
 Set the base position The method updates the internal base position state. This method should be called before the evaluate methods in order to have the updated values.
 
auto PositionOnInertialFrame () const -> const Eigen::TransformationMatrix &
 Get the inertialF_T_vehicleF independently from the DOF of the vehicle.
 
auto VelocityVector () -> Eigen::Vector6d &
 Set the base position The method updates the internal base velocity state. This method should be called before the evaluate methods in order to have the updated value.
 
auto VelocityVector () const -> const Eigen::Vector6d &
 Get the complete 6D velocity, in the form of [x_dot y_dot z_dot wx wy wz], independently from the Dof of the vehicle.
 
auto AccelerationVector () -> Eigen::Vector6d &
 set the vehicle acceleration expressed wrt to the vehicle frame
 
auto AccelerationVector () const -> const Eigen::Vector6d &
 Method returning the acceleration wrt to the vehicle frame.
 
void AttachRigidBodyFrame (const std::string &frameID, const Eigen::TransformationMatrix &vehicleF_T_frameID)
 Method adding a rigid body frame to the vehicle.
 
Eigen::TransformationMatrix TransformationMatrix (const std::string &frameID) noexcept(false)
 Method returning the transformation matrix related to the frame id in input.
 
Eigen::TransformationMatrix TransformationMatrix (const std::string &frameID_j, const std::string &frameID_k)
 Method returing a transformation matrix from frameID_j to frameID_k, i.e. jTk.
 
auto IsModelInizialized () const -> bool
 Method returning whether the model is initialized.
 
auto ControlVector () const -> const Eigen::Vector6d &
 Method returning the vehicle control vector.
 
auto ControlVector () -> Eigen::Vector6d &
 Method setting the control vector.
 
auto ID () -> std::string &
 Method setting the id.
 
auto ID () const -> const std::string &
 Method returning the id.
 

Protected Attributes

bool modelInitialized_
 boolean stating whether the model is initialized
 
bool isMapInitialized_
 boolean stating whether the transformation and jacobian maps are initialized
 
std::unordered_map< std::string, Eigen::TransformationMatrixrigidBodyFrames_
 map of the attached body frames
 
Eigen::TransformationMatrix inertialF_T_vehicleF_
 vehicle position w.r.t the inertial frame
 
Eigen::Vector6d velocity_
 vehicle velocity
 
Eigen::Vector6d acceleration_
 vehicle acceleration
 
Eigen::Vector6d controlRef_
 vehicle control vector
 
std::unordered_map< std::string, Eigen::MatrixXd > jacobians_
 map of vehicle jacobians
 
std::unordered_map< std::string, Eigen::TransformationMatrixtransformation_
 map of vehicle transformations
 
Eigen::Matrix6d vJv_
 vehicle jacobians
 
Eigen::RotationMatrix I3_
 identity matrix
 
std::string id_
 vehicle id
 

Detailed Description

Vehicle Model base class.

This class implements a base vehicle model class, it is used in the RobotModel class in order to implement the manipulators moving platform.

Constructor & Destructor Documentation

◆ VehicleModel()

rml::VehicleModel::VehicleModel ( const std::string  id)

Default constructor.

Parameters
[in]idVehicleModel id.

◆ ~VehicleModel()

virtual rml::VehicleModel::~VehicleModel ( )
virtual

Default destructor.

Member Function Documentation

◆ AccelerationVector() [1/2]

auto rml::VehicleModel::AccelerationVector ( ) -> Eigen::Vector6d&
inline

set the vehicle acceleration expressed wrt to the vehicle frame

Parameters
fbkAccvehicle acceleration

◆ AccelerationVector() [2/2]

auto rml::VehicleModel::AccelerationVector ( ) const -> const Eigen::Vector6d&
inline

Method returning the acceleration wrt to the vehicle frame.

Returns
acceleration vector

◆ AttachRigidBodyFrame()

void rml::VehicleModel::AttachRigidBodyFrame ( const std::string &  frameID,
const Eigen::TransformationMatrix vehicleF_T_frameID 
)

Method adding a rigid body frame to the vehicle.

Parameters
IDId of the frame.
TMatTransformation matrix of the frame.

◆ ControlVector() [1/2]

auto rml::VehicleModel::ControlVector ( ) -> Eigen::Vector6d&
inline

Method setting the control vector.

Parameters
controlRefcontrol vector.

◆ ControlVector() [2/2]

auto rml::VehicleModel::ControlVector ( ) const -> const Eigen::Vector6d&
inline

Method returning the vehicle control vector.

Returns
vehicle control vector

◆ ID() [1/2]

auto rml::VehicleModel::ID ( ) -> std::string&
inline

Method setting the id.

Parameters
idvehicle id.

◆ ID() [2/2]

auto rml::VehicleModel::ID ( ) const -> const std::string&
inline

Method returning the id.

Returns
vehicle id.

◆ IsModelInizialized()

auto rml::VehicleModel::IsModelInizialized ( ) const -> bool
inline

Method returning whether the model is initialized.

Returns
true if the model is initialized, false otherwise.

◆ Jacobian() [1/2]

Eigen::MatrixXd rml::VehicleModel::Jacobian ( const std::string &  ID)

Method returning the jacobian related to the frame id in input.

Parameters
IDframe id.
Returns
transformation matrix.

◆ Jacobian() [2/2]

void rml::VehicleModel::Jacobian ( Eigen::Matrix6d  J)

Jacobian initialization.

◆ PositionOnInertialFrame() [1/2]

auto rml::VehicleModel::PositionOnInertialFrame ( ) const -> const Eigen::TransformationMatrix&
inline

Get the inertialF_T_vehicleF independently from the DOF of the vehicle.

Returns
inertialF_T_vehicleF the postion of the vehicle w.r.t the inertial frame

◆ PositionOnInertialFrame() [2/2]

void rml::VehicleModel::PositionOnInertialFrame ( const Eigen::TransformationMatrix inertialF_T_vehicleF)

Set the base position The method updates the internal base position state. This method should be called before the evaluate methods in order to have the updated values.

Parameters
[in]inertialF_T_vehicleFthe postion of the vehicle w.r.t the inertial frame

◆ TransformationMatrix() [1/2]

Eigen::TransformationMatrix rml::VehicleModel::TransformationMatrix ( const std::string &  frameID)

Method returning the transformation matrix related to the frame id in input.

Parameters
IDframe id.
Returns
transformation matrix.

◆ TransformationMatrix() [2/2]

Eigen::TransformationMatrix rml::VehicleModel::TransformationMatrix ( const std::string &  frameID_j,
const std::string &  frameID_k 
)

Method returing a transformation matrix from frameID_j to frameID_k, i.e. jTk.

Parameters
[in]frameID_jfirst frame;
[in]framID_ksecond frame;
Returns
Transformation Matrix jTk.

◆ VelocityVector() [1/2]

auto rml::VehicleModel::VelocityVector ( ) -> Eigen::Vector6d&
inline

Set the base position The method updates the internal base velocity state. This method should be called before the evaluate methods in order to have the updated value.

◆ VelocityVector() [2/2]

auto rml::VehicleModel::VelocityVector ( ) const -> const Eigen::Vector6d&
inline

Get the complete 6D velocity, in the form of [x_dot y_dot z_dot wx wy wz], independently from the Dof of the vehicle.

Returns
The vehicle velocity

Member Data Documentation

◆ acceleration_

Eigen::Vector6d rml::VehicleModel::acceleration_
protected

vehicle acceleration

◆ controlRef_

Eigen::Vector6d rml::VehicleModel::controlRef_
protected

vehicle control vector

◆ I3_

Eigen::RotationMatrix rml::VehicleModel::I3_
protected

identity matrix

◆ id_

std::string rml::VehicleModel::id_
protected

vehicle id

◆ inertialF_T_vehicleF_

Eigen::TransformationMatrix rml::VehicleModel::inertialF_T_vehicleF_
protected

vehicle position w.r.t the inertial frame

◆ isMapInitialized_

bool rml::VehicleModel::isMapInitialized_
protected

boolean stating whether the transformation and jacobian maps are initialized

◆ jacobians_

std::unordered_map<std::string, Eigen::MatrixXd> rml::VehicleModel::jacobians_
protected

map of vehicle jacobians

◆ modelInitialized_

bool rml::VehicleModel::modelInitialized_
protected

boolean stating whether the model is initialized

◆ rigidBodyFrames_

std::unordered_map<std::string, Eigen::TransformationMatrix> rml::VehicleModel::rigidBodyFrames_
protected

map of the attached body frames

◆ transformation_

std::unordered_map<std::string, Eigen::TransformationMatrix> rml::VehicleModel::transformation_
protected

map of vehicle transformations

◆ velocity_

Eigen::Vector6d rml::VehicleModel::velocity_
protected

vehicle velocity

◆ vJv_

Eigen::Matrix6d rml::VehicleModel::vJv_
protected

vehicle jacobians


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