mc_tvm::DynamicFunction Struct Reference

#include <mc_tvm/DynamicFunction.h>

Inheritance diagram for mc_tvm::DynamicFunction:
Collaboration diagram for mc_tvm::DynamicFunction:

Classes

struct  ForceContact
 

Public Types

using Output = tvm::function::abstract::LinearFunction::Output
 

Public Member Functions

 DynamicFunction (const mc_rbdyn::Robot &robot)
 
const tvm::VariableVector & addContact (const mc_rbdyn::RobotFrame &frame, std::vector< sva::PTransformd > points, double dir)
 
void removeContact (const mc_rbdyn::RobotFrame &frame)
 
sva::ForceVecd contactForce (const mc_rbdyn::RobotFrame &f) const
 

Protected Member Functions

void updateb ()
 
std::vector< ForceContact >::const_iterator findContact (const mc_rbdyn::RobotFrame &frame) const
 
void updateJacobian ()
 

Protected Attributes

const mc_rbdyn::Robotrobot_
 
std::vector< ForceContactcontacts_
 

Detailed Description

Implement the equation of motion for a given robot.

It can be given contacts that will be integrated into the equation of motion (

See also
DynamicFunction::addContact).

It manages the force variables related to these contacts.

Notably, it does not take care of enforcing Newton 3rd law of motion when two actuated robots are in contact.

Member Typedef Documentation

◆ Output

using mc_tvm::DynamicFunction::Output = tvm::function::abstract::LinearFunction::Output

Constructor & Destructor Documentation

◆ DynamicFunction()

mc_tvm::DynamicFunction::DynamicFunction ( const mc_rbdyn::Robot robot)

Construct the equation of motion for a given robot

Member Function Documentation

◆ addContact()

const tvm::VariableVector& mc_tvm::DynamicFunction::addContact ( const mc_rbdyn::RobotFrame frame,
std::vector< sva::PTransformd >  points,
double  dir 
)

Add a contact to the function

This adds forces variables for every contact point belonging to the robot of this dynamic function.

Parameters
frameContact frame
pointsContact points in the frame's parent body's frame
dirContact direction

Returns the force variables that were created by this contact

◆ contactForce()

sva::ForceVecd mc_tvm::DynamicFunction::contactForce ( const mc_rbdyn::RobotFrame f) const

Returns the contact force at the given contact frame

Parameters
fContact frame
Exceptions
Ifno contact has been added with that frame

◆ findContact()

std::vector<ForceContact>::const_iterator mc_tvm::DynamicFunction::findContact ( const mc_rbdyn::RobotFrame frame) const
protected

◆ removeContact()

void mc_tvm::DynamicFunction::removeContact ( const mc_rbdyn::RobotFrame frame)

Removes the contact associated to the given frame

Parameters
frameContact frame

◆ updateb()

void mc_tvm::DynamicFunction::updateb ( )
protected

◆ updateJacobian()

void mc_tvm::DynamicFunction::updateJacobian ( )
protected

Member Data Documentation

◆ contacts_

std::vector<ForceContact> mc_tvm::DynamicFunction::contacts_
protected

◆ robot_

const mc_rbdyn::Robot& mc_tvm::DynamicFunction::robot_
protected

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