Go to the documentation of this file.
32 #include <ArmarXGui/interface/RemoteGuiInterface.h>
36 #include <RobotAPI/interface/components/FrameTrackingInterface.h>
37 #include <RobotAPI/interface/core/RobotState.h>
38 #include <RobotAPI/interface/observers/KinematicUnitObserverInterface.h>
39 #include <RobotAPI/interface/units/KinematicUnitInterface.h>
54 defineOptionalProperty<std::string>(
55 "RobotStateComponentName",
56 "RobotStateComponent",
57 "Name of the robot state component that should be used");
58 defineOptionalProperty<std::string>(
"KinematicUnitName",
60 "Name of the kinematic unit that should be used");
61 defineOptionalProperty<std::string>(
62 "KinematicUnitObserverName",
63 "KinematicUnitObserver",
64 "Name of the kinematic unit observer that should be used");
65 defineRequiredProperty<std::string>(
"HeadYawJoint",
66 "Name of the yaw joint of the head.");
67 defineRequiredProperty<std::string>(
"HeadPitchJoint",
68 "Name of the pitch joint of the head.");
69 defineRequiredProperty<std::string>(
"CameraNode",
"Name of the camera node.");
70 defineOptionalProperty<bool>(
71 "EnableTrackingOnStartup",
73 "Start Tracking on startup. This needs a frame to be defined.");
74 defineOptionalProperty<std::string>(
75 "FrameOnStartup",
"",
"Name of the frame that should be tracked.");
76 defineOptionalProperty<std::string>(
79 "Name of the remote gui. Remote gui is disabled if empty.");
80 defineOptionalProperty<float>(
83 "The maximum velocity the yaw joint while tracking objects.");
84 defineOptionalProperty<float>(
87 "The acceleration of the yaw joint while tracking objects.");
88 defineOptionalProperty<float>(
91 "The maximum velocity the pitch joint while tracking objects.");
92 defineOptionalProperty<float>(
95 "The acceleration of the pitch joint while tracking objects.");
115 HeadState() =
default;
121 float currentPitchPos,
122 float currentPitchVel,
123 float desiredPitchPos) :
125 currentYawPos{currentYawPos},
126 currentYawVel{currentYawVel},
127 desiredYawPos{desiredYawPos},
128 currentPitchPos{currentPitchPos},
129 currentPitchVel{currentPitchVel},
130 desiredPitchPos{desiredPitchPos}
138 float currentPitchPos;
139 float currentPitchVel;
140 float desiredPitchPos;
150 return "FrameTracking";
181 void enableTracking(
bool enable,
const Ice::Current& = Ice::emptyCurrent)
override;
183 const Ice::Current& = Ice::emptyCurrent)
override;
184 std::string
getFrame(
const Ice::Current& = Ice::emptyCurrent)
const override;
187 const Ice::Current& = Ice::emptyCurrent)
override;
189 const Ice::Current& = Ice::emptyCurrent)
override;
192 const Ice::Current& = Ice::emptyCurrent)
override;
194 const Ice::Current& = Ice::emptyCurrent)
override;
198 const ::Ice::FloatSeq& pitchValues,
200 const Ice::Current& = Ice::emptyCurrent)
override;
204 const Ice::Current& = Ice::emptyCurrent)
override;
205 void moveJointsTo(
float yaw,
float pitch,
const Ice::Current& = Ice::emptyCurrent)
override;
213 bool _looksAtPoint(
const Eigen::Vector3f& point,
float max_diff);
std::atomic< bool > enabled
SimplePeriodicTask ::pointer_type _guiTask
bool _looksAtPoint(const Eigen::Vector3f &point, float max_diff)
void scanInWorkspace(const ::armarx::Vector3fSeq &points, float maxVelocity, float acceleration, const Ice::Current &=Ice::emptyCurrent) override
PeriodicTask< FrameTracking >::pointer_type processorTask
void lookAtPointInRobotFrame(const Vector3f &point, const Ice::Current &=Ice::emptyCurrent) override
void onInitComponent() override
void enableTracking(bool enable, const Ice::Current &=Ice::emptyCurrent) override
void onConnectComponent() override
RemoteGuiInterfacePrx _remoteGui
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
void _doPositionControl(const HeadState &headstate)
KinematicUnitObserverInterfacePrx kinematicUnitObserverInterfacePrx
Brief description of class FrameTracking.
void scanInConfigurationSpace(float yawFrom, float yawTo, const ::Ice::FloatSeq &pitchValues, float velocity, const Ice::Current &=Ice::emptyCurrent) override
FrameTrackingPropertyDefinitions(std::string prefix)
std::string getFrame(const Ice::Current &=Ice::emptyCurrent) const override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void lookAtFrame(const std::string &frameName, const Ice::Current &=Ice::emptyCurrent) override
void _lookAtFrame(const std::string &frame)
RobotStateComponentInterfacePrx robotStateComponent
void _lookAtPoint(const Eigen::Vector3f &point)
VirtualRobot::RobotNodePtr headPitchJoint
VirtualRobot::RobotNodePtr cameraNode
void _doVelocityControl(const HeadState &headstate, float maxYawVelocity, float yawAcceleration, float maxPitchVelocity, float pitchAcceleration)
void syncronizeLocalClone()
Baseclass for all ArmarX ManagedIceObjects requiring properties.
void onExitComponent() override
std::string getDefaultName() const override
Default component property definition container.
HeadState _calculateJointAnglesContinously(const std::string &frame)
KinematicUnitInterfacePrx kinematicUnitInterfacePrx
void setFrame(const std::string &frameName, const Ice::Current &=Ice::emptyCurrent) override
VirtualRobot::RobotNodePtr headYawJoint
HeadState _calculateJointAngles(const Eigen::Vector3f &point)
void lookAtPointInGlobalFrame(const Vector3f &point, const Ice::Current &=Ice::emptyCurrent) override
VirtualRobot::RobotPtr localRobot
void _enableTracking(bool enable)
void moveJointsTo(float yaw, float pitch, const Ice::Current &=Ice::emptyCurrent) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr
bool isLookingAtPointInGlobalFrame(const Vector3f &point, float max_diff, const Ice::Current &=Ice::emptyCurrent) override
RemoteGui::TabProxy _guiTab
void onDisconnectComponent() override