This component can control the accelerations of multiple axes. More...
#include <nAxesControllerPosVelAcc.hpp>
Public Member Functions | |
nAxesControllerPosVelAcc (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::Method< void(void)> | reset_all_mtd |
Method to reset the controller of all axes. | |
RTT::Method< void(int)> | resetAxis_mtd |
Method to reset the controller of axis. | |
RTT::ReadDataPort< std::vector < double > > | p_m_port |
The measured positions. | |
RTT::ReadDataPort< std::vector < double > > | v_m_port |
The measured velocities. | |
RTT::DataPort< std::vector < double > > | p_d_port |
The desired positions. | |
RTT::DataPort< std::vector < double > > | v_d_port |
The desired velocities. | |
RTT::DataPort< std::vector < double > > | a_d_port |
The calculated desired accelerations. | |
RTT::WriteDataPort < std::vector< double > > | a_out_port |
The calculated output accelerations. | |
RTT::Property< std::vector < double > > | Kp_prop |
The position control gain value for each axis. | |
RTT::Property< std::vector < double > > | Kv_prop |
The velocity control gain value for each axis. | |
RTT::Property< unsigned int > | num_axes_prop |
The number of axes to configure the components with. | |
RTT::Property< bool > | use_ad |
False if no desired acceleration/velocity/position available;. | |
RTT::Property< bool > | use_vd |
RTT::Property< bool > | use_pd |
RTT::Property< bool > | avoid_drift |
If no desired position/velocity available integrate velocity/acceleration if true. | |
RTT::Property< bool > | differentiate |
If no desired acceleration/velocity available differentiate velocity/position if true. |
This component can control the accelerations of multiple axes.
It uses a simple position- and velocity-feedback and acceleration feedforward to calculate an output acceleration from a desired velocity and measured position, velocity. acceleration_out = Kp * ( position_desired - position_measured) + Kv(velocity_desired- velocity_measured) + acceleration_desired. The desired position is calculated by integrating the desired velocity, the desired acceleration by differentiation of the desired velocity
The initial state of the component is PreOperational
Definition at line 46 of file nAxesControllerPosVelAcc.hpp.
nAxesControllerPosVelAcc | ( | std::string | name | ) |
Constructor of the class.
name | name of the TaskContext |
Definition at line 24 of file nAxesControllerPosVelAcc.cpp.
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 73 of file nAxesControllerPosVelAcc.cpp.
bool startHook | ( | ) | [virtual] |
Starts the component.
Definition at line 118 of file nAxesControllerPosVelAcc.cpp.
RTT::Method<void(int)> resetAxis_mtd [protected] |
Method to reset the controller of axis.
axis | axis controller to be reset |
Definition at line 99 of file nAxesControllerPosVelAcc.hpp.