Indy Tools
IndySDK provides several tools to help users take advantage of filters, filtered derivative, and shared memory. This allows users to easily configure their own low-level robot controller.
Filters
Several types of filters can be used by adding libraries of Util/Filter.h. They are defined in the namespace called NRMKFoundation.
[::Filter]
- Filter class is a parent class of LowPassFilter, FilteredDerivative, FilterLeadLag, and FilterMovingAverage classes.
- Filter class includes "filter" and "setTransferFunction".
NRMKFoundation::Filter::filter (refine the signal)
1 |
|
Parameters:
- raw: Raw signal to be filtered.
- filtered: Filtered signal.
NRMKFoundation::Filter::setTransferFunction (set the type of the filter)
1 |
|
Parameters:
- den: Denominator polynomial coefficients (i.e., den[0] + den[1]*(1/z) + den[2]*(1/z^2)...).
- num: Numerator polynominal coefficients (i.e., num[0] + num[1]*(1/z) + num[2]*(1/z^2)...).
[::LowPassFilter]
1 2 3 4 5 |
|
NRMKFoundation::LowpassFilter::setParam
- Lowpass filter implementing \begin{align} \frac{w}{s+w}, \end{align} where w is the cutoff frequency of lowpass filter.
1 |
|
Parameters:
- sampFreq: Sampling frequency of the control system.
- cutOffFreq: Cutoff frequency of the lowpass filter.
[::FilteredDerivative]
1 2 3 4 5 |
|
NRMKFoundation::FilteredDerivative::setParam
- Derivative filter implementing \begin{align} \frac{w s}{s+w}, \end{align} where w is the cutoff frequency of the filter.
1 |
|
Parameters:
- sampFreq: Sampling frequency of the control system.
- cutOffFreq: Cutoff frequency of the filter.
[::FilterLeadLag]
1 2 3 4 5 |
|
NRMKFoundation::FilterLeadLag::setParam
- lead-lag filter implementing \begin{align} \frac{(w_2 w_3/w_1)(s+w_1)}{(s+w_2)(s+w_3)}, \end{align} where \begin{align} w_1 = 2 \pi f_1, \quad w_2=2 \pi f_2, \quad\text{and}\quad w_3 = 2 \pi f_3. \end{align}
1 |
|
Parameters:
- sampFreq: Sampling frequency of control system.
- f1, f2, f3: Filtering frequencies defined above.
[::FilterMovingAverage]
1 2 3 4 5 |
|
NRMKFoundation::FilterLeadLag::FilterMovingAverage
1 2 3 4 5 6 7 8 9 10 |
|
Parameters:
- _a, _b: Denominator and nominator polynominal coefficients, respectively.
Shared Memory
Users can access shared memories using NRMKFramework::ShmemManager class. Adding libraries and data structures defined in NRMKFramework/Indy/Sharedmemory/SharedData.h allows to handle robot data via shared memory. The data structures are defined in namespace called NRMKIndy::SharedData. For more details, refer to Shared Memory chapter.
[::ShmemManager]
NRMKFramework::ShmemManager::readMemory
- Copy a certain size of shared memory (starting from a specific address) to the memory indicated by the pointer (ptrData).
1 |
|
NRMKFramework::ShmemManager::writeMemory
- Copy a certain size of memory indicated by the point (ptrData) to the shared memory (starting from a specific address).
1 |
|
NRMKFramework::ShmemManager::getPtr
- Return the void-type pointer which indicates the absolute address of the relative address defined for a certain data.
1 |
|
NRMKFramework::ShmemManager::getPtrObjByAddr
- Return T-type pointer which indicates the absolute address of the relative address defined for a certain data.
1 2 3 4 5 |
|
NRMKFramework::ShmemManager::getRefObjByAddr
- Copy the value pointed to by the pointer to a variable defined by reference.
1 2 3 4 5 |
|
NRMKFramework::ShmemManager::resetMemory
- Set all data stored in the shared memory to zero.
1 |
|
[::SharedData]
The data structures which can be processed through shared memory are given like follows. For mroe details, refer to Shared Memory chapter.
- RobotRTSharedData: Real-time robot data and EtherCAT information.
- RobotControlSharedData: Robot's state variable (e.g., position, velocity, and torque).
- RobotStateSharedData: State information of robot software program.
- RobotControlStatusSharedData: Robot's control status.
- RobotConfigSharedData: Robot's setting value.
- RobotEmergencySharedData: Recent robot error data.
- SmartDIOSharedData: Digital I/O data of control box (CB).
- SmartAIOSharedData: Analog I/O data of control box (CB).
- EndToolDOSharedData: EndTool digital output data.
- ExtraIOData: (Robotous) F/T sensor data provided from CAN port in control box (CB).
Data transmission and acquisition libraries are given as follows:
NRMKIndy::SharedData::getDataFunction
1 2 3 |
|
Parameters:
- getDataFunction: General expression of a certain function used for data acquisition (e.g., getControlData: get an object containing the data structure for robot state variables, getSmartAIO: get an object containing the data structure for analog I/O port in CB.
- DataType: General expression of a certain data structure defined in "ShredData.h".
NRMKIndy::SharedData::getPtrDataFunction
1 2 |
|
Parameters:
- getPtrDataFunction: General expression of a certain function used for data acquisition (e.g., getPtrSmartAIO, getPtrSmartDIO).
- DataType: General expression of a certain data structure defined in "SharedData.h"; a pointer variable of DataType is used as input, the function returns the address of the shared memory associated with the data.
NRMKIndy::SharedData::setSmartDO
1 2 3 |
|
Parameters:
- doNum: Digital output port number.
- doVal: Digital output value (true or false is set).
- smartDO: Memory address representing the digital output values of 8 ports.
NRMKIndy::SharedData::setSmartAO
1 |
|
Parameters:
- aoNum: Analog output port number.
- aoVal: Analog output value.