Changeset 214 in flair-src for trunk/demos
- Timestamp:
- Feb 7, 2018, 5:49:27 PM (7 years ago)
- Location:
- trunk/demos
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml
r157 r214 27 27 <DoubleSpinBox value="0.006" name="j_pitch:"/> 28 28 <DoubleSpinBox value="0.1" name="j_yaw:"/> 29 < /Tab>29 <SpinBox name="motor timeout:" value="100"/></Tab> 30 30 <Tab name="us"> 31 31 <GroupBox name="position"> … … 40 40 </GroupBox> 41 41 <DoubleSpinBox value="6" name="range:"/> 42 <Vector3DSpinBox name="position" value_x="0 .00" value_y="0.00" value_z="0.0400000000000000"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></Tab>42 <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></Tab> 43 43 <Tab name="bottom camera"> 44 44 <GroupBox name="position"> -
trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml
r21 r214 16 16 <DoubleSpinBox value="-1.2" name="z:"/> 17 17 <SpinBox value="90" name="yaw (deg):"/> 18 <Vector3DSpinBox name="position" value_x="-1.5 0" value_y="0.00" value_z="-1.00"/></Tab>18 <Vector3DSpinBox name="position" value_x="-1.5" value_y="0" value_z="-1"/></Tab> 19 19 <Tab name="model"> 20 20 <DoubleSpinBox value="1.6" name="mass (kg):"/> … … 31 31 <DoubleSpinBox value="0.72" name="sigma:"/> 32 32 <DoubleSpinBox value="1" name="S:"/> 33 < /Tab>33 <SpinBox name="motor timeout:" value="100"/></Tab> 34 34 <Tab name="us"> 35 35 <GroupBox name="position"> … … 44 44 </GroupBox> 45 45 <DoubleSpinBox value="6" name="range:"/> 46 <Vector3DSpinBox name="position" value_x="0 .00" value_y="0.00" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/></Tab>46 <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></Tab> 47 47 <Tab name="bottom camera"> 48 48 <GroupBox name="position"> … … 96 96 <DoubleSpinBox value="0" name="z:"/> 97 97 <SpinBox value="90" name="yaw (deg):"/> 98 <Vector3DSpinBox name="position" value_x="-1.5 0" value_y="1.00" value_z="0.00"/></Tab>98 <Vector3DSpinBox name="position" value_x="-1.5" value_y="1" value_z="0"/></Tab> 99 99 <Tab name="model"> 100 100 <DoubleSpinBox value="1.3" name="translational speed (m/s):"/> -
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r171 r214 24 24 #include <MetaVrpnObject.h> 25 25 #include <TrajectoryGenerator2DCircle.h> 26 #include <Matrix.h> 26 27 #include <cvmatrix.h> 27 28 #include <cmath> … … 61 62 62 63 circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle"); 63 uavVrpn->xPlot()->AddCurve(circle-> Matrix()->Element(0,0),DataPlot::Blue);64 uavVrpn->yPlot()->AddCurve(circle-> Matrix()->Element(0,1),DataPlot::Blue);65 uavVrpn->VxPlot()->AddCurve(circle-> Matrix()->Element(1,0),DataPlot::Blue);66 uavVrpn->VyPlot()->AddCurve(circle-> Matrix()->Element(1,1),DataPlot::Blue);67 uavVrpn->XyPlot()->AddCurve(circle-> Matrix()->Element(0,1),circle->Matrix()->Element(0,0),DataPlot::Blue,"circle");64 uavVrpn->xPlot()->AddCurve(circle->GetMatrix()->Element(0,0),DataPlot::Blue); 65 uavVrpn->yPlot()->AddCurve(circle->GetMatrix()->Element(0,1),DataPlot::Blue); 66 uavVrpn->VxPlot()->AddCurve(circle->GetMatrix()->Element(1,0),DataPlot::Blue); 67 uavVrpn->VyPlot()->AddCurve(circle->GetMatrix()->Element(1,1),DataPlot::Blue); 68 uavVrpn->XyPlot()->AddCurve(circle->GetMatrix()->Element(0,1),circle->GetMatrix()->Element(0,0),DataPlot::Blue,"circle"); 68 69 69 70 uX=new Pid(setupLawTab->At(1,0),"u_x"); -
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
r167 r214 22 22 #include <LowPassFilter.h> 23 23 #include <EulerDerivative.h> 24 #include < cvmatrix.h>24 #include <Matrix.h> 25 25 #include <GridLayout.h> 26 26 #include <DataPlot1D.h> … … 65 65 opticalFlowSpeedRaw=new OpticalFlowSpeed(opticalFlowCompensated,uav->GetAhrs(),uav->GetVerticalCamera()->GetLayout()->NewRow(),"vitesse du Flux Optique"); 66 66 //opticalFlowSpeed=vitesse de déplacement en pixels par seconde (moyenne sur tous les points et division par le delta T) 67 cvmatrix* twoByOneOFS=new cvmatrix((const Thread*)this,2,1,floatType);68 cvmatrix* twoByOneOFAR=new cvmatrix((const Thread*)this,2,1,floatType);69 cvmatrix* twoByOneOFA=new cvmatrix((const Thread*)this,2,1,floatType);67 Matrix* twoByOneOFS=new Matrix((const Thread*)this,2,1,floatType); 68 Matrix* twoByOneOFAR=new Matrix((const Thread*)this,2,1,floatType); 69 Matrix* twoByOneOFA=new Matrix((const Thread*)this,2,1,floatType); 70 70 opticalFlowSpeed=new LowPassFilter(opticalFlowSpeedRaw,uav->GetVerticalCamera()->GetLayout()->NewRow(),"Speed lowPass",twoByOneOFS); 71 71 opticalFlowAccelerationRaw=new EulerDerivative(opticalFlowSpeed,uav->GetVerticalCamera()->GetLayout()->NewRow(),"derivative",twoByOneOFAR); … … 83 83 84 84 xVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(0,0)); 85 xVelocityPlot->AddCurve(opticalFlowSpeed-> Matrix()->Element(0,0),DataPlot::Blue);85 xVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(0,0),DataPlot::Blue); 86 86 yVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(1,0)); 87 yVelocityPlot->AddCurve(opticalFlowSpeed-> Matrix()->Element(1,0),DataPlot::Blue);87 yVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(1,0),DataPlot::Blue); 88 88 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(0,0)); 89 89 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(1,0),DataPlot::Blue); … … 107 107 108 108 Tab* opticalFlowRealTab=new Tab(getFrameworkManager()->GetTabWidget(),"real speed"); 109 opticalFlowRealSpeed=new cvmatrix((const Thread*)this,2,1,floatType);110 opticalFlowReference=new cvmatrix((const Thread*)this,2,1,floatType);111 opticalFlowRealAcceleration=new cvmatrix((const Thread*)this,2,1,floatType);109 opticalFlowRealSpeed=new Matrix((const Thread*)this,2,1,floatType); 110 opticalFlowReference=new Matrix((const Thread*)this,2,1,floatType); 111 opticalFlowRealAcceleration=new Matrix((const Thread*)this,2,1,floatType); 112 112 DataPlot1D* xRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->NewRow(),"x speed (m/s)",-2,2); 113 113 DataPlot1D* yRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->LastRowLastCol(),"y speed (m/s)",-2,2); -
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h
r165 r214 20 20 namespace flair { 21 21 namespace core { 22 class cvmatrix;22 class Matrix; 23 23 } 24 24 namespace gui { … … 55 55 flair::gui::GroupBox* opticalFlowGroupBox; 56 56 flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed; 57 flair::core:: cvmatrix *opticalFlowReference;57 flair::core::Matrix *opticalFlowReference; 58 58 flair::filter::Pid *u_x, *u_y; 59 59 flair::filter::CvtColor* greyCameraImage; 60 60 flair::core::AhrsData *customReferenceOrientation; 61 flair::core:: cvmatrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;61 flair::core::Matrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration; 62 62 63 63 private: -
trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp
r178 r214 29 29 #include <PidThrust.h> 30 30 #include <Euler.h> 31 #include <Matrix.h> 31 32 #include <cvmatrix.h> 32 33 #include <AhrsData.h> … … 60 61 61 62 circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle"); 62 uavVrpn->xPlot()->AddCurve(circle-> Matrix()->Element(0,0),0,0,255);63 uavVrpn->yPlot()->AddCurve(circle-> Matrix()->Element(0,1),0,0,255);64 uavVrpn->VxPlot()->AddCurve(circle-> Matrix()->Element(1,0),0,0,255);65 uavVrpn->VyPlot()->AddCurve(circle-> Matrix()->Element(1,1),0,0,255);63 uavVrpn->xPlot()->AddCurve(circle->GetMatrix()->Element(0,0),0,0,255); 64 uavVrpn->yPlot()->AddCurve(circle->GetMatrix()->Element(0,1),0,0,255); 65 uavVrpn->VxPlot()->AddCurve(circle->GetMatrix()->Element(1,0),0,0,255); 66 uavVrpn->VyPlot()->AddCurve(circle->GetMatrix()->Element(1,1),0,0,255); 66 67 67 68 xCircleCenter=new DoubleSpinBox(vrpnclient->GetLayout()->NewRow(),"x circle center"," m",-5,5,0.1,1,0); -
trunk/demos/Sinus/src/Loop.cpp
r16 r214 24 24 #include <PushButton.h> 25 25 #include <DataPlot1D.h> 26 #include < cvmatrix.h>26 #include <Matrix.h> 27 27 28 28 using namespace std; … … 47 47 "1st order lawpass filter"); 48 48 sinus->GetPlot()->AddCurve( 49 firstLowPass-> Matrix()->Element(0),49 firstLowPass->GetMatrix()->Element(0), 50 50 DataPlot::Blue); // add output of the filter to signal's graph 51 51 … … 54 54 sinus, sinus->GetSetupLayout()->NewRow(), "3rd order lawpass filter", 3); 55 55 sinus->GetPlot()->AddCurve( 56 thirdLowPass-> Matrix()->Element(0),56 thirdLowPass->GetMatrix()->Element(0), 57 57 DataPlot::Yellow); // add output of the filter to signal's graph 58 58 -
trunk/demos/Sinus/src/MeanFilter.cpp
r157 r214 13 13 14 14 #include "MeanFilter.h" 15 #include < cvmatrix.h>15 #include <Matrix.h> 16 16 #include <LayoutPosition.h> 17 17 #include <GroupBox.h> … … 42 42 desc->SetElementName(0, 0, 43 43 "mean filter"); // name will be used for graphs and logs 44 output = new cvmatrix(this, desc, floatType, name);44 output = new Matrix(this, desc, floatType, name); 45 45 delete desc; 46 46 … … 52 52 MeanFilter::~MeanFilter() {} 53 53 54 cvmatrix *MeanFilter::GetMatrix() const { return output; }54 Matrix *MeanFilter::GetMatrix() const { return output; } 55 55 56 56 float MeanFilter::GetValue(void) const { return output->Value(0, 0); } … … 64 64 65 65 float result = 0; 66 // get input argument in a cvmatrix 67 cvmatrix *input = (cvmatrix *)data; 66 // get input argument in a matrix 67 const Matrix* input = dynamic_cast<const Matrix*>(data); 68 69 if (!input) { 70 Warn("casting %s to Matrix failed\n",data->ObjectName().c_str()); 71 return; 72 } 68 73 69 74 // simple (and not efficent!) implementation of the filter -
trunk/demos/Sinus/src/MeanFilter.h
r16 r214 25 25 namespace flair { 26 26 namespace core { 27 class cvmatrix;27 class Matrix; 28 28 } 29 29 namespace gui { … … 70 70 * \return pointer to the output matrix 71 71 */ 72 core:: cvmatrix *GetMatrix(void) const;72 core::Matrix *GetMatrix(void) const; 73 73 74 74 /*! … … 86 86 gui::GroupBox *groupBox; 87 87 gui::SpinBox *numberOfElements; 88 core:: cvmatrix *output;88 core::Matrix *output; 89 89 float previousValues[MAX_NUMBER_OF_ELEMENTS]; // previous values storage 90 90 }; -
trunk/demos/Sinus/src/Sinus.cpp
r157 r214 21 21 #include <SpinBox.h> 22 22 #include <DataPlot1D.h> 23 #include < cvmatrix.h>23 #include <Matrix.h> 24 24 #include <math.h> 25 25 … … 41 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1); 42 42 desc->SetElementName(0, 0, "value"); // name will be used for graphs and logs 43 output = new cvmatrix((IODevice *)this, desc, floatType, name);43 output = new Matrix((IODevice *)this, desc, floatType, name); 44 44 delete desc; 45 45 … … 94 94 } 95 95 96 cvmatrix *Sinus::GetMatrix(void) const { return output; }96 Matrix *Sinus::GetMatrix(void) const { return output; } 97 97 98 98 float Sinus::GetValue(void) const { return output->Value(0, 0); } -
trunk/demos/Sinus/src/Sinus.h
r16 r214 23 23 namespace core { 24 24 class FrameworkManager; 25 class cvmatrix;25 class Matrix; 26 26 } 27 27 namespace gui { … … 69 69 * \return un pointeur vers la matrice de sortie 70 70 */ 71 core:: cvmatrix *GetMatrix(void) const;71 core::Matrix *GetMatrix(void) const; 72 72 73 73 /*! … … 113 113 void Run(void); 114 114 115 core:: cvmatrix *output;115 core::Matrix *output; 116 116 gui::Tab *mainTab; 117 117 gui::TabWidget *tabWidget;
Note:
See TracChangeset
for help on using the changeset viewer.