Motion Master
Loading...
Searching...
No Matches
motion_filter.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5class Cia402Drive;
6
8 public:
9 enum class Type { kPosition = 0, kVelocity, kTorque };
10
12
18 void set_target(int32_t target);
19
28 int32_t get_filtered_target(uint64_t pending_signals);
29
36
42 bool is_position();
43
49 bool is_velocity();
50
56 bool is_torque();
57
58 private:
60
61 static const double numerator_[];
62 static const double denominator_[];
63 double input_0_, input_1_, input_2_;
64 double output_0_, output_1_;
65 bool new_input_added_;
66
72 void add_input_value(double value);
73
79 void add_output_value(double value);
80};
Definition: cia402_drive.h:48
Definition: motion_filter.h:7
Type
Definition: motion_filter.h:9
int32_t get_filtered_target(uint64_t pending_signals)
Get the filtered (output) target value.
Definition: motion_filter.cc:54
bool is_position()
Check if a position motion filter is used.
Definition: motion_filter.cc:78
bool is_velocity()
Check if a velocity motion filter is used.
Definition: motion_filter.cc:82
void set_target(int32_t target)
Set the input target value.
Definition: motion_filter.cc:49
MotionFilter::Type get_type()
Get the type of the motion filter.
Definition: motion_filter.cc:76
bool is_torque()
Check if a torque motion filter is used.
Definition: motion_filter.cc:86
uint8_t type
Definition: co_dictionary.h:1
uint8_t * value
Definition: co_dictionary.h:9