-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimulator.h
50 lines (39 loc) · 1.09 KB
/
Simulator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef SIMULATOR_HEADER_H
#define SIMULATOR_HEADER_H
#include <ode/ode.h>
#include <drawstuff/drawstuff.h>
#include <iostream>
#include <array>
#include <algorithm>
#ifdef _MSC_VER
#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints
#endif
#ifdef dDOUBLE
#define dsDrawCapsule dsDrawCapsuleD
#define dsDrawCylinder dsDrawCylinderD
#define dsDrawBox dsDrawBoxD
#define dsDrawLine dsDrawLineD
#define dsDrawSphere dsDrawSphereD
#endif
#define THREE_WHEEL
#define SHOW_SIMULATOR_LOG
namespace Simulator{
void init(int argc, char **argv);
void loop();
void printLog();
void setMotorParams(int id, int Kp, int Ki, int Ti, int max_current);
void setMotorCurrent(int id, float current);
void freeMotor(int id);
std::uint16_t getEncTotal(int id);
std::uint16_t getLineSensorColors(int id);
// static void start();
// static void nearCallback(void *, dGeomID, dGeomID);
// static void command(int);
// void control();
// static void simLoop(int);
// void setDrawStuff();
// void makeOmni();
void quit();
};
void control(int);
#endif