nhfc component
- Ports
- Services
- set_saturation (attribute)
- set_saturation_weights (attribute)
- set_servo_gain (attribute)
- set_control_mode (attribute)
- set_wlimit (attribute)
- set_mass (attribute)
- set_geom (attribute)
- set_gtmrp_geom (function)
- set_emerg (attribute)
- get_servo_parameters (attribute)
- get_body_parameters (attribute)
- get_reference (function)
- servo (activity)
- set_state (function)
- set_position (function)
- set_current_position (activity)
- set_velocity (function)
- stop (function)
- log (activity)
- log_stop (function)
- log_info (function)
- Tasks
Ports
rotor_input (out)
Data structure
|
rotor_measure (in)
Data structure
|
state (in)
Data structure
|
reference (in)
Data structure
|
wrench_measure (out)
Data structure
|
Provides current wrench measurements.
This port contains the current wrench exerted by the UAV according to the propeller measurements and the geometric model.
Services
set_saturation (attribute)
Inputs
|
set_saturation_weights (attribute)
Inputs
|
Throws
|
Select relative priority for thrust, titlting and heading.
When the controller reaches the physical wrench limits of the platform (see set_wlimit (attribute)), an optimisation algorithm finds the closest feasible wrench that keeps the same thurst direction as well as the same roll and pitch torque direction.
The weights specified here allow to give higher priority to certain components of the wrench and let them be less affected by the optimization algorithm. Higher weight means that the corresponding component is less likely to change in intensity.
set_servo_gain (attribute)
Inputs
|
set_control_mode (attribute)
Inputs
|
Select attitude tracking control law.
With tilt_prioritized
, attitude error is split into a
reduced attitude error, which describes the misalignment of
the thrust direction, and a yaw error, which describes the
heading orientation error. This is the default.
With full_attitude
, a conventional controller, based on the full
attitude error, is used.
set_wlimit (attribute)
Inputs
|
set_geom (attribute)
Inputs
|
Set mass, allocation matrix and inertia tensor.
This is a generic function for setting the geometric parameters of the controlled robot. See set_gtmrp_geom (function) for a specialized function for tilted multi rotors robots.
set_gtmrp_geom (function)
Inputs
|
Throws
|
Compute allocation matrix and inertia tensor for tilt rotors robots.
Generically Tilted Multi-Rotor Platforms (GTMRP) are made of a set of rotors evenly distributed in a horizontal plane. The rotors are tilted around an axis lying in the plane, all by the same angle but with alternating signs on the X axis. The spinning direction is also alternating.
This function is a specialization of the more generic set_geom (attribute).
set_emerg (attribute)
Inputs
|
Set thresholds for emergency descent.
dx
, dq
, dv
and dw
represent the maximum uncertainty tolerated
in the input state (in) for position (dx
), orientation (dq
),
linear velocity (dv
) and angular velocity (dw
), measured as 3
times the standard deviation.
By default, dx
is 5cm, dq
is 5⁰, dv
is 20cm/s and dw
20⁰/s.
Beyond that threshold, an emergency descent is started.
As long as the emergency descent is active, the position error or
linear velocity error are cancelled (i.e. the desired roll and pitch
are set to 0) and a vertical acceleration of descent
(by default
-0.1 m/s²) is requested. The descent is based on the mass only,
with no feedback, as the state is considered invalid. If the
orientation is invalid in the state (in), then no control on the
attitude is possible and the stability is not guaranteed …
get_servo_parameters (attribute)
Outputs
|
get_body_parameters (attribute)
Outputs
|
get_reference (function)
Outputs
|
servo (activity)
Throws
|
Context
|
Track a desired position
set_state (function)
Inputs
|
Throws
|
Context
|
Set the desired state
set_position (function)
Inputs
|
Throws
|
Context
|
Set the desired position
The controller will hover on the given position and heading, with a zero velocity.
set_current_position (activity)
Throws
|
Context
|
Set the desired position to the current state.
The controller will hover on the position and heading currently given by the state contained in the port state (in), with a zero velocity. Note that state (in) is only read once and the robot will not track changes in the state. See servo (activity) for an actual trajectory tracking.
set_velocity (function)
Inputs
|
Throws
|
Context
|
Set the desired velocity
The controller will try to reach the given velocity and heading angular velocity. Note that for safety reasons, a watchdog will trigger after 500ms and reset the target velocity to zero.
log (activity)
Inputs
|
Throws
|
Context
|
Log state
Tasks
main
Context
|