Skip to content

Commit

Permalink
Better handle the testing of all the sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
martinaxgloria authored and Nicogene committed Mar 1, 2024
1 parent 199d574 commit 48a9a1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/imu/imu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@ bool Imu::setup(yarp::os::Property& property)
if(inputSensorsList->size() == 0 || inputSensorsList->get(0).asString() == "all")
{
ROBOTTESTINGFRAMEWORK_TEST_REPORT("Testing all the IMUs available...");
sensorsNamesList.addString("l_arm_ft");
sensorsNamesList.addString("r_arm_ft");
sensorsNamesList.addString("head_imu_0");

yarp::dev::IOrientationSensors* ior;
ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(MASclientDriver.view(ior), "Unable to open the orientation interface");
for(int sensorIndex = 0; sensorIndex < ior->getNrOfOrientationSensors(); sensorIndex++)
{
ior->getOrientationSensorName(sensorIndex, sensorName);
sensorsNamesList.addString(sensorName);
}
}

else
Expand Down
5 changes: 3 additions & 2 deletions suites/contexts/icub/test_imu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ model model.urdf
port /${robotname}/alljoints/inertials
remoteControlBoards ("torso", "head", "left_arm", "right_arm")
axesNames ("torso_pitch", "torso_roll", "torso_yaw", "neck_pitch", "neck_roll", "neck_yaw", "l_shoulder_pitch", "l_shoulder_roll", "l_shoulder_yaw", "r_shoulder_pitch", "r_shoulder_roll", "r_shoulder_yaw")
sensorsList ("all")
maxError 0.1
; sensorsList ("head_imu_0", "l_arm_ft", "r_arm_ft")
sensorsList ("all")
maxError 0.1

0 comments on commit 48a9a1e

Please sign in to comment.