#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. | |
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 29 of file nAxesControllerPosVelAcc.cpp.
References nAxesControllerPosVelAcc::a_d_port, nAxesControllerPosVelAcc::a_out_port, nAxesControllerPosVelAcc::avoid_drift, nAxesControllerPosVelAcc::differentiate, nAxesControllerPosVelAcc::Kp_prop, nAxesControllerPosVelAcc::num_axes_prop, nAxesControllerPosVelAcc::p_d_port, nAxesControllerPosVelAcc::p_m_port, nAxesControllerPosVelAcc::reset_all_mtd, nAxesControllerPosVelAcc::resetAxis_mtd, nAxesControllerPosVelAcc::use_ad, nAxesControllerPosVelAcc::v_d_port, and nAxesControllerPosVelAcc::v_m_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 78 of file nAxesControllerPosVelAcc.cpp.
References nAxesControllerPosVelAcc::a_out_port, nAxesControllerPosVelAcc::Kp_prop, and nAxesControllerPosVelAcc::num_axes_prop.
| bool startHook | ( | ) | [virtual] |
Starts the component.
Definition at line 123 of file nAxesControllerPosVelAcc.cpp.
References nAxesControllerPosVelAcc::Kp_prop, nAxesControllerPosVelAcc::p_m_port, and nAxesControllerPosVelAcc::v_m_port.
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.
Referenced by nAxesControllerPosVelAcc::nAxesControllerPosVelAcc().
1.5.8