added activity detection
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
#ifndef MYCONTROL_H
|
||||
#define MYCONTROL_H
|
||||
|
||||
#include "../lukas/Activities.h"
|
||||
|
||||
/** current control data for the transition step */
|
||||
struct MyControl {
|
||||
|
||||
float walked_m = 0;
|
||||
|
||||
float headingChange_rad = 0;
|
||||
|
||||
Activity currentActivitiy = Activity::UNKNOWN;
|
||||
|
||||
};
|
||||
|
||||
#endif // MYCONTROL_H
|
||||
|
||||
@@ -71,16 +71,18 @@ public:
|
||||
weight *= beaconEval.getProbability(p.state, observation);
|
||||
}
|
||||
|
||||
if (useStep) {
|
||||
weight *= stepEval.getProbability(p.state, observation.step);
|
||||
}
|
||||
// CONTROL!
|
||||
// if (useStep) {
|
||||
// weight *= stepEval.getProbability(p.state, observation.step);
|
||||
// }
|
||||
|
||||
if (useTurn) {
|
||||
weight *= turnEval.getProbability(p.state, observation.turn, true);
|
||||
// CONTROL!
|
||||
// if (useTurn) {
|
||||
// weight *= turnEval.getProbability(p.state, observation.turn, true);
|
||||
|
||||
//set
|
||||
p.state.angularHeadingChange = observation.turn->delta_heading;
|
||||
}
|
||||
// //set
|
||||
// p.state.angularHeadingChange = observation.turn->delta_heading;
|
||||
// }
|
||||
|
||||
// set and accumulate
|
||||
p.weight = weight;
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
// get new destination
|
||||
//const Node3* dst = choice->getTarget(src, p.state, dist_m);
|
||||
p.state.walkState = walker.getDestination(grid, p.state.walkState, control->walked_m, control->headingChange_rad );
|
||||
p.state.walkState = walker.getDestination(grid, p.state.walkState, control->walked_m, control->headingChange_rad, control->currentActivitiy );
|
||||
|
||||
// randomly move the particle within its target grid (box)
|
||||
// (z remains unchanged!)
|
||||
|
||||
Reference in New Issue
Block a user