Project

General

Profile

mrsim component

Ports

gps (out)

Data structure
  • struct ::or_pose_estimator::state gps

    • 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]


state (out)

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]


Services

set_motor (function)

Inputs
  • double Cf (default "0.00065") Rotor thrust coefficient (N.s²)

  • double Ct (default "1e-05") Rotor quadratic torque coefficient (N.m.s²)

  • double b (default "0") Rotor linear torque coefficient (N.m.s)

  • double J (default "8e-05") Rotor inertia (kg.m²)

  • double K (default "0.0126") Torque constant (N.m/A)

  • double R (default "0.15") Electric resistance (Ohm)

  • double L (default "0.0002") Electric inductance (H)

  • double V (default "16") Battery voltage (V)

Set simulation parameters for the motors


get_motor (function)

Outputs
  • double Cf Rotor thrust coefficient (N.s²)

  • double Ct Rotor quadratic torque coefficient (N.m.s²)

  • double b Rotor linear torque coefficient (N.m.s)

  • double J Rotor inertia (kg.m²)

  • double b Rotor drag (N.m.s)

  • double K Torque constant (N.m/A)

  • double R Electric resistance (Ohm)

  • double L Electric inductance (H)

  • double V Battery voltage (V)

Get simulation parameters for the motors


set_gtmrp_geom (function)

Inputs
  • unsigned short rotors (default "4") Number of rotors

  • double cx (default "0") X position of center of rotors wrt center of mass (m)

  • double cy (default "0") Y position of center of rotors wrt center of mass (m)

  • double cz (default "0") Z position of center of rotors wrt center of mass (m)

  • double armlen (default "0.23") Distance of rotors to the center (m)

  • double mass (default "1.28") Total mass (kg)

  • double mbodyw (default "0.11") Main mass body width (m)

  • double mbodyh (default "0.17") Main mass body height (m)

  • double mmotor (default "0.07") Motor mass (kg)

  • double rx (default "0") X rotation of the first rotor thrust vector (deg)

  • double ry (default "0") Y rotation of the first rotor thrust vector (deg)

  • short rz (default "1") Z spin direction of the first rotor (1: ccw, -1: cw)

  • double cf (default "0.00065") Propeller thrust coefficient (N.s²)

  • double ct (default "1e-05") Propeller torque coefficient (N.m.s²)

Throws
  • exception ::mrsim::e_inval

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 (function).


set_geom (function)

Inputs
  • sequence< double > G Mapping from propellers velocity^2 to wrench

  • double J[9] Inertia matrix


get_geom (function)

Outputs
  • sequence< double > G Mapping from propellers velocity^2 to wrench

  • double J[9] Inertia matrix


set_mass (function)

Inputs
  • double m (default "1") Mass in kg


get_mass (function)

Outputs
  • double m Mass in kg


set_gps_period (attribute)

Inputs
  • double gps_period


get_gps_period (attribute)

Outputs
  • double gps_period


set_rotors (function)

Inputs
  • unsigned short n (default "4") Numer of controller rotors

Throws
  • exception ::mrsim::e_sys

    • short code

    • string<128> what


get_rotors (function)

Outputs
  • unsigned short n Numer of controller rotors


set_pty (activity)

Inputs
  • string<64> device

Throws
  • exception ::mrsim::e_sys

    • short code

    • string<128> what

Context

Set pty path


set_state (activity)

Inputs
  • double x

  • double y

  • double z

  • double yaw

  • double pitch

  • double roll

  • double vx

  • double vy

  • double vz

  • double wx

  • double wy

  • double wz

Context
  • In task main (frequency 1000.0 Hz)

Set current state


Tasks

main

Context

read

Context
  • Free running