#include <nAxesGeneratorVel.hpp>
Public Member Functions | |
| nAxesGeneratorVel (std::string name) | |
| Constructor of the class The interface of the component is build. | |
| 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 desired position and velocity according to the calculated profile. | |
| virtual void | stopHook () |
Protected Attributes | |
| RTT::Command< bool(int, double, double)> | applyVelocity_cmd |
| Command to apply a certain velocity to an axis for a amount of time. | |
| RTT::Command< bool(std::vector < double >, double)> | applyVelocities_cmd |
| Same as nAxesGeneratorVel::applyVelocity_cmd but for all axes at the same time. | |
| RTT::Command< bool(int, double, double)> | gotoVelocity_cmd |
| Command to accelerate to a certain velocity and maintain this velocity. | |
| RTT::Command< bool(std::vector < double >, double)> | gotoVelocities_cmd |
| Same as nAxesGeneratorVel::gotoVelocity_cmd but for all axes at the same time. | |
| RTT::Method< void(int, double)> | setInitVelocity_mtd |
| Sets the initial velocity for the axis. | |
| RTT::Method< void(std::vector < double >)> | setInitVelocities_mtd |
| Same as nAxesGeneratorVel::setInitVelocity_cmd but for all axes at the same time. | |
|
RTT::WriteDataPort < std::vector< double > > | v_d_port |
| The current desired velocities. | |
|
RTT::Property< std::vector < double > > | a_max_prop |
| Vector of the maximum accelerations of each axes to be used in the interpolation. | |
|
RTT::Property< std::vector < double > > | j_max_prop |
| Vector of the maximum jerks of each axes to be used in the interpolation. | |
| RTT::Property< unsigned int > | num_axes_prop |
| Number of axes to configure the component for. | |
It uses KDL for the time interpolation. The interpolation uses a trapezoidal acceleration profile using a maximum acceleration and a maximum jerk.
The initial state of the component is PreOperational
Definition at line 51 of file nAxesGeneratorVel.hpp.
| nAxesGeneratorVel | ( | std::string | name | ) |
Constructor of the class The interface of the component is build.
| name | name of the TaskContext |
Definition at line 31 of file nAxesGeneratorVel.cpp.
References nAxesGeneratorVel::a_max_prop, nAxesGeneratorVel::applyVelocities_cmd, nAxesGeneratorVel::applyVelocity_cmd, nAxesGeneratorVel::gotoVelocities_cmd, nAxesGeneratorVel::gotoVelocity_cmd, nAxesGeneratorVel::j_max_prop, nAxesGeneratorVel::num_axes_prop, nAxesGeneratorVel::setInitVelocities_mtd, nAxesGeneratorVel::setInitVelocity_mtd, and nAxesGeneratorVel::v_d_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, maximum accelerations and jerks for the profiles are updated.
Definition at line 87 of file nAxesGeneratorVel.cpp.
References nAxesGeneratorVel::a_max_prop, nAxesGeneratorVel::j_max_prop, nAxesGeneratorVel::num_axes_prop, and nAxesGeneratorVel::v_d_port.
| bool startHook | ( | ) | [virtual] |
Starts the component.
Definition at line 128 of file nAxesGeneratorVel.cpp.
RTT::Command<bool(std::vector<double>,double)> applyVelocities_cmd [protected] |
Same as nAxesGeneratorVel::applyVelocity_cmd but for all axes at the same time.
| velocity | vector with desired velocities | |
| duration | duration of the movement |
Definition at line 127 of file nAxesGeneratorVel.hpp.
Referenced by nAxesGeneratorVel::nAxesGeneratorVel().
RTT::Command<bool(int,double,double)> applyVelocity_cmd [protected] |
Command to apply a certain velocity to an axis for a amount of time.
Command is completed when duration is passed.
| axis | number of axis | |
| velocity | desired velocity | |
| duration | duration of the movement |
Definition at line 116 of file nAxesGeneratorVel.hpp.
Referenced by nAxesGeneratorVel::nAxesGeneratorVel().
RTT::Command<bool(std::vector<double>,double)> gotoVelocities_cmd [protected] |
Same as nAxesGeneratorVel::gotoVelocity_cmd but for all axes at the same time.
| velocity | vector with desired velocities | |
| duration | minimum duration of the acceleration |
Definition at line 152 of file nAxesGeneratorVel.hpp.
Referenced by nAxesGeneratorVel::nAxesGeneratorVel().
RTT::Command<bool(int,double,double)> gotoVelocity_cmd [protected] |
Command to accelerate to a certain velocity and maintain this velocity.
Command stops when desired velocity is reached.
| axis | number of axis | |
| velocity | desired velocity | |
| duration | minimum duration of acceleration |
Definition at line 140 of file nAxesGeneratorVel.hpp.
Referenced by nAxesGeneratorVel::nAxesGeneratorVel().
RTT::Method<void(std::vector<double>)> setInitVelocities_mtd [protected] |
Same as nAxesGeneratorVel::setInitVelocity_cmd but for all axes at the same time.
| velocity | initial velocities of all axes. |
Definition at line 173 of file nAxesGeneratorVel.hpp.
Referenced by nAxesGeneratorVel::nAxesGeneratorVel().
RTT::Method<void(int,double)> setInitVelocity_mtd [protected] |
Sets the initial velocity for the axis.
| axis | axis number | |
| velocity | initial velocity of the axis |
Definition at line 162 of file nAxesGeneratorVel.hpp.
Referenced by nAxesGeneratorVel::nAxesGeneratorVel().
1.5.8