Skip to content
Snippets Groups Projects
Commit cf1264ee authored by Eren Aksoy's avatar Eren Aksoy
Browse files

RobotStateComponentName is added as an optional property..It was hard coded

parent 40e434a8
No related branches found
No related tags found
No related merge requests found
......@@ -76,13 +76,13 @@ void ForceTorqueObserver::onInitObserver()
offerConditionCheck("magnitudelarger", new ConditionCheckMagnitudeLarger());
offerConditionCheck("magnitudesmaller", new ConditionCheckMagnitudeSmaller());
usingProxy("RobotStateComponent");
usingProxy(getProperty<std::string>("RobotStateComponentName").getValue());
offeringTopic("DebugDrawerUpdates");
}
void ForceTorqueObserver::onConnectObserver()
{
robot = getProxy<RobotStateComponentInterfacePrx>(getProperty<std::string>("RobotStateComponentName").getValue());
debugDrawer = getTopic<DebugDrawerInterfacePrx>("DebugDrawerUpdates");
if (getProperty<bool>("VisualizeForce").getValue())
{
......@@ -125,7 +125,7 @@ void ForceTorqueObserver::visualizerFunction()
float forceFactor = getProperty<float>("ForceVisualizerFactor").getValue();
RemoteRobot::synchronizeLocalClone(localRobot, robot);
auto channels = getAvailableChannels(false);
for (auto& channel : channels)
for (auto & channel : channels)
{
if (localRobot->hasRobotNode(channel.first))
{
......
......@@ -46,6 +46,8 @@ namespace armarx
defineOptionalProperty<int>("VisualizeForceUpdateFrequency", 20, "Frequency with which the force is visualized");
defineOptionalProperty<float>("ForceVisualizerFactor", 0.01, "Factor by which the forces are scaled to fit into 0..1 (only for visulization) ");
defineOptionalProperty<float>("MaxForceArrowLength", 150, "Length of the force visu arrow in mm");
defineOptionalProperty<std::string>("RobotStateComponentName", "RobotStateComponent", "Name of the RobotStateComponent that should be used");
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment