Changeset 318 in flair-src
- Timestamp:
- Jul 3, 2019, 5:05:33 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 39 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ReleaseNotes
r314 r318 5 5 - const TargetController *UavStateMachine::GetJoystick as been replaced by const TargetController *UavStateMachine::GetTargetController 6 6 - new method MetaDualShock3 *UavStateMachine::GetJoystick 7 - completely removed cvmatrix 8 - replaced cvmatrix_descriptor by MatrixDescriptor 9 7 10 8 11 -
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r314 r318 24 24 #include <TrajectoryGenerator2DCircle.h> 25 25 #include <Matrix.h> 26 #include <cvmatrix.h>27 26 #include <cmath> 28 27 #include <Tab.h> -
trunk/demos/Gps/uav/src/DemoGps.cpp
r314 r318 22 22 #include <FrameworkManager.h> 23 23 #include <TrajectoryGenerator2DCircle.h> 24 #include <cvmatrix.h>25 24 #include <cmath> 26 25 #include <Tab.h> -
trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp
r314 r318 25 25 #include <TrajectoryGenerator2DCircle.h> 26 26 #include <Matrix.h> 27 #include <cvmatrix.h>28 27 #include <cmath> 29 28 #include <Tab.h> -
trunk/demos/PidStandalone/uav/src/PidUav.cpp
r314 r318 14 14 #include "PidUav.h" 15 15 #include <TargetController.h> 16 #include <cvmatrix.h>17 16 #include <GridLayout.h> 18 17 #include <DataPlot1D.h> -
trunk/demos/PidStandalone/uav/src/PidUav.h
r105 r318 18 18 19 19 namespace flair { 20 namespace core {21 class cvmatrix;22 }23 20 namespace gui { 24 21 class GroupBox; -
trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp
r214 r318 30 30 #include <Euler.h> 31 31 #include <Matrix.h> 32 #include <cvmatrix.h>33 32 #include <AhrsData.h> 34 33 #include <Ahrs.h> -
trunk/demos/Sinus/src/MeanFilter.cpp
r214 r318 39 39 40 40 // 1*1 output matrix 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);41 MatrixDescriptor *desc = new MatrixDescriptor(1, 1); 42 42 desc->SetElementName(0, 0, 43 43 "mean filter"); // name will be used for graphs and logs -
trunk/demos/Sinus/src/Sinus.cpp
r214 r318 39 39 40 40 // 1*1 output matrix 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);41 MatrixDescriptor *desc = new MatrixDescriptor(1, 1); 42 42 desc->SetElementName(0, 0, "value"); // name will be used for graphs and logs 43 43 output = new Matrix((IODevice *)this, desc, floatType, name); -
trunk/lib/FlairCore/src/Matrix.cpp
r252 r318 107 107 } 108 108 109 Matrix::Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,109 Matrix::Matrix(const Object *parent, const MatrixDescriptor *descriptor, 110 110 ScalarType const &elementDataType, string name, uint32_t n) 111 111 : io_data(parent, name, n), -
trunk/lib/FlairCore/src/Matrix.h
r252 r318 16 16 #include <io_data.h> 17 17 #include <IODataElement.h> 18 #include < cvmatrix_descriptor.h>18 #include <MatrixDescriptor.h> 19 19 20 20 class Matrix_impl; … … 52 52 * 53 53 * Construct an io_data representing a matrix. \n 54 * It uses a cvmatrix_descriptor to get size and elements' names. \n54 * It uses a MatrixDescriptor to get size and elements' names. \n 55 55 * Names are used for graphs and logs. \n 56 56 * All values are initialized to 0. … … 62 62 * \param n number of samples 63 63 */ 64 Matrix(const Object *parent, const cvmatrix_descriptor *descriptor,64 Matrix(const Object *parent, const MatrixDescriptor *descriptor, 65 65 ScalarType const &elementDataType, std::string name = "", 66 66 uint32_t n = 1); … … 145 145 * \brief Element name 146 146 * 147 * If Matrix was created without cvmatrix_descriptor, element name is empty.147 * If Matrix was created without MatrixDescriptor, element name is empty. 148 148 * 149 149 * \param row element row -
trunk/lib/FlairCore/src/MatrixDescriptor.cpp
r317 r318 4 4 // %flair:license} 5 5 // created: 2014/02/05 6 // filename: cvmatrix_descriptor.cpp6 // filename: MatrixDescriptor.cpp 7 7 // 8 8 // author: Guillaume Sanahuja … … 11 11 // version: $Id: $ 12 12 // 13 // purpose: Class describing cvmatrix elements, for log and graphs purpose13 // purpose: Class describing matrix elements, for log and graphs purpose 14 14 // 15 15 /*********************************************************************/ 16 16 17 #include " cvmatrix_descriptor.h"17 #include "MatrixDescriptor.h" 18 18 #include "FrameworkManager.h" 19 19 … … 23 23 namespace core { 24 24 25 cvmatrix_descriptor::cvmatrix_descriptor(uint32_t rows, uint32_t cols) {25 MatrixDescriptor::MatrixDescriptor(uint32_t rows, uint32_t cols) { 26 26 this->rows = rows; 27 27 this->cols = cols; … … 36 36 } 37 37 38 cvmatrix_descriptor::~cvmatrix_descriptor() {38 MatrixDescriptor::~MatrixDescriptor() { 39 39 for (uint32_t i = 0; i < rows * cols; i++) { 40 40 delete element_names[i]; … … 43 43 } 44 44 45 void cvmatrix_descriptor::SetElementName(uint32_t row, uint32_t col,45 void MatrixDescriptor::SetElementName(uint32_t row, uint32_t col, 46 46 string name) { 47 47 if (row >= rows || col >= cols) { … … 53 53 } 54 54 55 string cvmatrix_descriptor::ElementName(uint32_t row, uint32_t col) const {55 string MatrixDescriptor::ElementName(uint32_t row, uint32_t col) const { 56 56 if (row >= rows || col >= cols) { 57 57 getFrameworkManager()->Err("index out of bound (%i,%i), max (%i,%i)\n", … … 62 62 } 63 63 64 uint32_t cvmatrix_descriptor::Rows() const { return rows; }64 uint32_t MatrixDescriptor::Rows() const { return rows; } 65 65 66 uint32_t cvmatrix_descriptor::Cols() const { return cols; }66 uint32_t MatrixDescriptor::Cols() const { return cols; } 67 67 68 68 } // end namespace core -
trunk/lib/FlairCore/src/MatrixDescriptor.h
r317 r318 4 4 // %flair:license} 5 5 /*! 6 * \file cvmatrix_descriptor.h7 * \brief Class describing cvmatrix elements, for log and graphs purpose6 * \file MatrixDescriptor.h 7 * \brief Class describing matrix elements, for log and graphs purpose 8 8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253 9 9 * \date 2014/02/05 … … 11 11 */ 12 12 13 #ifndef CVMATRIX_DESCRIPTOR_H14 #define CVMATRIX_DESCRIPTOR_H13 #ifndef MATRIXDESCRIPTOR_H 14 #define MATRIXDESCRIPTOR_H 15 15 16 16 #include <string> … … 19 19 namespace core { 20 20 21 /*! \class cvmatrix_descriptor21 /*! \class MatrixDescriptor 22 22 * 23 * \brief Class describing cvmatrix elements, for log and graphs purpose23 * \brief Class describing matrix elements, for log and graphs purpose 24 24 * 25 25 * This class allows to give a name to matrix elements. These names 26 26 * will be used in graphs and logs. 27 27 */ 28 class cvmatrix_descriptor {28 class MatrixDescriptor { 29 29 public: 30 30 /*! … … 36 36 * \param cols matrix cols 37 37 */ 38 cvmatrix_descriptor(uint32_t rows, uint32_t cols);38 MatrixDescriptor(uint32_t rows, uint32_t cols); 39 39 40 40 /*! … … 42 42 * 43 43 */ 44 ~ cvmatrix_descriptor();44 ~MatrixDescriptor(); 45 45 46 46 /*! … … 85 85 } // end namespace flair 86 86 87 #endif // CVMATRIX_DESCRIPTOR_H87 #endif // MATRIXDESCRIPTOR_H -
trunk/lib/FlairCore/src/Matrix_impl.cpp
r214 r318 27 27 int n) 28 28 : elementDataType(_elementDataType) { 29 descriptor = new cvmatrix_descriptor(rows, cols);29 descriptor = new MatrixDescriptor(rows, cols); 30 30 Init(self, n); 31 31 } 32 32 33 33 Matrix_impl::Matrix_impl(Matrix *self, 34 const cvmatrix_descriptor *inDescriptor,34 const MatrixDescriptor *inDescriptor, 35 35 flair::core::ScalarType const &_elementDataType, 36 36 int n) 37 37 : elementDataType(_elementDataType) { 38 descriptor = new cvmatrix_descriptor(inDescriptor->Rows(), inDescriptor->Cols());38 descriptor = new MatrixDescriptor(inDescriptor->Rows(), inDescriptor->Cols()); 39 39 40 40 for (uint32_t i = 0; i < descriptor->Rows(); i++) { -
trunk/lib/FlairCore/src/unexported/Matrix_impl.h
r214 r318 27 27 flair::core::ScalarType const &elementDataType, int n); 28 28 Matrix_impl(flair::core::Matrix *self, 29 const flair::core:: cvmatrix_descriptor *descriptor,29 const flair::core::MatrixDescriptor *descriptor, 30 30 flair::core::ScalarType const &elementDataType, int n); 31 31 ~Matrix_impl(); 32 32 33 33 flair::core::ScalarType const &elementDataType; 34 flair::core:: cvmatrix_descriptor *descriptor;34 flair::core::MatrixDescriptor *descriptor; 35 35 void *datas; 36 36 void SetValueNoMutex(uint32_t row, uint32_t col, float value); -
trunk/lib/FlairFilter/src/ButterworthLowPass_impl.cpp
r223 r318 39 39 " Hz", 0, 10000, 0.1, 2, 1); 40 40 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(nbRow, nbCol);41 MatrixDescriptor *desc = new MatrixDescriptor(nbRow, nbCol); 42 42 //desc->SetElementName(0, 0, "output"); 43 43 output = new Matrix(self, desc, floatType, name); -
trunk/lib/FlairFilter/src/ControlLaw.cpp
r214 r318 18 18 #include "ControlLaw.h" 19 19 #include <Matrix.h> 20 #include < cvmatrix_descriptor.h>20 #include <MatrixDescriptor.h> 21 21 #include <DataPlot1D.h> 22 22 #include <sstream> … … 34 34 output = new Matrix(this, nb_out, 1, floatType, name); 35 35 } else { 36 cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_out, 1);36 MatrixDescriptor *desc = new MatrixDescriptor(nb_out, 1); 37 37 for (int i = 0; i < nb_out; i++) { 38 38 std::stringstream ss; -
trunk/lib/FlairFilter/src/EulerDerivative_impl.cpp
r272 r318 37 37 if (init_value != NULL) { 38 38 // init output matrix of same size as init 39 cvmatrix_descriptor *desc =new cvmatrix_descriptor(init_value->Rows(), init_value->Cols());39 MatrixDescriptor *desc =new MatrixDescriptor(init_value->Rows(), init_value->Cols()); 40 40 41 41 for (int i = 0; i < init_value->Rows(); i++) { … … 53 53 } else { 54 54 // if NULL, assume dimension 1, and init=0 55 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);55 MatrixDescriptor *desc = new MatrixDescriptor(1, 1); 56 56 desc->SetElementName(0, 0, "output"); 57 57 output = new Matrix(self, desc, floatType, name); … … 60 60 61 61 62 cvmatrix_descriptor *desc = new cvmatrix_descriptor(output->Rows(), output->Cols());62 MatrixDescriptor *desc = new MatrixDescriptor(output->Rows(), output->Cols()); 63 63 prev_input = new Matrix(self, desc, output->GetDataType().GetElementDataType(), name); 64 64 prev_output = new Matrix(self, desc, output->GetDataType().GetElementDataType(), name); -
trunk/lib/FlairFilter/src/JoyReference_impl.cpp
r223 r318 42 42 input = new Matrix(self, 4, 1, floatType, name); 43 43 44 cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 1);44 MatrixDescriptor *desc = new MatrixDescriptor(4, 1); 45 45 desc->SetElementName(0, 0, "z"); 46 46 ; -
trunk/lib/FlairFilter/src/LowPassFilter_impl.cpp
r223 r318 38 38 if (init_value != NULL) { 39 39 // init output matrix of same size as init 40 cvmatrix_descriptor *desc =new cvmatrix_descriptor(init_value->Rows(), init_value->Cols());40 MatrixDescriptor *desc =new MatrixDescriptor(init_value->Rows(), init_value->Cols()); 41 41 42 42 for (int i = 0; i < init_value->Rows(); i++) { … … 54 54 } else { 55 55 // if NULL, assume dimension 1, and init=0 56 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);56 MatrixDescriptor *desc = new MatrixDescriptor(1, 1); 57 57 desc->SetElementName(0, 0, "output"); 58 58 output = new Matrix(self, desc, floatType, name); -
trunk/lib/FlairFilter/src/PidThrust_impl.cpp
r223 r318 38 38 self->input = new Matrix(self, 2, 1, floatType, name); 39 39 40 cvmatrix_descriptor *desc = new cvmatrix_descriptor(5, 1);40 MatrixDescriptor *desc = new MatrixDescriptor(5, 1); 41 41 desc->SetElementName(0, 0, "p"); 42 42 desc->SetElementName(1, 0, "i"); -
trunk/lib/FlairFilter/src/Pid_impl.cpp
r223 r318 36 36 self->input = new Matrix(self, 2, 1, floatType, name); 37 37 38 cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 1);38 MatrixDescriptor *desc = new MatrixDescriptor(4, 1); 39 39 desc->SetElementName(0, 0, "p"); 40 40 desc->SetElementName(1, 0, "i"); -
trunk/lib/FlairFilter/src/TrajectoryGenerator1D_impl.cpp
r214 r318 60 60 61 61 // init matrix 62 cvmatrix_descriptor *desc = new cvmatrix_descriptor(2, 1);62 MatrixDescriptor *desc = new MatrixDescriptor(2, 1); 63 63 desc->SetElementName(0, 0, "pos"); 64 64 desc->SetElementName(1, 0, "vel"); -
trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp
r214 r318 51 51 52 52 // init matrix 53 cvmatrix_descriptor *desc = new cvmatrix_descriptor(2, 2);53 MatrixDescriptor *desc = new MatrixDescriptor(2, 2); 54 54 desc->SetElementName(0, 0, "pos.x"); 55 55 desc->SetElementName(0, 1, "pos.y"); -
trunk/lib/FlairFilter/src/X4X8Multiplex_impl.cpp
r214 r318 50 50 pas->AddItem("clockwise"); 51 51 52 cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_mot, 1);52 MatrixDescriptor *desc = new MatrixDescriptor(nb_mot, 1); 53 53 for (int i = 0; i < nb_mot; i++) { 54 54 desc->SetElementName(i, 0, MotorName(i)); -
trunk/lib/FlairFilter/src/unexported/NestedSat_impl.h
r15 r318 18 18 namespace flair { 19 19 namespace core { 20 class cvmatrix;21 20 class io_data; 22 21 } -
trunk/lib/FlairMeta/src/MetaVrpnObject.cpp
r310 r318 48 48 49 49 void MetaVrpnObject::ConstructorCommon(string name,VrpnClient *client) { 50 cvmatrix_descriptor *desc = new cvmatrix_descriptor(7, 1);50 MatrixDescriptor *desc = new MatrixDescriptor(7, 1); 51 51 for (int i = 0; i < desc->Rows(); i++) { 52 52 desc->SetElementName(i, 0, Output()->Name(i, 0)); … … 59 59 delete prev_value; 60 60 61 desc = new cvmatrix_descriptor(7, 1);61 desc = new MatrixDescriptor(7, 1); 62 62 for (int i = 0; i < desc->Rows(); i++) { 63 63 desc->SetElementName(i, 0, "d" + Output()->Name(i, 0)); -
trunk/lib/FlairSensorActuator/src/BlCtrlV2_x4_speed.cpp
r268 r318 122 122 input = new Matrix((IODevice *)this, 8, 1, floatType); 123 123 124 cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 2);124 MatrixDescriptor *desc = new MatrixDescriptor(4, 2); 125 125 desc->SetElementName(0, 0, "avant gauche"); 126 126 desc->SetElementName(1, 0, "arriere droite"); -
trunk/lib/FlairSensorActuator/src/Bldc.cpp
r214 r318 43 43 pimpl_ = new Bldc_impl(this, layout, name, motors_count); 44 44 45 cvmatrix_descriptor *desc = new cvmatrix_descriptor(motors_count, 2);45 MatrixDescriptor *desc = new MatrixDescriptor(motors_count, 2); 46 46 for (int i = 0; i < motors_count; i++) { 47 47 ostringstream speed, current; -
trunk/lib/FlairSensorActuator/src/HokuyoUTM30Lx.cpp
r214 r318 39 39 : LaserRangeFinder(name), Thread(getFrameworkManager(), name, priority) { 40 40 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1081, 1);41 MatrixDescriptor *desc = new MatrixDescriptor(1081, 1); 42 42 output = new Matrix((IODevice *)this, desc, SignedIntegerType(16)); 43 43 delete desc; -
trunk/lib/FlairSensorActuator/src/LaserRangeFinder.cpp
r214 r318 37 37 LaserRangeFinder::LaserRangeFinder(string name) 38 38 : IODevice(getFrameworkManager(), name) { 39 cvmatrix_descriptor *desc = new cvmatrix_descriptor(360, 1);39 MatrixDescriptor *desc = new MatrixDescriptor(360, 1); 40 40 output = new Matrix(this, desc, floatType); 41 41 delete desc; -
trunk/lib/FlairSensorActuator/src/PressureSensor.cpp
r216 r318 36 36 plot_tab = NULL; 37 37 38 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);38 MatrixDescriptor *desc = new MatrixDescriptor(1, 1); 39 39 desc->SetElementName(0, 0, name); 40 40 output = new Matrix(this, desc, floatType); -
trunk/lib/FlairSensorActuator/src/RadioReceiver.cpp
r214 r318 38 38 39 39 // init matrix 40 cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_channels, 1);40 MatrixDescriptor *desc = new MatrixDescriptor(nb_channels, 1); 41 41 for (int i = 0; i < nb_channels; i++) { 42 42 ostringstream channel_name; -
trunk/lib/FlairSensorActuator/src/UsRangeFinder.cpp
r221 r318 36 36 plot_tab = NULL; 37 37 38 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);38 MatrixDescriptor *desc = new MatrixDescriptor(1, 1); 39 39 desc->SetElementName(0, 0, name); 40 40 output = new Matrix(this, desc, floatType); -
trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp
r309 r318 59 59 60 60 // state 61 cvmatrix_descriptor *desc = new cvmatrix_descriptor(7, 1);61 MatrixDescriptor *desc = new MatrixDescriptor(7, 1); 62 62 desc->SetElementName(0, 0, "q0"); 63 63 desc->SetElementName(1, 0, "q1"); … … 70 70 delete desc; 71 71 72 desc = new cvmatrix_descriptor(3, 1);72 desc = new MatrixDescriptor(3, 1); 73 73 desc->SetElementName(0, 0, "roll"); 74 74 desc->SetElementName(1, 0, "pitch"); -
trunk/lib/FlairSimulator/src/Model_impl.cpp
r218 r318 114 114 self->state[-2] = self->state[0]; 115 115 116 cvmatrix_descriptor *desc = new cvmatrix_descriptor(19, 1);116 MatrixDescriptor *desc = new MatrixDescriptor(19, 1); 117 117 desc->SetElementName(0, 0, "q0"); 118 118 desc->SetElementName(1, 0, "q1"); -
trunk/lib/FlairVisionFilter/src/HoughLines.cpp
r214 r318 44 44 45 45 //init output matrix of same size as init 46 cvmatrix_descriptor* desc=new cvmatrix_descriptor(4,1);46 MatrixDescriptor* desc=new MatrixDescriptor(4,1); 47 47 desc->SetElementName(0,0,"distance"); 48 48 desc->SetElementName(1,0,"orientation rad"); -
trunk/lib/FlairVisionFilter/src/OpticalFlowCompensated.cpp
r274 r318 36 36 37 37 OpticalFlowCompensated::OpticalFlowCompensated(const OpticalFlow *parent, const Ahrs *ahrs, const LayoutPosition* position, string name) : IODevice(parent, name), ahrs(ahrs), output(NULL) { 38 cvmatrix_descriptor* desc=new cvmatrix_descriptor(3,2);38 MatrixDescriptor* desc=new MatrixDescriptor(3,2); 39 39 desc->SetElementName(0,0,"raw displacement X"); 40 40 desc->SetElementName(0,1,"raw displacement Y"); -
trunk/lib/FlairVisionFilter/src/OpticalFlowSpeed.cpp
r274 r318 29 29 30 30 OpticalFlowSpeed::OpticalFlowSpeed(const IODevice* parent, const LayoutPosition* position,string name) : IODevice(parent,name) { 31 cvmatrix_descriptor* desc=new cvmatrix_descriptor(2,1);31 MatrixDescriptor* desc=new MatrixDescriptor(2,1); 32 32 desc->SetElementName(0,0,"vx"); 33 33 desc->SetElementName(1,0,"vy"); -
trunk/tools/Controller/DualShock3/src/DualShock3.cpp
r307 r318 92 92 axisNumber = 4; 93 93 nativeBitsPerAxis = 8; 94 cvmatrix_descriptor *axisDescriptor = new cvmatrix_descriptor(axisNumber, 1);94 MatrixDescriptor *axisDescriptor = new MatrixDescriptor(axisNumber, 1); 95 95 for (unsigned int i = 0; i < axisNumber; i++) { 96 96 axisDescriptor->SetElementName(i, 0, GetAxisDescription(i)); … … 102 102 // buttons stuff 103 103 buttonNumber = 16; 104 cvmatrix_descriptor *buttonDescriptor =105 new cvmatrix_descriptor(buttonNumber, 1);104 MatrixDescriptor *buttonDescriptor = 105 new MatrixDescriptor(buttonNumber, 1); 106 106 for (unsigned int i = 0; i < buttonNumber; i++) { 107 107 buttonDescriptor->SetElementName(i, 0, GetButtonDescription(i)); -
trunk/tools/Controller/Mavlink/src/GuiInterface.cpp
r300 r318 18 18 #include "GuiInterface.h" 19 19 20 #include <cvmatrix.h>21 20 #include <FrameworkManager.h> 22 21 #include <Thread.h>
Note:
See TracChangeset
for help on using the changeset viewer.