Project

General

Profile

nhfc component

Ports

rotor_input (out)

Data structure
  • struct ::or_rotorcraft::input rotor_input

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • enum ::or_rotorcraft::control_type control ∈ { velocity, throttle }

    • sequence< double, 8 > desired


rotor_measure (in)

Data structure
  • struct ::or_rotorcraft::output rotor_measure

    • sequence< struct ::or_rotorcraft::rotor_state, 8 > rotor

      • struct ::or::time::ts ts

        • long sec

        • long nsec

      • boolean emerg

      • boolean spinning

      • boolean starting

      • boolean disabled

      • double velocity

      • double throttle

      • double consumption

      • double energy_level


state (in)

Data structure
  • struct ::or_pose_estimator::state state

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::pos_cov > pos_cov

      • double cov[6]

    • optional< struct ::or::t3d::att_cov > att_cov

      • double cov[10]

    • optional< struct ::or::t3d::att_pos_cov > att_pos_cov

      • double cov[12]

    • optional< struct ::or::t3d::vel_cov > vel_cov

      • double cov[6]

    • optional< struct ::or::t3d::avel_cov > avel_cov

      • double cov[6]

    • optional< struct ::or::t3d::acc_cov > acc_cov

      • double cov[6]

    • optional< struct ::or::t3d::aacc_cov > aacc_cov

      • double cov[6]


reference (in)

Data structure
  • struct ::or_rigid_body::state reference

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::jerk > jerk

      • double jx

      • double jy

      • double jz

    • optional< struct ::or::t3d::snap > snap

      • double sx

      • double sy

      • double sz


external_wrench (out)

Data structure
  • struct ::or_wrench_estimator::state external_wrench

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::rb3d::force > force

      • double x

      • double y

      • double z

    • optional< struct ::or::rb3d::force_cov > force_cov

      • double cov[6]

    • optional< struct ::or::rb3d::torque > torque

      • double x

      • double y

      • double z

    • optional< struct ::or::rb3d::torque_cov > torque_cov

      • double cov[6]


Services

set_saturation (attribute)

Inputs
  • struct ::nhfc::ids::servo_s::sat_s sat

    • double x

    • double v

    • double ix


set_servo_gain (attribute)

Inputs
  • struct ::nhfc::ids::servo_s::gain_s gain

    • double Kpxy

    • double Kpz

    • double Kqxy

    • double Kqz

    • double Kvxy

    • double Kvz

    • double Kwxy

    • double Kwz

    • double Kixy

    • double Kiz


set_mass (attribute)

Inputs
  • double mass


set_wlimit (attribute)

Inputs
  • double wmin Minimum propeller velocity

  • double wmax Maximum propeller velocity


set_geom (attribute)

Inputs
  • double G[48] Mapping from propellers velocity^2 to wrench

  • double J[9] Inertia matrix


set_emerg (attribute)

Inputs
  • struct ::nhfc::ids::servo_s::emerg_s emerg

    • double descent (default "0.1") Vertical acceleration for emergency descent (m/s²)

    • double dx (default "0.05") Position uncertainty threshold (m)

    • double dq (default "20") Angular velocity uncertainty threshold (deg/s)

    • double dv (default "0.2") Linear velocity uncertainty threshold (m/s)

    • double dw

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 …​


set_wo_gains (attribute)

Inputs
  • double K[6] Wrench observer gains


set_af_parameters (attribute)

Inputs
  • double mass Apparent mass

  • double B[6] Apparent damping

  • double K[6] Apparent sprinf stiffness

  • double J[9] Apparent inertia matrix


set_af_wrench (attribute)

Inputs
  • struct ::or::rb3d::force force

    • double x

    • double y

    • double z

  • struct ::or::rb3d::torque torque

    • double x

    • double y

    • double z


set_af_enable (attribute)

Inputs
  • boolean enable


get_servo_parameters (attribute)

Outputs
  • struct ::nhfc::ids::servo_s servo

    • struct ::nhfc::ids::servo_s::sat_s sat

      • double x

      • double v

      • double ix

    • struct ::nhfc::ids::servo_s::gain_s gain

      • double Kpxy

      • double Kpz

      • double Kqxy

      • double Kqz

      • double Kvxy

      • double Kvz

      • double Kwxy

      • double Kwz

      • double Kixy

      • double Kiz

    • double ramp

    • double scale

    • struct ::nhfc::ids::servo_s::emerg_s emerg

      • double descent

      • double dx

      • double dq

      • double dv

      • double dw


get_body_parameters (attribute)

Outputs
  • struct ::nhfc::ids::body_s body

    • double G[48]

    • double iG[48]

    • double J[9]

    • double mass

    • unsigned short rotors

    • double wmin

    • double wmax

    • double thrust_min[3]

    • double thrust_max[3]


get_reference (attribute)

Outputs
  • struct ::or_rigid_body::state reference

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::jerk > jerk

      • double jx

      • double jy

      • double jz

    • optional< struct ::or::t3d::snap > snap

      • double sx

      • double sy

      • double sz


get_wo_parameters (attribute)

Outputs
  • struct ::nhfc::ids::wo_s wo

    • double K[6]

    • double bias[6]


get_af_parameters (attribute)

Outputs
  • struct ::nhfc::ids::af_s af

    • boolean enable

    • double mass

    • double B[6]

    • double K[6]

    • double J[9]

    • struct ::or::rb3d::force force

      • double x

      • double y

      • double z

    • struct ::or::rb3d::torque torque

      • double x

      • double y

      • double z


servo (activity)

Throws
  • exception ::nhfc::e_input

Context

Track a desired position


set_state (function)

Inputs
  • struct ::or::t3d::pos pos: Position

    • double x

    • double y

    • double z

  • struct ::or::t3d::att att: Orientation

    • double qw

    • double qx

    • double qy

    • double qz

  • struct ::or::t3d::vel vel: Linear velocity

    • double vx

    • double vy

    • double vz

  • struct ::or::t3d::avel avel: Angular velocity

    • double wx

    • double wy

    • double wz

  • struct ::or::t3d::acc acc: Acceleration

    • double ax

    • double ay

    • double az

Context

Set the desired state


set_position (function)

Inputs
  • double x

  • double y

  • double z

  • double yaw

Context

Set the desired position


set_current_position (activity)

Throws
  • exception ::nhfc::e_input

Context

Set the desired position


stop (function)

Context

Stop tracking a desired position


set_wo_zero (activity)

Inputs
  • double duration (default "2") Standstill acquisition time

Context

Compute wrench observer bias.


log (function)

Inputs
  • string<64> path (default "/tmp/nhfc.log") Log file name

  • unsigned long decimation (default "1") Reduced logging frequency

Throws
  • exception ::nhfc::e_sys

    • short code

    • string<128> what

Log state


log_stop (function)

Stop logging


log_info (function)

Outputs
  • unsigned long miss Missed log entries

  • unsigned long total Total log entries

Show missed log entries


Tasks

main

Context

wo

Context