Go to the documentation of this file.
25 #include <RobotAPI/interface/units/ForceTorqueUnit.h>
28 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
45 defineRequiredProperty<std::string>(
"ForceTorqueTopicName",
"Name of the ForceTorqueUnit Topic");
46 defineOptionalProperty<bool>(
"VisualizeForce",
true,
"Visualize the force with an arrow in the debug drawer");
47 defineOptionalProperty<int>(
"RobotUpdateFrequency", 50,
"Update frequency of the local robot");
48 defineOptionalProperty<int>(
"VisualizeForceUpdateFrequency", 30,
"Frequency with which the force is visualized");
49 defineOptionalProperty<float>(
"ForceVisualizerFactor", 0.01f,
"Factor by which the forces are scaled to fit into 0..1 (only for visulization) ");
50 defineOptionalProperty<float>(
"MaxExpectedTorqueValue", 30,
"The torque visualization circle reaches the full circle at this value");
51 defineOptionalProperty<float>(
"TorqueVisuDeadZone", 1,
"Torques below this threshold are not visualized.");
52 defineOptionalProperty<float>(
"MaxForceArrowLength", 150,
"Length of the force visu arrow in mm");
53 defineOptionalProperty<std::string>(
"RobotStateComponentName",
"RobotStateComponent",
"Name of the RobotStateComponent that should be used");
54 defineOptionalProperty<std::string>(
"SensorRobotNodeMapping",
"",
"Triplets of sensor node name, target frame robot node name and optional channel name: Sensor values are also reported in the frame of the robot node: e. g. SensorName:RobotNodeName[:ChannelName],SensorName2:RobotNodeName2[:ChannelName2]");
69 virtual public ForceTorqueUnitObserverInterface
79 return "ForceTorqueUnitObserver";
87 void reportSensorValues(
const std::string& sensorNodeName,
const FramedDirectionBasePtr& forces,
const FramedDirectionBasePtr& torques,
const Ice::Current&)
override;
98 std::string topicName;
105 std::multimap<std::string, std::pair<std::string, std::string> > sensorRobotNodeMapping;
107 void offerValue(
const std::string& nodeName,
const std::string& type,
const FramedDirectionBasePtr&
value,
const DataFieldIdentifierPtr&
id);
111 DatafieldRefBasePtr
createNulledDatafield(
const DatafieldRefBasePtr& forceTorqueDatafieldRef,
const Ice::Current&)
override;
113 DatafieldRefBasePtr
getForceDatafield(
const std::string& nodeName,
const Ice::Current&)
override;
114 DatafieldRefBasePtr
getTorqueDatafield(
const std::string& nodeName,
const Ice::Current&)
override;
void onConnectObserver() override
Framework hook.
Baseclass for all ArmarX Observers.
PropertyDefinitionsPtr createPropertyDefinitions() override
void onInitObserver() override
Framework hook.
Observer monitoring Force/Torque values.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
std::string getDefaultName() const override
Retrieve default name of component.
DatafieldRefBasePtr getForceDatafield(const std::string &nodeName, const Ice::Current &) override
std::shared_ptr< Value > value()
void onDisconnectComponent() override
Hook for subclass.
DataFieldIdentifierPtr getTorqueDatafieldId(const std::string &nodeName, const std::string &frame)
void reportSensorValues(const std::string &sensorNodeName, const FramedDirectionBasePtr &forces, const FramedDirectionBasePtr &torques, const Ice::Current &) override
void setTopicName(std::string topicName)
DataFieldIdentifierPtr getForceDatafieldId(const std::string &nodeName, const std::string &frame)
void onExitObserver() override
Framework hook.
DatafieldRefBasePtr createNulledDatafield(const DatafieldRefBasePtr &forceTorqueDatafieldRef, const Ice::Current &) override
ForceTorqueObserverPropertyDefinitions(std::string prefix)
void visualizerFunction()
This file offers overloads of toIce() and fromIce() functions for STL container types.
DatafieldRefBasePtr getTorqueDatafield(const std::string &nodeName, const Ice::Current &) override
std::shared_ptr< class Robot > RobotPtr