Changeset 435 in flair-src for trunk


Ignore:
Timestamp:
Jul 15, 2021, 2:44:03 PM (3 years ago)
Author:
Sanahuja Guillaume
Message:

add logs to ugv

Location:
trunk
Files:
10 edited

Legend:

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

    r432 r435  
    8383    uav->GetAhrs()->AddPlot(customReferenceOrientation,DataPlot::Yellow);
    8484    AddDataToControlLawLog(customReferenceOrientation);
     85    AddDeviceToControlLawLog(uX);
     86    AddDeviceToControlLawLog(uY);
    8587
    8688    customOrientation=new AhrsData(this,"orientation");
  • trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.cpp

    r430 r435  
    6161    startCircle=new PushButton(buttonslayout->NewRow(),"start_circle");
    6262    stopCircle=new PushButton(buttonslayout->LastRowLastCol(),"stop_circle");
     63    button_start_log = new PushButton(buttonslayout->NewRow(), "start_log");
     64    button_stop_log = new PushButton(buttonslayout->LastRowLastCol(), "stop_log");
    6365   
    6466    circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle");
     
    7779    uY=new Pid(setupLawTab->At(1,1),"u_y");
    7880    uY->UseDefaultPlot(graphLawTab->LastRowLastCol());
     81   
     82    getFrameworkManager()->AddDeviceToLog(uX);
     83    getFrameworkManager()->AddDeviceToLog(uY);
    7984   
    8085    l=new DoubleSpinBox(setupLawTab->NewRow(),"L", " m", 0, 10, 0.1, 1,1);
     
    104109
    105110void CircleFollower::CheckPushButton(void) {
     111  if (button_start_log->Clicked() == true)
     112    getFrameworkManager()->StartLog();
     113  if (button_stop_log->Clicked() == true)
     114    getFrameworkManager()->StopLog();
     115 
    106116  if (startCircle->Clicked() == true)
    107117      StartCircle();
  • trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.h

    r389 r435  
    5656
    5757        flair::filter::Pid *uX, *uY;
    58         flair::gui::PushButton *startCircle,*stopCircle,*button_kill;
     58        flair::gui::PushButton *startCircle,*stopCircle,*button_kill,*button_start_log,*button_stop_log;
    5959        flair::gui::DoubleSpinBox *l;
    6060        flair::meta::MetaVrpnObject *targetVrpn,*ugvVrpn;
  • trunk/demos/TwoWheelRobotSimpleFleet/ugv/src/SimpleFleet.cpp

    r390 r435  
    6161    startCircle=new PushButton(buttonslayout->NewRow(),"start_circle");
    6262    stopCircle=new PushButton(buttonslayout->LastRowLastCol(),"stop_circle");
     63    button_start_log = new PushButton(buttonslayout->NewRow(), "start_log");
     64    button_stop_log = new PushButton(buttonslayout->LastRowLastCol(), "stop_log");
    6365   
    6466    circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle");
     
    8082    uY=new Pid(setupLawTab->At(1,1),"u_y");
    8183    uY->UseDefaultPlot(graphLawTab->LastRowLastCol());
     84   
     85    getFrameworkManager()->AddDeviceToLog(uX);
     86    getFrameworkManager()->AddDeviceToLog(uY);
    8287   
    8388    l=new DoubleSpinBox(setupLawTab->NewRow(),"L", " m", 0, 10, 0.1, 1,1);
     
    110115
    111116void SimpleFleet::CheckPushButton(void) {
     117  if (button_start_log->Clicked() == true)
     118    getFrameworkManager()->StartLog();
     119  if (button_stop_log->Clicked() == true)
     120    getFrameworkManager()->StopLog();
     121   
    112122  if (startCircle->Clicked() == true)
    113123      StartCircle();
  • trunk/demos/TwoWheelRobotSimpleFleet/ugv/src/SimpleFleet.h

    r390 r435  
    6060
    6161        flair::filter::Pid *uX, *uY;
    62         flair::gui::PushButton *startCircle,*stopCircle,*button_kill;
     62        flair::gui::PushButton *startCircle,*stopCircle,*button_kill,*button_start_log,*button_stop_log;
    6363        flair::gui::DoubleSpinBox *l;
    6464        flair::gui::DoubleSpinBox *xCircleCenter,*yCircleCenter;
  • trunk/lib/FlairMeta/src/SimuUgv.cpp

    r377 r435  
    1919#include "SimuUgv.h"
    2020#include <SimulatedUgvControls.h>
     21#include <FrameworkManager.h>
    2122
    2223using std::string;
     
    3233
    3334  SetUgvControls(new SimulatedUgvControls("controls", simu_id,0));
    34  
     35  getFrameworkManager()->AddDeviceToLog(GetUgvControls());
    3536 
    3637}
  • trunk/lib/FlairMeta/src/SumoUgv.cpp

    r378 r435  
    1919#include "SumoUgv.h"
    2020#include <SumoUgvControls.h>
     21#include <FrameworkManager.h>
    2122
    2223
     
    3233
    3334  SetUgvControls(new SumoUgvControls("controls"));
    34  
     35  getFrameworkManager()->AddDeviceToLog(GetUgvControls());
    3536 
    3637}
  • trunk/lib/FlairSensorActuator/src/SimulatedUgvControls.cpp

    r377 r435  
    7070  }
    7171  output->ReleaseMutex();
     72 
     73  output->SetDataTime(GetTime());
     74  ProcessUpdate(output);
    7275}
    7376
  • trunk/lib/FlairSensorActuator/src/SumoUgvControls.cpp

    r378 r435  
    5151}
    5252
    53 
    5453void SumoUgvControls::SetControls(float speed,float turn) {
    5554  sumoControl->move(speed*127, turn*127);
     
    6059  output->SetValueNoMutex(1, 0, turn);
    6160  output->ReleaseMutex();
     61 
     62  output->SetDataTime(core::GetTime());
     63  ProcessUpdate(output);
    6264}
    6365
  • trunk/lib/FlairSensorActuator/src/UgvControls.h

    r377 r435  
    8585  */
    8686  void UpdateFrom(const core::io_data *data){};
    87  
     87
    8888  gui::Tab *mainTab;
    8989};
Note: See TracChangeset for help on using the changeset viewer.