Go to the documentation of this file.
24 #include <VirtualRobot/IK/DifferentialIK.h>
25 #include <VirtualRobot/Robot.h>
32 #include <armarx/control/common/control_law/aron/CollisionAvoidanceConfig.aron.generated.h>
35 #include <armarx/control/common/ft/aron/FTConfig.aron.generated.h>
37 #include <simox/control/environment/CollisionRobot.h>
38 #include <simox/control/geodesics/metric/inertia.h>
39 #include <simox/control/impl/simox/robot/Robot.h>
40 #include <simox/control/robot/NodeInterface.h>
61 using InertiaPtr = std::shared_ptr<simox::control::geodesics::metric::Inertia>;
62 using DistanceResults = std::vector<::simox::control::environment::DistanceResult>;
64 using SimoxRobotPtr = std::shared_ptr<simox::control::simox::robot::Robot>;
65 using FTConfig = common::ft::arondto::FTConfig;
66 using Config = common::control_law::arondto::CollisionAvoidanceConfig;
82 Eigen::Vector3f
direction = Eigen::Vector3f::Zero();
83 Eigen::Vector3f
point = Eigen::Vector3f::Zero();
131 const Eigen::Vector3f&
point,
220 const simox::control::robot::NodeInterface*
node;
281 const unsigned int nDoF,
282 const unsigned int maxCollisionPairs,
283 VirtualRobot::RobotNodeSetPtr& rns);
287 void initJointLimtDataVec(
const Config&
c,
288 const unsigned int nDoF,
289 VirtualRobot::RobotNodeSetPtr& rns);
293 VirtualRobot::RobotNodeSetPtr
rtRNS;
296 std::atomic_bool enablePreactivateInit{
false};
304 simox::control::robot::NodeSetInterface* simoxNodeSet;
308 void calculateSelfCollisionTorque(
Config&
c,
309 RtStatusForSafetyStrategy& rtStatus,
311 std::shared_ptr<std::vector<int>> pointsOnArm,
312 int pointsOnArmIndex,
313 std::vector<std::string> selfCollisionNodes,
314 Eigen::VectorXf& qvelFiltered);
315 void calculateJointLimitTorque(
Config&
c,
316 RtStatusForSafetyStrategy& rtStatus,
317 Eigen::VectorXf& qpos,
318 Eigen::VectorXf& qvelFiltered);
321 void calculateSelfCollisionNullspace(
Config&
c, RtStatusForSafetyStrategy& rtStatus);
322 void calculateJointLimitNullspace(
Config&
c,
323 RtStatusForSafetyStrategy& rtStatus,
324 Eigen::VectorXf& qpos);
335 RtStatusForSafetyStrategy& robotStatus,
337 std::shared_ptr<std::vector<int>>& pointsOnArm,
338 int pointsOnArmIndex,
340 std::vector<std::string>& selfCollisionNodes,
341 Eigen::VectorXf& qpos,
342 Eigen::VectorXf& qvelFiltered,
std::vector< JointRangeBufferZoneData > jointLimitData
joint limit avoidance initialization parameters
simox::control::Pose localTransformation
std::string jointName
for each joint, that has a limit, based on the config parameters: jointRangeBufferZone jointRangeBuff...
Eigen::MatrixXf tempNullSpaceMatrix
float projectedImpedanceForce
void validateConfigData(arondto::CollisionAvoidanceConfig &cfg)
Eigen::VectorXf jointLimitJointTorque
std::vector<::simox::control::environment::DistanceResult > DistanceResults
Eigen::VectorXf projImpedanceJointTorque
intermediate projected torques via null space matrices
common::ft::arondto::FTConfig FTConfig
Eigen::Vector3f dirErrorImp
std::shared_ptr< DistanceResults > DistanceResultsPtr
Eigen::VectorXf projectedJacT
Eigen::VectorXf desiredJointTorques
targets
Eigen::VectorXf projJointLimJointTorque
Eigen::VectorXf normalizedJacT
Eigen::VectorXf selfCollisionJointTorque
simox::control::environment::DistanceResult activeDistPair
distance results
float qposZ1Low
null space parameters
Eigen::MatrixXf inertia
others
Eigen::MatrixXf selfCollNullSpace
intermediate null space matrices (self-collision and joint limit avoidance)
Eigen::Vector3f direction
Eigen::VectorXf projSelfCollJointTorque
float localStiffnessJointLim
Eigen::VectorXf kdImpedanceTorque
const simox::control::robot::NodeInterface * node
self-collision avoidance intermediate results
Eigen::Vector4f jointLimitNullSpaceWeightsHigh
~CollisionAvoidanceController()
void initialize(SimoxRobotPtr &simoxControlRobot)
VirtualRobot::RobotNodeSetPtr rtRNS
void setDistValues(std::string nodeName, std::string otherName, float minDistance)
std::shared_ptr< simox::control::geodesics::metric::Inertia > InertiaPtr
SelfCollisionData(int size)
std::string nodeName
the distances and projected jacobians from the generateSelfCollisionTorque() method are needed for th...
double collisionPairTime
time status
double jointLimitNullspaceTime
int collisionPairsNum
collision pair info
Eigen::VectorXf impedanceJointTorque
intermediate torque results
float projTotalForceImpedance
This file is part of ArmarX.
std::vector< SelfCollisionData > evalData
Eigen::Vector4f selfCollisionNullSpaceWeights
self-collision avoidance initialization parameters
float totalForceImpedance
void setCalcValues(const Eigen::MatrixXf &jacobian, float repulsiveForce, float localStiffness, const Eigen::VectorXf &projectedJacT, float distanceVelocity, const Eigen::Vector3f &direction, const Eigen::Vector3f &point, float damping, float projectedMass, float desiredNSColl)
internal status of the controller, containing intermediate variables, mutable targets
std::shared_ptr< simox::control::simox::robot::Robot > SimoxRobotPtr
CollisionAvoidanceController(const VirtualRobot::RobotNodeSetPtr &rtRns)
double collisionTorqueTime
double jointLimitTorqueTime
Eigen::VectorXf selfCollisionTorqueFiltered
void run(Config &c, RtStatusForSafetyStrategy &robotStatus, DistanceResultsPtr &collisionPairs, std::shared_ptr< std::vector< int >> &pointsOnArm, int pointsOnArmIndex, InertiaPtr &inertiaInstance, std::vector< std::string > &selfCollisionNodes, Eigen::VectorXf &qpos, Eigen::VectorXf &qvelFiltered, float torqueLimit)
------------------------------— main rt-loop ---------------------------------------—
double selfCollNullspaceTime
float k1
self-collision avoidance null space intermediate results
void reset(const Config &c, const unsigned int nDoF, const unsigned int maxCollisionPairs, VirtualRobot::RobotNodeSetPtr &rns)
std::vector< SelfCollisionData > selfCollDataVec
Eigen::MatrixXf jointLimNullSpaceFiltered
common::control_law::arondto::CollisionAvoidanceConfig Config
Eigen::VectorXf jointLimitTorqueFiltered
Eigen::MatrixXf inertiaInverse
Eigen::Vector6f projForceImpedance
Eigen::Vector4f calculateTransitionWeights(float z1, float z2)
helper functions
Eigen::MatrixXf selfCollNullSpaceFiltered
Eigen::MatrixXf jointLimNullSpace
void preactivateInit(Config &c, RtStatusForSafetyStrategy &rtStatus)
Eigen::Vector4f jointLimitNullSpaceWeightsLow
float jointVel
joint limit avoidance intermediate results