optitrack_broadcast

(FSC lab) calculate rigid-body velocity based on position stream from vrpn

https://github.com/longhaoqian/optitrack_broadcast

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

(FSC lab) calculate rigid-body velocity based on position stream from vrpn

Basic Info
  • Host: GitHub
  • Owner: LonghaoQian
  • Language: C++
  • Default Branch: master
  • Size: 34.2 KB
Statistics
  • Stars: 18
  • Watchers: 1
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Citation

README.md

The Ros node for computing rigid-body linear and angular velocity based on data streaming from the Motive software

Generic badge Maintenance

Node description:

The OptiTrack node is responsible for processing the position and attitude feedback for quadrotor experiments in Flight System and Control Lab (FSC). The OptiTrack node shall be download and installed on the ground station desktop/computer. The OptiTrack node supports an arbitrary number of rigid bodies defined in the argument of the launch file. The names of the rigid bodies should be the same as the ones used in the Moitve software.

User guide:

  • Intall and make sure you can run vrpnclientros pacakge first: http://wiki.ros.org/vrpnclientros . This pacakge is used to receive the data stream from the Motive software.
  1. you may either download and complie the source file from https://github.com/ros-drivers/vrpnclientros, or sudo apt-get install ros-kinetic-vrpn-client-ros -y. Change the kinetic to the ubuntu version you are using.
  2. roslaunch vrpn_client_ros sample.launch
  3. use rostopic list to check whether the rigid-body information from the Motive software is published and updated.
  • You may install the OptiTrack node using the following commands:
  1. $ cd yourws/src/
  2. $ git clone https://github.com/LonghaoQian/optitrack_broadcast
  3. $ cd ../..
  4. $ catkin build
  • For gazebo simulations, please use emulator_for_gazebo.launch to generate simulated position and velocity data stream.

  • For flight experiments, please use optitrack_broadcast_p300.launch to obtain the position and velocity measurements.

  • Adjust the arguments in the pkg node based on the rigid bodies defined in Motive software to get corresponding feedbacks.

For Gazebo simulations:

Adjust the argument "objects" according to the names of the rigid bodies defined in Motive software in the following XML node: <arg name="objects" default="UAV0 UAV1 UAV2 Payload"/> The default name list is "UAV0 , UAV1, UAV2, Payload".

For flight experiments:

Make sure that the IP address of the desktop running the Motive software is correct. The IP address is specified in <arg name="server" default="192.168.2.230"/>

The IP address of the Motive desktop is the default: 192.168.2.230.

Adjust the value of args according to the names of the rigid bodies defined in Motive software in the following XML node: <node pkg = "optitrack_broadcast" name = "broadcast_1" type = "broadcast_position_velocity" output="screen" args="UAV cf1 cf2 cf3 cf4 cf5"/> The default name list is "UAV, cf1, cf2, cf3, cf4, cf5".

The data structure:

The OptiTrack node utilizes a customized Ros data structure Mocap.msg to reduce the wireless communication burden for experiments. Mocap.msg is defined as follows:

std_msgs/Header header

float32[3] position ## [m]

float32[3] velocity ## [m/s]

float32[3] angular_velocity ## [rad/s]

float32[4] quaternion ##

Copy Mocap.msg to the msg folder of your project and add this customized message type to your CMakelist.txt in oder to use the data type:

addmessagefiles(

DIRECTORY msg

FILES

Mocap.msg

)

The velocity estimation algorithm

The Motive software only streams the position and the attitude of the specified rigid bodies to the ground station computer, so the OptiTrack node calculates the velocity and angular velocity of the rigid bodies based on the following algorithms. We denote equation as the raw data streamed form the Motive software. The velocity estimation at the Nth time step is denoted as equation, obtained as follows:

equation

where dt is the size of the time step between the Nth and the N-1th data feedback. The attitude of the rigid body from the Motive software is expressed in a quaternion: equation. Two auxiliary matrices are defined as follows:

equation

Then we can calculate the rotation matrix between the body-fixed frame of the rigid body and the inertial frame at the Nth time step:

equation

The angular velocity estimation is calculated by using the Lie algebra of the rotation matrix. The equation map is denoted as the inverse of the Lie map.

equation

After obtaining the raw velocity estimation, we use the following sliding window filter to provide a filtered result:

equation

equation

The size of the window is set to 4 based on experimental testings.

Owner

  • Name: Dr. Longhao Qian
  • Login: LonghaoQian
  • Kind: user
  • Location: North York, Ontario, Canada
  • Company: University of Toronto Institute for Aerospace Studies

Ph.D. in Robotics and Machine Learning

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Qian"
  given-names: "Longhao"
  orcid: "https://orcid.org/0000-0002-3967-1368"
title: "A C++ OptiTrack Data Processing Package"
version: 1.1
doi: 10.5281/zenodo.10247034
date-released: 2023-12-01
url: "https://github.com/LonghaoQian/optitrack_broadcast"

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2