diff --git a/src/imu/imu.cpp b/src/imu/imu.cpp index 1205d46..3391980 100644 --- a/src/imu/imu.cpp +++ b/src/imu/imu.cpp @@ -64,10 +64,6 @@ bool Imu::setup(yarp::os::Property& property) yarp::os::Bottle axesNames; yarp::os::Bottle & axesList = axesNames.addList(); - yarp::dev::PolyDriver tmpDriver; - yarp::dev::IEncoders* tmpEncoders; - yarp::dev::IAxisInfo* tmpAxis; - yarp::os::Property tmpOptions; int tmpAxisNum; @@ -116,10 +112,10 @@ bool Imu::setup(yarp::os::Property& property) for (int i = 0; i < axes; i++) { ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(iaxes->getAxisName(i, axisName), "Cannot get the name of controlled axes"); - axis.push_back(axisName); + axesVec.push_back(axisName); } - ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(model.loadReducedModelFromFile(modelAbsolutePath.c_str(), axis), Asserter::format("Cannot load model from %s", modelAbsolutePath.c_str())); + ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(model.loadReducedModelFromFile(modelAbsolutePath.c_str(), axesVec), Asserter::format("Cannot load model from %s", modelAbsolutePath.c_str())); kinDynComp.loadRobotModel(model.model()); iDynTree::Vector3 baseLinkOrientationRad; @@ -178,9 +174,6 @@ void Imu::run() double minLim; double maxLim; - yarp::dev::PolyDriver tmpDriver; - yarp::dev::IEncoders* tmpEncoders; - yarp::dev::IAxisInfo* tmpAxis; yarp::os::Property tmpOptions; int tmpAxisNum; diff --git a/src/imu/imu.h b/src/imu/imu.h index 5f7eb2a..aa9b4af 100644 --- a/src/imu/imu.h +++ b/src/imu/imu.h @@ -66,6 +66,10 @@ class Imu : public yarp::robottestingframework::TestCase { yarp::dev::IAxisInfo* iaxes; yarp::dev::IControlLimits* ilim; + yarp::dev::PolyDriver tmpDriver; + yarp::dev::IEncoders* tmpEncoders; + yarp::dev::IAxisInfo* tmpAxis; + yarp::os::BufferedPort outputPort; yarp::sig::Vector rpyValues; yarp::sig::Vector positions; @@ -73,7 +77,7 @@ class Imu : public yarp::robottestingframework::TestCase { int axes; double timestamp; - std::vector axis; + std::vector axesVec; iDynTree::ModelLoader model; iDynTree::KinDynComputations kinDynComp;