This component can control the positions of multiple axes. More...
#include <nAxesControllerPos.hpp>
Public Member Functions | |
nAxesControllerPos (std::string name) | |
Constructor of the class. | |
virtual bool | configureHook () |
Configures the component, make sure the properties are updated using the OCL::DeploymentComponent or the marshalling interface of the component. | |
virtual bool | startHook () |
Starts the component. | |
virtual void | updateHook () |
Updates the output using the control equation, the measured and the desired position. | |
virtual void | stopHook () |
Protected Attributes | |
RTT::Command< bool(double, int)> | measureOffset |
Command to measure a velocity offset on the axes. | |
RTT::ReadDataPort< std::vector < double > > | p_meas_port |
The measured positions. | |
RTT::ReadDataPort< std::vector < double > > | p_desi_port |
The desired positions. | |
RTT::WriteDataPort < std::vector< double > > | v_out_port |
The output velocities. | |
RTT::Attribute< std::vector < double > > | offset_attr |
Attribute containing the calculated offsets after executing the measureOffset Command. | |
RTT::Property< std::vector < double > > | gain_prop |
The control gain values for the axes. | |
RTT::Property< unsigned int > | num_axes_prop |
The number of axes to configure the components with. |
This component can control the positions of multiple axes.
It uses a simple position-feedback to calculate an output velocity. velocity_out = K_gain * ( position_desired - position_measured)
The initial state of the component is PreOperational
Definition at line 46 of file nAxesControllerPos.hpp.
nAxesControllerPos | ( | std::string | name | ) |
Constructor of the class.
name | name of the component |
Definition at line 35 of file nAxesControllerPos.cpp.
References nAxesControllerPos::gain_prop, nAxesControllerPos::measureOffset, nAxesControllerPos::num_axes_prop, nAxesControllerPos::offset_attr, nAxesControllerPos::p_desi_port, nAxesControllerPos::p_meas_port, and nAxesControllerPos::v_out_port.
bool configureHook | ( | ) | [virtual] |
Configures the component, make sure the properties are updated using the OCL::DeploymentComponent or the marshalling interface of the component.
The number of axes and the control gains are updated.
Definition at line 67 of file nAxesControllerPos.cpp.
References nAxesControllerPos::gain_prop, nAxesControllerPos::num_axes_prop, nAxesControllerPos::offset_attr, and nAxesControllerPos::v_out_port.
bool startHook | ( | ) | [virtual] |
Starts the component.
Definition at line 94 of file nAxesControllerPos.cpp.
References nAxesControllerPos::p_desi_port, and nAxesControllerPos::p_meas_port.
RTT::Command<bool(double,int)> measureOffset [protected] |
Command to measure a velocity offset on the axes.
The idea is to keep the robot at the same position. If a velocity output is needed to do this, this is the offset you need on your axes output. The command stops after the measurement.
treshold_moving | duration of the measurement | |
num_samples | number of samples. |
Definition at line 103 of file nAxesControllerPos.hpp.
Referenced by nAxesControllerPos::nAxesControllerPos().