37 Object::Object(std::string objectName, std::string observedId,
int rankingMethodEntry,
double alphaEntry,
double betaEntry,
double gammaEntry)
61 for (std::vector<ObjectPointSharedPointer>::iterator pointIterator =
PointList.begin() ; pointIterator !=
PointList.end(); ++pointIterator)
63 mx += (*pointIterator)->getX();
64 my += (*pointIterator)->getY();
65 mz += (*pointIterator)->getZ();
79 for (std::vector<ObjectPointSharedPointer>::iterator pointIterator =
PointList.begin() ; pointIterator !=
PointList.end(); ++pointIterator)
81 vx = pow((*pointIterator)->getX() -
Average->getX(),2);
82 vy = pow((*pointIterator)->getY() -
Average->getY(),2);
83 vz = pow((*pointIterator)->getZ() -
Average->getZ(),2);
85 " got values for position variation (vx,vy,vz):(" 86 << vx <<
", " << vy <<
", " << vz <<
")");
87 PosVar += sqrt(vx + vy + vz);
88 ROS_DEBUG_STREAM(
"IObjects::CalcPosVar incremented position variation " << this->
PosVar);
114 ROS_DEBUG_STREAM(
"IObjects::DisplayStats average distance to other objects " 116 ROS_DEBUG_STREAM(
"IObjects::DisplayStats normalized average distance to other objects " 123 std::ofstream file(filePath, std::ios::out | std::ios::app);
126 file << std::endl <<
"Object " << this->
ObjectName << std::endl;
127 file <<
"Pos Var " <<
PosVar << std::endl;
132 file <<
"Rank value " <<
rankValue << std::endl;
double AverageDistanceToOtherObjects
void publishLogs(std::string filePath)
#define ROS_DEBUG_STREAM(args)
std::shared_ptr< ObjectPoint > ObjectPointSharedPointer
ObjectPointSharedPointer Average
std::vector< ObjectPointSharedPointer > PointList
double NormalizedAverageDistanceToOtherObjects