26#include <VirtualRobot/IK/GazeIK.h>
27#include <VirtualRobot/Nodes/RobotNode.h>
28#include <VirtualRobot/Robot.h>
29#include <VirtualRobot/RobotNodeSet.h>
30#include <VirtualRobot/VirtualRobot.h>
38#include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
42#include <VisionX/interface/components/ImageSourceSelectionInterface.h>
44#include <RobotComponents/interface/GazeStabilizationInterface.h>
71 "VelocityBasedControl",
true,
"Use velocity based reflexes");
81 "AdvancedVOR", 0,
"Advanced Vestibulo-ocular reflex weight");
84 "Armar3KinematicUnit",
85 "Name of the KinematicUnit of the Robot");
88 "InertialMeasurementUnitObserver",
89 "Name of the InertialMeasurementUnitObserver of the Robot");
91 "RobotStateName",
"RobotStateComponent",
"Name of the RobotState of the Robot");
93 "HeadIKName",
"IKVirtualGazeNoEyes",
"Name of the HeadIK");
95 "RobotNodeSetName",
"Robot",
"Name of the RobotNodeSet");
98 "ImageSourceSelection",
99 "Name of the ImageSourceSelection component");
102 {
"Armar3ImageProvider",
"Armar3FovealImageProvider"},
103 "Name of the image provider to choose from. If image quality is high, the second "
104 "provider will be used.");
108 "Name of the topic the DebugObserver listens on");
112 "ArmarXSimulation/camera_simulator_640x480.txt",
113 "Camera calibration file, will be made available in the SLICE interface");
118 "Add sinusoidal motion in the neck joint to test the reflexes");
121 "Combined reflexes with IK based on the reafference "
122 "principle (sensory cancelation)");
129 class FeedforwardReflex;
146 virtual public armarx::GazeStabilizationInterface
155 return "ReflexCombination";
161 const Ice::Current&
c = Ice::emptyCurrent)
override;
164 const Ice::Current&
c = Ice::emptyCurrent)
override;
195 void setImageQuality(
float quality);
198 std::map<std::string, NameValueMap> reflexValues;
199 std::map<std::string, ReflexPtr> reflexes;
200 std::vector<std::string> headJointNames;
207 bool armar4, velocityBased, neckPerturbation;
208 bool vorEnabled, jointIKEnabled, okrEnabled;
209 std::string eye_pitch_left, eye_pitch_right, eye_yaw_left, eye_yaw_right, neck_roll;
210 float vorWeight, okrWeight, jointIKWeight;
220 VirtualRobot::RobotNodeSetPtr robotNodeSet;
222 std::string headIKName;
226 NameValueMap targetJointAngles;
228 KinematicUnitInterfacePrx kinUnitPrx;
231 ImageSourceSelectionInterfacePrx imageSourceSelection;
235 std::map<std::string, IceInternal::Handle<armarx::filters::DerivationFilter>>
237 std::map<std::string, IceInternal::Handle<armarx::filters::MedianFilter>> IMU_GyroFilters;
238 std::map<std::string, IceInternal::Handle<armarx::filters::ButterworthFilter>>
240 std::map<std::string, IceInternal::Handle<armarx::filters::ButterworthFilter>> FlowFilters;
247 Ice::Float currentPlatformVelocityY,
248 Ice::Float currentPlatformVelocityRotation,
249 const Ice::Current&
c = Ice::emptyCurrent)
override;
253 const Ice::Current&)
override;
260 const Ice::Current&
c = Ice::emptyCurrent)
override;
264 const Ice::Current&
c = Ice::emptyCurrent)
override;
268 const Ice::Current&
c = Ice::emptyCurrent)
override;
272 const Ice::Current&
c = Ice::emptyCurrent)
override;
276 const Ice::Current&
c = Ice::emptyCurrent)
override;
280 const Ice::Current&
c = Ice::emptyCurrent)
override;
284 const Ice::Current&
c = Ice::emptyCurrent)
override;
288 const Ice::Current&
c = Ice::emptyCurrent)
override;
292 void combineReflexes();
301 const Ice::Current&)
override;
306 const FramedPositionBasePtr& targetPosition,
307 const Ice::Current&
c = Ice::emptyCurrent)
override;
312 const std::string& name,
313 const IMUData& values,
315 const Ice::Current&
c = Ice::emptyCurrent)
override;
330 const Ice::Current&)
override;
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
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)
ReflexCombinationPropertyDefinitions(std::string prefix)
Brief description of class ReflexCombination.
void onInitComponent() override
void reportHeadTargetChanged(const NameValueMap &targetJointAngles, const FramedPositionBasePtr &targetPosition, const Ice::Current &c=Ice::emptyCurrent) override
void setReafferenceMethod(bool isReafference, const Ice::Current &c=Ice::emptyCurrent) override
void onDisconnectComponent() override
void reportSensorValues(const std::string &device, const std::string &name, const IMUData &values, const TimestampBasePtr ×tamp, const Ice::Current &c=Ice::emptyCurrent) override
void reportJointMotorTemperatures(const NameValueMap &, Ice::Long timestamp, bool, const Ice::Current &c=Ice::emptyCurrent) override
void updateWeights(float vor, float okr, float jointIK, const Ice::Current &c=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void reportControlModeChanged(const NameControlModeMap &, Ice::Long timestamp, bool, const Ice::Current &c=Ice::emptyCurrent) override
void reportHeadTargetChanged(const Ice::Current &)
void reportJointAccelerations(const NameValueMap &, Ice::Long timestamp, bool, const Ice::Current &c=Ice::emptyCurrent) override
void reportJointVelocities(const NameValueMap &values, Ice::Long timestamp, bool valueChanged, const Ice::Current &c=Ice::emptyCurrent) override
void reportJointTorques(const NameValueMap &, Ice::Long timestamp, bool, const Ice::Current &c=Ice::emptyCurrent) override
void onConnectComponent() override
void reportPlatformOdometryPose(Ice::Float, Ice::Float, Ice::Float, const Ice::Current &) override
void reportNewTrackingError(Ice::Float pixelX, Ice::Float pixelY, Ice::Float angleX, Ice::Float angleY, const Ice::Current &) override
void reportNewOpticalFlow(Ice::Float, Ice::Float, Ice::Float, Ice::Long, const Ice::Current &) override
void onExitComponent() override
void reportJointCurrents(const NameValueMap &, Ice::Long timestamp, bool, const Ice::Current &c=Ice::emptyCurrent) override
void reportPlatformVelocity(Ice::Float currentPlatformVelocityX, Ice::Float currentPlatformVelocityY, Ice::Float currentPlatformVelocityRotation, const Ice::Current &c=Ice::emptyCurrent) override
void reportJointAngles(const NameValueMap &values, Ice::Long timestamp, bool valueChanged, const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
void reportJointStatuses(const NameStatusMap &, Ice::Long timestamp, bool, const Ice::Current &c=Ice::emptyCurrent) override
Quaternion< float, 0 > Quaternionf
std::shared_ptr< class Robot > RobotPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx