-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60d133f
commit 8663299
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <Sensor.h> | ||
|
||
|
||
LIDARSensor::LIDARSensor(int temp) | ||
{ | ||
this.active = false; | ||
this.samplingRate = temp; | ||
} | ||
|
||
Constraints* LIDARSensor::createFactor() | ||
{ | ||
} | ||
|
||
Odometry::Odometry(int temp) | ||
{ | ||
this.active = false; | ||
this.samplingRate = temp; | ||
} | ||
|
||
|
||
Constraints* Odometry::createFactor() | ||
{ | ||
} | ||
|
||
|
||
Camera::Camera(int temp) | ||
{ | ||
this.active = false; | ||
this.samplingRate = temp; | ||
} | ||
|
||
Constraints* Camera::createFactor() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <OptimizerBase.h> | ||
|
||
class SensorBase | ||
{ | ||
public: | ||
bool active; | ||
float samplingRate | ||
Constraints* createFactors(); | ||
|
||
}; | ||
|
||
class LIDARSensor: public SensorBase | ||
{ | ||
|
||
public: | ||
LIDARSensor(float temp); | ||
|
||
}; | ||
|
||
class Odometry: public SensorBase | ||
{ | ||
|
||
public: | ||
Odometry(float temp); | ||
|
||
}; | ||
|
||
class Camera: public SensorBase | ||
{ | ||
|
||
public: | ||
Camera(float temp); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <Sensor.h> | ||
|
||
int main() | ||
{ | ||
LIDARSensor l1(2); | ||
Odometry o1(4); | ||
Camera c1(8); | ||
int time = 0; | ||
while(1) | ||
{ | ||
time = time + 1; | ||
if (time % l1.samplingRate == 0) | ||
{ | ||
l1.active = true; | ||
l1. createFactor(); | ||
|
||
} | ||
|
||
} | ||
} |