28 #include <RobotAPI/interface/units/RobotUnit/NJointCartesianNaturalPositionController.h>
29 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
30 #include <RobotAPI/interface/aron.h>
46 void calculate(
float error,
float& KpElb,
float& KpJla);
99 bool reached(
const VirtualRobot::RobotNodePtr& tcp);
113 std::vector<float> jointValues;
114 VirtualRobot::RobotNodeSetPtr rns;
118 static NJointCartesianNaturalPositionControllerConfigPtr
MakeConfig(
const std::string& rns,
const std::string& elbowNode);
146 Waypoint createWaypoint(
const Eigen::Vector3f& tcpTarget,
const std::vector<float>& userNullspaceTargets, std::optional<float> minElbowHeight = std::nullopt);
147 Waypoint createWaypoint(
const Eigen::Vector3f& tcpTarget, std::optional<float> minElbowHeight = std::nullopt);
175 static std::vector<float>
ScaleVec(
const std::vector<float>& vec,
float scale);
180 void updateDynamicKp();
181 void updateNullspaceTargets();
183 bool onWaypointChanged();
188 std::string _controllerName;
189 NJointCartesianNaturalPositionControllerConfigPtr _config;
190 CartesianNaturalPositionControllerConfig _runCfg;
191 bool _controllerCreated =
false;
192 NJointCartesianNaturalPositionControllerInterfacePrx _controller;
201 std::vector<Waypoint> _waypoints;
202 size_t _currentWaypointIndex = 0;
204 std::vector<float> _userNullspaceTargets;
205 std::vector<float> _naturalNullspaceTargets;
206 std::vector<VirtualRobot::RobotNodePtr> _rnsToElb;
207 bool _setJointNullspaceFromNaturalIK =
true;
209 std::map<std::string, WaypointConfig> _defaultWaypointConfigs;
210 bool _waypointChanged =
false;
211 FTSensorValue _ftOffset;
212 bool _activateControllerOnInit =
false;