iCub-main
Loading...
Searching...
No Matches
measuresConverter.cpp
Go to the documentation of this file.
1// -*- Mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3/*
4* Copyright (C) 2012 iCub Facility, Istituto Italiano di Tecnologia
5* Authors: Valentina Gaggero
6* CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
7*
8*/
9
10#include "measuresConverter.h"
11
12
13
15{
16 angleToEncoder = new double [numofjoints];
17 dutycycleToPWM = new double [numofjoints];
18 ampsToSensor = new double [numofjoints];
19 newtonsToSensor = new double [numofjoints];
20 bemf2raw = new double [numofjoints];
21 ktau2raw = new double [numofjoints];
22}
23
25{
26 if (angleToEncoder) delete [] angleToEncoder;
27 if (dutycycleToPWM) delete [] dutycycleToPWM;
28 if (ampsToSensor) delete [] ampsToSensor;
29 if (newtonsToSensor) delete [] newtonsToSensor;
30 if (bemf2raw) delete [] bemf2raw;
31 if (ktau2raw) delete [] ktau2raw;
32
33 angleToEncoder = nullptr;
34 dutycycleToPWM = nullptr;
35 ampsToSensor = nullptr;
36 newtonsToSensor = nullptr;
37 ktau2raw = nullptr;
38 bemf2raw = nullptr;
39}
40
measureConvFactors(int numofjoints)