Changeset 135 in flair-src for trunk/demos/CircleFollower


Ignore:
Timestamp:
Feb 13, 2017, 11:38:33 AM (8 years ago)
Author:
Sanahuja Guillaume
Message:

VrpnObject no longer outputs Euler (ony Quaternion): warning, output matrix has changed!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/CircleFollower/uav/src/CircleFollower.cpp

    r129 r135  
    8484const AhrsData *CircleFollower::GetOrientation(void) const {
    8585    //get yaw from vrpn
    86     Euler vrpnEuler;
    87     uavVrpn->GetEuler(vrpnEuler);
     86                Quaternion vrpnQuaternion;
     87    uavVrpn->GetQuaternion(vrpnQuaternion);
    8888
    8989    //get roll, pitch and w from imu
     
    9393
    9494    Euler ahrsEuler=ahrsQuaternion.ToEuler();
    95     ahrsEuler.yaw=vrpnEuler.yaw;
     95    ahrsEuler.yaw=vrpnQuaternion.ToEuler().yaw;
    9696    Quaternion mixQuaternion=ahrsEuler.ToQuaternion();
    9797
     
    261261
    262262void CircleFollower::VrpnPositionHold(void) {
    263     Euler vrpn_euler;
    264     Vector3D vrpn_pos;
    265 
    266     uavVrpn->GetEuler(vrpn_euler);
    267     yawHold=vrpn_euler.yaw;
    268 
    269     uavVrpn->GetPosition(vrpn_pos);
    270     vrpn_pos.To2Dxy(posHold);
     263                Quaternion vrpnQuaternion;
     264    uavVrpn->GetQuaternion(vrpnQuaternion);
     265                yawHold=vrpnQuaternion.ToEuler().yaw;
     266
     267    Vector3D vrpnPosition;
     268    uavVrpn->GetPosition(vrpnPosition);
     269    vrpnPosition.To2Dxy(posHold);
    271270
    272271    uX->Reset();
Note: See TracChangeset for help on using the changeset viewer.