Skip to content

Commit

Permalink
modifying some facts to be more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg8978 committed Jun 24, 2016
1 parent 942206c commit 34864ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion agent_monitor/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,7 @@ int main(int argc, char** argv) {
fact_msg.time = mapTRBEntity_[(*itAgnt)].back()->getTime();
fact_msg.subjectOwnerId = "";
fact_msg.targetOwnerId = "";
fact_msg.valueType = 1;

factList_msg.factList.push_back(fact_msg);
}
Expand All @@ -1314,7 +1315,7 @@ int main(int argc, char** argv) {
if (speed > (motion2DBodySpeedThreshold_)) {
//printf("[AGENT_MONITOR][DEBUG] %s is moving %lu\n", mapTRBEntity_[(*itAgnt)].back()->getName().c_str(), mapTRBEntity_[(*itAgnt)].back()->getTime());

double confidence = speed * 3.6 / 20.0; // Confidence is 1 if speed is 20 km/h or above
double confidence = speed * 3.6 / 5.0; // Confidence is 1 if speed is 5 km/h or above

if (confidence > 1.0) {
confidence = 1.0;
Expand Down
13 changes: 9 additions & 4 deletions area_manager/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,12 +597,13 @@ int main(int argc, char** argv) {
//Fact Facing
fact_msg.property = "IsFacing";
fact_msg.propertyType = "posture";
fact_msg.subProperty = "orientationAngle";
fact_msg.subProperty = "angle";
fact_msg.subjectId = itEntity->first;
fact_msg.targetId = ownerEnt->getId();
fact_msg.confidence = confidence;
fact_msg.stringValue = true;
fact_msg.doubleValue = angleResult;
fact_msg.valueType = 1;
fact_msg.valueType = 0;
fact_msg.factObservability = 0.5;
fact_msg.time = itEntity->second->getTime();

Expand All @@ -629,7 +630,7 @@ int main(int argc, char** argv) {

if (itArea->second->getAreaType() == "room") {
//Fact in Area
fact_msg.property = "isIn";
fact_msg.property = "IsInRoom";
fact_msg.propertyType = "position";

fact_msg.subProperty = itArea->second->getAreaType();
Expand All @@ -642,11 +643,13 @@ int main(int argc, char** argv) {
fact_msg.confidence = 1;
fact_msg.factObservability = 0.8;
fact_msg.time = itEntity->second->getTime();
fact_msg.valueType = 0;
fact_msg.stringValue = "true";

factList_msg.factList.push_back(fact_msg);
} else if (itArea->second->getAreaType() == "support") {
//Fact in Area
fact_msg.property = "isAt";
fact_msg.property = "IsAt";
fact_msg.propertyType = "position";

fact_msg.subProperty = "location";
Expand All @@ -659,6 +662,8 @@ int main(int argc, char** argv) {
fact_msg.confidence = 1;
fact_msg.factObservability = 0.8;
fact_msg.time = itEntity->second->getTime();
fact_msg.valueType = 0;
fact_msg.stringValue = "true";

factList_msg.factList.push_back(fact_msg);

Expand Down

0 comments on commit 34864ab

Please sign in to comment.