|
Brief description of class CollisionAvoidanceBase. More...
#include <armarx/control/njoint_controller/core/CollisionAvoidanceCore.h>
Classes | |
struct | CollisionAvoidanceArmData |
Public Types | |
using | CollArmPtr = std::shared_ptr< CollisionAvoidanceArmData > |
using | CollisionRobot = ::simox::control::environment::CollisionRobot< hpp::fcl::OBBRSS > |
using | CollisionRobotPtr = std::unique_ptr< CollisionRobot > |
using | Config = ::armarx::control::common::control_law::arondto::CollisionAvoidanceConfigDict |
using | ConfigPtr = std::shared_ptr< Config > |
using | CtrlConfig = armarx::control::common::control_law::arondto::CollisionAvoidanceConfig |
using | DistanceResults = std::vector<::simox::control::environment::DistanceResult > |
using | DistanceResultsPtr = std::shared_ptr< DistanceResults > |
using | InertiaPtr = std::shared_ptr< simox::control::geodesics::metric::Inertia > |
using | RtStatus = law::CollisionAvoidanceController::RtStatusForSafetyStrategy |
using | SimoxRobot = ::simox::control::simox::robot::Robot |
using | SimoxRobotPtr = std::shared_ptr< SimoxRobot > |
Public Member Functions | |
CollisionAvoidanceBase (const VirtualRobot::RobotPtr &rtRobot, const Config &cfg) | |
void | rtCollisionChecking () |
void | rtLimbControllerRun (const std::string &robotNodeSetName, Eigen::VectorXf &qpos, Eigen::VectorXf &qvelFiltered, float torqueLimit, Eigen::VectorXf &impedanceJointTorque) |
void | rtPostDeactivate () |
void | rtPreActivate () |
void | setUserCfg (const Config &cfg) |
void | updateRtConfigFromUser () |
void | validateConfigData (Config &cfg) |
~CollisionAvoidanceBase () | |
Public Attributes | |
armarx::TripleBuffer< Config > | bufferCfgUserToRT |
std::map< std::string, CollArmPtr > | collLimb |
Config | userCfg |
Protected Attributes | |
std::vector< std::string > | actuatedJointNames |
DistanceResultsPtr | collisionPairs |
CollisionRobotPtr | collisionRobotPtr |
Eigen::VectorXd | qposActuatedJoints |
TODO, rename to actuatedJointNames. More... | |
SimoxRobotPtr | simoxControlRobotPtr |
SimoxRobotPtr | simoxReducedRobotPtr |
std::vector< int > | translationJointIndex |
Brief description of class CollisionAvoidanceBase.
Detailed description of class CollisionAvoidanceBase.
Definition at line 52 of file CollisionAvoidanceCore.h.
using CollArmPtr = std::shared_ptr<CollisionAvoidanceArmData> |
Definition at line 103 of file CollisionAvoidanceCore.h.
using CollisionRobot = ::simox::control::environment::CollisionRobot<hpp::fcl::OBBRSS> |
Definition at line 60 of file CollisionAvoidanceCore.h.
using CollisionRobotPtr = std::unique_ptr<CollisionRobot> |
Definition at line 61 of file CollisionAvoidanceCore.h.
using Config = ::armarx::control::common::control_law::arondto::CollisionAvoidanceConfigDict |
Definition at line 65 of file CollisionAvoidanceCore.h.
Definition at line 66 of file CollisionAvoidanceCore.h.
using CtrlConfig = armarx::control::common::control_law::arondto::CollisionAvoidanceConfig |
Definition at line 63 of file CollisionAvoidanceCore.h.
using DistanceResults = std::vector<::simox::control::environment::DistanceResult> |
Definition at line 58 of file CollisionAvoidanceCore.h.
using DistanceResultsPtr = std::shared_ptr<DistanceResults> |
Definition at line 59 of file CollisionAvoidanceCore.h.
using InertiaPtr = std::shared_ptr<simox::control::geodesics::metric::Inertia> |
Definition at line 62 of file CollisionAvoidanceCore.h.
using RtStatus = law::CollisionAvoidanceController::RtStatusForSafetyStrategy |
Definition at line 67 of file CollisionAvoidanceCore.h.
using SimoxRobot = ::simox::control::simox::robot::Robot |
Definition at line 56 of file CollisionAvoidanceCore.h.
using SimoxRobotPtr = std::shared_ptr<SimoxRobot> |
Definition at line 57 of file CollisionAvoidanceCore.h.
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
create not reduced simox control robot for inertia calculation
Definition at line 6 of file CollisionAvoidanceCore.cpp.
Definition at line 92 of file CollisionAvoidanceCore.cpp.
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 ------------------------------—
_______TODO_______ the following line is commented out, to avoid allocation of new memory
!!! individualColObjects has to be set to true (second flag, that is passed) !!! if not set to true, the body and the arms become attractive, be aware _______TODO_______ consider passing the pre-allocated results to the simox lib.
reset temporary pointsOnArmIndex
checks whether the point is located on the arm and fills the pointsOnArm vector with the corresponding indices the entries in the pointsOnArm vector store the indices of the collision pairs that are on the arm and which must be taken into account in the control law
prefilter contact pairs based on distance
set index in integer vector of contact point on arm below preFilterDistance
_______TODO_______ what if there are more collision pairs than 100? added above check with maxCollisionPairs
Definition at line 170 of file CollisionAvoidanceCore.cpp.
void rtLimbControllerRun | ( | const std::string & | robotNodeSetName, |
Eigen::VectorXf & | qpos, | ||
Eigen::VectorXf & | qvelFiltered, | ||
float | torqueLimit, | ||
Eigen::VectorXf & | impedanceJointTorque | ||
) |
set all invalid indeces of this rt cycle to -1
Definition at line 275 of file CollisionAvoidanceCore.cpp.
void rtPostDeactivate | ( | ) |
Definition at line 153 of file CollisionAvoidanceCore.cpp.
void rtPreActivate | ( | ) |
Definition at line 144 of file CollisionAvoidanceCore.cpp.
void setUserCfg | ( | const Config & | cfg | ) |
Definition at line 319 of file CollisionAvoidanceCore.cpp.
void updateRtConfigFromUser | ( | ) |
Running in rt thread.
Definition at line 162 of file CollisionAvoidanceCore.cpp.
void validateConfigData | ( | Config & | cfg | ) |
Definition at line 307 of file CollisionAvoidanceCore.cpp.
|
protected |
Definition at line 131 of file CollisionAvoidanceCore.h.
armarx::TripleBuffer<Config> bufferCfgUserToRT |
Definition at line 120 of file CollisionAvoidanceCore.h.
|
protected |
Definition at line 129 of file CollisionAvoidanceCore.h.
|
protected |
Definition at line 126 of file CollisionAvoidanceCore.h.
std::map<std::string, CollArmPtr> collLimb |
Definition at line 118 of file CollisionAvoidanceCore.h.
|
protected |
TODO, rename to actuatedJointNames.
Definition at line 132 of file CollisionAvoidanceCore.h.
|
protected |
Definition at line 127 of file CollisionAvoidanceCore.h.
|
protected |
Definition at line 128 of file CollisionAvoidanceCore.h.
|
protected |
Definition at line 133 of file CollisionAvoidanceCore.h.
Config userCfg |
Definition at line 119 of file CollisionAvoidanceCore.h.