Project

General

Profile

optitrack component

Ports

bodies (multiple out)

Data structure
  • struct ::or_pose_estimator::state bodies

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


markers (multiple out)

Data structure
  • struct ::optitrack::marker_set markers

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

      • long sec

      • long nsec

    • sequence< struct ::optitrack::marker_pos > markers

      • double x

      • double y

      • double z


Services

get_export (attribute)

Outputs
  • struct ::optitrack::ids::pubdata_s pubdata

    • boolean bodies

    • boolean markers

    • boolean anon

    • boolean gps_mode

    • double max_fps


set_export (attribute)

Inputs
  • struct ::optitrack::ids::pubdata_s pubdata: Exported data

    • boolean bodies (default "1") Rigid bodies

    • boolean markers (default "0") Individual rigid body markers

    • boolean anon (default "0") Anonymous markers

    • boolean gps_mode (default "0") Export only bodies position without orientation

    • double max_fps (default "0") Limit publishing frequency (0 = unlimited)


get_transform (attribute)

Outputs
  • struct ::optitrack::ids::frame_s transform

    • struct ::or::t3d::pos translation

      • double x

      • double y

      • double z

    • struct ::or::t3d::att rotation

      • double qw

      • double qx

      • double qy

      • double qz

    • double roll

    • double pitch

    • double yaw

    • double pitch

    • double roll


set_transform (attribute)

Inputs
  • struct ::or::t3d::pos translation

    • double x (default "0")

    • double y (default "0")

    • double z (default "0")

  • double roll (default "1.5708")

  • double pitch (default "0")

  • double yaw (default "1.5708")

Transform coordinates according to the rotation and translation


set_gps_mode (attribute)

Inputs
  • boolean gps_mode (default "1") Export only bodies position without orientation


set_max_fps (attribute)

Inputs
  • double max_fps (default "0") Limit publishing frequency (0 = unlimited)


get_local_port (attribute)

Outputs
  • unsigned short local_port

Get the UDP port on which the socket receiving data is bound.


set_local_port (attribute)

Inputs
  • unsigned short local_port (default "1510") local UDP port for listening

Change the default port on which the socket receiving data is bound.

When multiple instances of the component must run on the same host, each instance must use a different local UDP port. This service allows to change the default 1510 port to any value. It must be invoked before connect (activity) so that the selected value is taken into account.

Note The UDP socket is bound locally to a specific port in order to overcome a limitation of the Optitrack sotftware that cannot be told to stop sending data to a client. Not locally binding the socket would lead to an accumulation of streams to the same host after mutliple (re)connections to Optitrack, and a waste of bandwidth.

get_noise (attribute)

Outputs
  • struct ::optitrack::ids::noise_s noise

    • double pstddev

    • double qstddev


set_noise (attribute)

Inputs
  • struct ::optitrack::ids::noise_s noise

    • double pstddev (default "0") Position white noise standard deviation

    • double qstddev (default "0") Orientation white noise standard deviation


get_bw (attribute)

Outputs
  • double cur Current bandwidth usage, in MB/s

  • double avg Average bandwidth usage over the last minute, in MB/s


ping (activity)

Outputs
  • double rtt Round trip time

  • string<64> info Server information

Throws
  • exception ::optitrack::e_nomem

  • exception ::optitrack::e_connection

  • exception ::optitrack::e_timeout

  • exception ::optitrack::e_network

    • string<256> what

Context

Ping the server


refresh (function)

Throws
  • exception ::optitrack::e_connection

Refetch rigid body names


body_list (function)

Outputs
  • sequence< string<64> > body_list

Throws
  • exception ::optitrack::e_nomem

Return the list of available bodies


connect (activity)

Inputs
  • string<128> host (default "localhost") Server host name

  • string<128> host_port (default "1510") Command port

  • string<128> mcast (default "239.255.42.99") Multicast source address

  • string<128> mcast_port (default "1511") Data port

Throws
  • exception ::optitrack::e_nomem

  • exception ::optitrack::e_addrinfo

    • string<256> what

Context

Export live marker data


disconnect (activity)

Throws
  • exception ::optitrack::e_nomem

Context

Stop exporting live marker data


get_logfile (attribute)

Outputs
  • string<256> logfile

Get the log file name


set_logfile (attribute)

Inputs
  • string<256> logfile (default "optitrack-%F-%T.log") File name in strftime(3) format

Throws
  • exception ::optitrack::e_access

    • string<256> what

Define the log file name


unset_logfile (function)

Stop logging


Tasks

publish

Context
Throws
  • exception ::optitrack::e_nomem