Classes | Functions | Variables
main.cpp File Reference
#include <getopt.h>
#include <execinfo.h>
#include <csignal>
#include <pthread.h>
#include <numeric>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/max.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <realtime_tools/realtime_publisher.h>
#include <diagnostic_updater/DiagnosticStatusWrapper.h>
#include <diagnostic_msgs/DiagnosticArray.h>
#include <string>
#include <vector>
#include <controller_manager/controller_manager.h>
#include <khi_robot_hardware_interface.h>
Include dependency graph for main.cpp:

Go to the source code of this file.

Classes

class  RTLoopHistory
 

Functions

bool activate (khi_robot_control::KhiRobotHardwareInterface &robot, struct timespec *tick)
 
void * controlLoop (void *)
 
int main (int argc, char *argv[])
 
static double now ()
 
static void publishDiagnostics (RealtimePublisher< diagnostic_msgs::DiagnosticArray > &publisher)
 
void quitRequested (int sig)
 
static void timespecInc (struct timespec &tick, const int &nsec)
 
void Usage (const string &msg="")
 

Variables

static pthread_t controlThread
 
static pthread_attr_t controlThreadAttr
 
struct {
   std::string   ip_
 
   double   period_
 
   char *   program_
 
   std::string   robot_
 
   bool   simulation_
 
   bool   write_
 
g_options
 
static int g_quit = 0
 
struct {
   double   halt_rt_loop_frequency
 
   accumulator_set< double, stats< max, mean > >   jitter_acc
 
   int   last_overrun
 
   int   last_severe_overrun
 
   accumulator_set< double, stats< max, mean > >   loop_acc
 
   double   overrun_loop_sec
 
   double   overrun_read
 
   double   overrun_write
 
   int   overruns
 
   accumulator_set< double, stats< max, mean > >   read_acc
 
   int   recent_overruns
 
   double   rt_loop_frequency
 
   bool   rt_loop_not_making_timing
 
   accumulator_set< double, stats< max, mean > >   write_acc
 
g_stats
 
static double last_loop_start
 
static double last_published
 
static double last_rt_monitor_time
 
static const double PERIOD_DIFF_WEIGHT = 1e-2
 
static const double PERIOD_SLEEP = 0.1
 
static const int SEC_2_NSEC = 1e+9
 
static const int SEC_2_USEC = 1e+6
 

Function Documentation

bool activate ( khi_robot_control::KhiRobotHardwareInterface robot,
struct timespec *  tick 
)
inline

Definition at line 252 of file main.cpp.

void* controlLoop ( void *  )

Definition at line 284 of file main.cpp.

int main ( int  argc,
char *  argv[] 
)

Definition at line 492 of file main.cpp.

static double now ( )
inlinestatic

Definition at line 197 of file main.cpp.

static void publishDiagnostics ( RealtimePublisher< diagnostic_msgs::DiagnosticArray > &  publisher)
static

Definition at line 128 of file main.cpp.

void quitRequested ( int  sig)

Definition at line 278 of file main.cpp.

static void timespecInc ( struct timespec &  tick,
const int &  nsec 
)
static

Definition at line 204 of file main.cpp.

void Usage ( const string &  msg = "")

Definition at line 79 of file main.cpp.

Variable Documentation

pthread_t controlThread
static

Definition at line 489 of file main.cpp.

pthread_attr_t controlThreadAttr
static

Definition at line 490 of file main.cpp.

struct { ... } g_options
int g_quit = 0
static

Definition at line 100 of file main.cpp.

struct { ... } g_stats
double halt_rt_loop_frequency

Definition at line 123 of file main.cpp.

std::string ip_

Definition at line 73 of file main.cpp.

accumulator_set<double, stats<max, mean> > jitter_acc

Definition at line 112 of file main.cpp.

double last_loop_start
static

Definition at line 101 of file main.cpp.

int last_overrun

Definition at line 115 of file main.cpp.

double last_published
static

Definition at line 101 of file main.cpp.

double last_rt_monitor_time
static

Definition at line 101 of file main.cpp.

int last_severe_overrun

Definition at line 116 of file main.cpp.

accumulator_set<double, stats<max, mean> > loop_acc

Definition at line 111 of file main.cpp.

double overrun_loop_sec

Definition at line 117 of file main.cpp.

double overrun_read

Definition at line 118 of file main.cpp.

double overrun_write

Definition at line 119 of file main.cpp.

int overruns

Definition at line 113 of file main.cpp.

double period_

Definition at line 72 of file main.cpp.

const double PERIOD_DIFF_WEIGHT = 1e-2
static

Definition at line 105 of file main.cpp.

const double PERIOD_SLEEP = 0.1
static

Definition at line 104 of file main.cpp.

char* program_

Definition at line 70 of file main.cpp.

accumulator_set<double, stats<max, mean> > read_acc

Definition at line 109 of file main.cpp.

int recent_overruns

Definition at line 114 of file main.cpp.

std::string robot_

Definition at line 75 of file main.cpp.

double rt_loop_frequency

Definition at line 124 of file main.cpp.

bool rt_loop_not_making_timing

Definition at line 122 of file main.cpp.

const int SEC_2_NSEC = 1e+9
static

Definition at line 102 of file main.cpp.

const int SEC_2_USEC = 1e+6
static

Definition at line 103 of file main.cpp.

bool simulation_

Definition at line 74 of file main.cpp.

bool write_

Definition at line 71 of file main.cpp.

accumulator_set<double, stats<max, mean> > write_acc

Definition at line 110 of file main.cpp.



khi_robot_control
Author(s): nakamichi_d
autogenerated on Fri Mar 26 2021 02:34:21