Cheetah Software
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
HardwareInterface.cpp
Go to the documentation of this file.
1
//#include "HardwareInterface.h"
2
//#include "main.h"
3
//#include <sys/timerfd.h>
4
//#include <thread>
5
//#include <pthread.h>
6
//#include <stdio.h>
7
//#include <stdlib.h>
8
//#include <errno.h>
9
//#include <iostream>
10
//#include <stdio.h>
11
//#include <sched.h>
12
//#include <stdlib.h>
13
//#include <sys/time.h>
14
//#include <sys/mman.h>
15
//#include <unistd.h>
16
//#include <signal.h>
17
//#include <string.h>
18
//#include <pthread.h>
19
//#include <time.h>
20
//#include <lcm/lcm.h>
21
//#include <thread>
22
//
23
// static constexpr int taskPriority = 49;
24
//
26
// * Initialize the robot hardware
27
// */
28
// HardwareInterface::HardwareInterface() {
29
// prefaultStack();
30
// setupRT();
31
//
32
//}
33
//
35
// * Make sure there are no page faults when accessing the stack
36
// */
37
// void HardwareInterface::prefaultStack() {
38
// constexpr int stackSize = 24*1024;
39
// volatile unsigned char stack[stackSize];
40
// stack[stackSize/2] = 2;
41
// memset((void*)stack,0,stackSize);
42
// if(mlockall(MCL_CURRENT|MCL_FUTURE) == -1) {
43
// printf("[HardwareInterface] failed to mlockall. This is likely because
44
// cheetah wasn't run as root, and is okay for simulation.\n");
45
// }
46
//}
47
//
48
// void HardwareInterface::setupRT() {
49
// sched_param params;
50
// params.sched_priority = taskPriority;
51
// sched_setscheduler(0, SCHED_FIFO, ¶ms);
52
//}
home
dhkim
Public_Repository
Cheetah-Software
robot
src
HardwareInterface.cpp
Generated by
1.8.11