36 trace_size_(trace_size),
57 std::string topic(
"motor_trace");
58 if (!actuator_info.name.empty())
60 topic = topic +
"/" + actuator_info.name;
70 msg.actuator_info = actuator_info;
105 msg.samples.reserve(size);
108 for (
unsigned i = 0; i < size; ++i)
131 else if (delay > 900)
void flagPublish(const std::string &reason, int level, int delay)
flags delayed publish of motor trace.
void sample(const sr_edc_ethercat_drivers::MotorTraceSample &s)
Adds sample to motor trace.
bool initialize(const sr_edc_ethercat_drivers::ActuatorInfo &actuator_info)
Initializes motor trace publisher.
realtime_tools::RealtimePublisher< sr_edc_ethercat_drivers::MotorTrace > * publisher_
Publishes the last second of the motor controller.
MotorTraceBuffer(unsigned trace_size)
unsigned published_traces_
void checkPublish()
Publishes motor trace if delay time is up.
std::string publish_reason_
std::vector< sr_edc_ethercat_drivers::MotorTraceSample > trace_buffer_