33 using namespace WeissHapticGroup;
48 HapticUnitObserverInterfacePrx hapticObserver = getHapticObserver();
49 ChannelRegistry channels = hapticObserver->getAvailableChannels(
false);
50 std::map<std::string, DatafieldRefPtr> tactileDatafields_MaximumValueMap;
52 if (channels.size() == 0)
60 for (std::pair<std::string, ChannelRegistryEntry> pair : channels)
62 std::string tactilePad = pair.first;
63 DatafieldRefBasePtr matrixDatafield =
new DatafieldRef(hapticObserver, tactilePad,
"matrix");
64 DatafieldRefBasePtr matrixNulled = hapticObserver->createFilteredDatafield(DatafieldFilterBasePtr(
new filters::OffsetFilter()), matrixDatafield);
65 DatafieldRefBasePtr matrixMax = hapticObserver->createFilteredDatafield(DatafieldFilterBasePtr(
new filters::MatrixMaxFilter()), matrixNulled);
66 tactileDatafields_MaximumValueMap.insert(std::make_pair(tactilePad, DatafieldRefPtr::dynamicCast(matrixMax)));
70 local.setTactileDatafields_MaximumValue(tactileDatafields_MaximumValueMap);
77 std::map<std::string, DatafieldRefPtr> tactileDatafields_MaximumValueMap = local.getTactileDatafields_MaximumValue();
79 while (!isRunningTaskStopped())
82 std::stringstream ssNames;
85 for (std::pair<std::string, DatafieldRefPtr> pair : tactileDatafields_MaximumValueMap)
87 std::string tactilePad = pair.first;
89 int padMax = (int)matrixMax->getDataField()->getFloat();
91 ssNames << tactilePad <<
"; ";
95 ARMARX_IMPORTANT <<
"tactile max value: " <<
max <<
"; \n\n" << ss.str() <<
"\n" << ssNames.str();