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>
55 "RobotStateComponentName",
56 "RobotStateComponent",
57 "Name of the robot state component that should be used");
60 "Name of the kinematic unit that should be used");
62 "KinematicUnitObserverName",
63 "KinematicUnitObserver",
64 "Name of the kinematic unit observer that should be used");
66 "Name of the yaw joint of the head.");
68 "Name of the pitch joint of the head.");
71 "EnableTrackingOnStartup",
73 "Start Tracking on startup. This needs a frame to be defined.");
75 "FrameOnStartup",
"",
"Name of the frame that should be tracked.");
79 "Name of the remote gui. Remote gui is disabled if empty.");
83 "The maximum velocity the yaw joint while tracking objects.");
87 "The acceleration of the yaw joint while tracking objects.");
91 "The maximum velocity the pitch joint while tracking objects.");
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);
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
FrameTrackingPropertyDefinitions(std::string prefix)
Brief description of class FrameTracking.
void onInitComponent() override
void setFrame(const std::string &frameName, const Ice::Current &=Ice::emptyCurrent) override
void lookAtFrame(const std::string &frameName, const Ice::Current &=Ice::emptyCurrent) override
VirtualRobot::RobotPtr localRobot
void onDisconnectComponent() override
RobotStateComponentInterfacePrx robotStateComponent
void _enableTracking(bool enable)
void enableTracking(bool enable, const Ice::Current &=Ice::emptyCurrent) override
void scanInWorkspace(const ::armarx::Vector3fSeq &points, float maxVelocity, float acceleration, const Ice::Current &=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void lookAtPointInGlobalFrame(const Vector3f &point, const Ice::Current &=Ice::emptyCurrent) override
void scanInConfigurationSpace(float yawFrom, float yawTo, const ::Ice::FloatSeq &pitchValues, float velocity, const Ice::Current &=Ice::emptyCurrent) override
RemoteGui::TabProxy _guiTab
void _doPositionControl(const HeadState &headstate)
std::string getFrame(const Ice::Current &=Ice::emptyCurrent) const override
std::atomic< bool > enabled
HeadState _calculateJointAnglesContinously(const std::string &frame)
bool isLookingAtPointInGlobalFrame(const Vector3f &point, float max_diff, const Ice::Current &=Ice::emptyCurrent) override
bool _looksAtPoint(const Eigen::Vector3f &point, float max_diff)
void lookAtPointInRobotFrame(const Vector3f &point, const Ice::Current &=Ice::emptyCurrent) override
void onConnectComponent() override
VirtualRobot::RobotNodePtr headYawJoint
KinematicUnitObserverInterfacePrx kinematicUnitObserverInterfacePrx
void _lookAtFrame(const std::string &frame)
VirtualRobot::RobotNodePtr cameraNode
RemoteGuiInterfacePrx _remoteGui
void syncronizeLocalClone()
SimplePeriodicTask ::pointer_type _guiTask
void _doVelocityControl(const HeadState &headstate, float maxYawVelocity, float yawAcceleration, float maxPitchVelocity, float pitchAcceleration)
void onExitComponent() override
PeriodicTask< FrameTracking >::pointer_type processorTask
void _lookAtPoint(const Eigen::Vector3f &point)
HeadState _calculateJointAngles(const Eigen::Vector3f &point)
VirtualRobot::RobotNodePtr headPitchJoint
KinematicUnitInterfacePrx kinematicUnitInterfacePrx
std::string getDefaultName() const override
void moveJointsTo(float yaw, float pitch, const Ice::Current &=Ice::emptyCurrent) override
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
std::shared_ptr< class Robot > RobotPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx