CollisionAvoidanceBase Class Reference

Brief description of class CollisionAvoidanceBase. More...

#include <armarx/control/njoint_controller/core/CollisionAvoidanceCore.h>

Classes

struct  NodeSetData
 

Public Types

using CollisionRobot = simox::control::environment::CollisionRobotInterface
 
using CollisionRobotIndices = law::CollisionAvoidanceController::CollisionRobotIndices
 
using Config = law::arondto::CollisionAvoidanceConfigDict
 
using CtrlConfig = law::arondto::CollisionAvoidanceConfig
 
using DistanceResults = law::CollisionAvoidanceController::DistanceResults
 
using DynamicsModel = simox::control::dynamics::RBDLModel
 
using RtStatus = law::CollisionAvoidanceController::RtStatusForSafetyStrategy
 
using SCRobot = law::CollisionAvoidanceController::SCRobot
 

Public Member Functions

 CollisionAvoidanceBase (const VirtualRobot::RobotPtr &rtRobot, const Config &cfg)
 
void rtCollisionChecking ()
 
void rtLimbControllerRun (const std::string &robotNodeSetName, const Eigen::VectorXf &qpos, const Eigen::VectorXf &qvelFiltered, float torqueLimit, const Eigen::VectorXf &impedanceJointTorque)
 
void rtPostDeactivate ()
 
void rtPreActivate ()
 
void setUserCfg (const Config &cfg)
 
void updateRtConfigFromUser ()
 
void validateConfigData (const Config &cfg)
 
 ~CollisionAvoidanceBase ()
 

Public Attributes

armarx::TripleBuffer< ConfigbufferCfgUserToRT
 
std::map< std::string, NodeSetDatacollLimb
 
Config userCfg
 

Protected Attributes

std::vector< std::string > actuatedJointNames
 
DistanceResults collisionPairs
 
std::unique_ptr< CollisionRobotcollisionRobot
 
Eigen::VectorXd qposActuatedJoints
 TODO, rename to actuatedJointNames. More...
 
std::unique_ptr< SCRobotscRobot
 
std::vector< unsigned int > translationJointIndex
 

Detailed Description

Brief description of class CollisionAvoidanceBase.

Detailed description of class CollisionAvoidanceBase.

Definition at line 54 of file CollisionAvoidanceCore.h.

Member Typedef Documentation

◆ CollisionRobot

using CollisionRobot = simox::control::environment::CollisionRobotInterface

Definition at line 65 of file CollisionAvoidanceCore.h.

◆ CollisionRobotIndices

using CollisionRobotIndices = law::CollisionAvoidanceController::CollisionRobotIndices

Definition at line 60 of file CollisionAvoidanceCore.h.

◆ Config

using Config = law::arondto::CollisionAvoidanceConfigDict

Definition at line 62 of file CollisionAvoidanceCore.h.

◆ CtrlConfig

using CtrlConfig = law::arondto::CollisionAvoidanceConfig

Definition at line 61 of file CollisionAvoidanceCore.h.

◆ DistanceResults

using DistanceResults = law::CollisionAvoidanceController::DistanceResults

Definition at line 59 of file CollisionAvoidanceCore.h.

◆ DynamicsModel

using DynamicsModel = simox::control::dynamics::RBDLModel

Definition at line 66 of file CollisionAvoidanceCore.h.

◆ RtStatus

using RtStatus = law::CollisionAvoidanceController::RtStatusForSafetyStrategy

Definition at line 63 of file CollisionAvoidanceCore.h.

◆ SCRobot

using SCRobot = law::CollisionAvoidanceController::SCRobot

Definition at line 58 of file CollisionAvoidanceCore.h.

Constructor & Destructor Documentation

◆ CollisionAvoidanceBase()

CollisionAvoidanceBase ( const VirtualRobot::RobotPtr rtRobot,
const Config cfg 
)

add actuated robot joints use a robot nodeset with all actuated joints, arms including head and torso joints, which change the position of the robot body parts for correct collision checking

initialize simox control robot for self-collision checking

Definition at line 17 of file CollisionAvoidanceCore.cpp.

+ Here is the call graph for this function:

◆ ~CollisionAvoidanceBase()

Definition at line 128 of file CollisionAvoidanceCore.cpp.

Member Function Documentation

◆ rtCollisionChecking()

void rtCollisionChecking ( )

--------------— update joint values for simox Robots ------------------------------—

--------------— update Simox robots -----------------------------------------------—

a VectorXd is needed with nodeSet size (size of actuated joints in order of vector, which has been used for initialization in init

It is very important that the simox robots map the current joint configuration of the real-world robot

--------------— calculation of robot collision pairs ------------------------------—

Definition at line 188 of file CollisionAvoidanceCore.cpp.

◆ rtLimbControllerRun()

void rtLimbControllerRun ( const std::string &  robotNodeSetName,
const Eigen::VectorXf &  qpos,
const Eigen::VectorXf &  qvelFiltered,
float  torqueLimit,
const Eigen::VectorXf &  impedanceJointTorque 
)

Definition at line 225 of file CollisionAvoidanceCore.cpp.

◆ rtPostDeactivate()

void rtPostDeactivate ( )

Definition at line 171 of file CollisionAvoidanceCore.cpp.

◆ rtPreActivate()

void rtPreActivate ( )

Definition at line 162 of file CollisionAvoidanceCore.cpp.

◆ setUserCfg()

void setUserCfg ( const Config cfg)

Definition at line 260 of file CollisionAvoidanceCore.cpp.

+ Here is the call graph for this function:

◆ updateRtConfigFromUser()

void updateRtConfigFromUser ( )

Running in rt thread.

Definition at line 180 of file CollisionAvoidanceCore.cpp.

+ Here is the call graph for this function:

◆ validateConfigData()

void validateConfigData ( const Config cfg)

Definition at line 248 of file CollisionAvoidanceCore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ actuatedJointNames

std::vector<std::string> actuatedJointNames
protected

Definition at line 119 of file CollisionAvoidanceCore.h.

◆ bufferCfgUserToRT

armarx::TripleBuffer<Config> bufferCfgUserToRT

Definition at line 109 of file CollisionAvoidanceCore.h.

◆ collisionPairs

DistanceResults collisionPairs
protected

Definition at line 117 of file CollisionAvoidanceCore.h.

◆ collisionRobot

std::unique_ptr<CollisionRobot> collisionRobot
protected

Definition at line 115 of file CollisionAvoidanceCore.h.

◆ collLimb

std::map<std::string, NodeSetData> collLimb

Definition at line 107 of file CollisionAvoidanceCore.h.

◆ qposActuatedJoints

Eigen::VectorXd qposActuatedJoints
protected

TODO, rename to actuatedJointNames.

Definition at line 120 of file CollisionAvoidanceCore.h.

◆ scRobot

std::unique_ptr<SCRobot> scRobot
protected

Definition at line 116 of file CollisionAvoidanceCore.h.

◆ translationJointIndex

std::vector<unsigned int> translationJointIndex
protected

Definition at line 121 of file CollisionAvoidanceCore.h.

◆ userCfg

Config userCfg

Definition at line 108 of file CollisionAvoidanceCore.h.


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