Skip to content

Commit 8e5957e

Browse files
Fix wrong message errors in YarpSensorBridge
1 parent 3a963e1 commit 8e5957e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/RobotInterface/YarpImplementation/src/YarpSensorBridge.cpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ bool YarpSensorBridge::initialize(std::weak_ptr<const IParametersHandler> handle
4848
log()->info("{} Joint accelerations will not be streamed.", logPrefix);
4949
}
5050

51-
if (!ptr->getParameter("stream_motor_temperature", m_pimpl->metaData.bridgeOptions.isMotorTemperatureSensorEnabled))
51+
if (!ptr->getParameter("stream_motor_temperature",
52+
m_pimpl->metaData.bridgeOptions.isMotorTemperatureSensorEnabled))
5253
{
53-
log()->info("{} Unable to get stream_motor_temperature. Set to false by default", logPrefix);
54+
log()->info("{} Unable to get stream_motor_temperature. Set to false by default",
55+
logPrefix);
5456
}
5557
if (!m_pimpl->metaData.bridgeOptions.isMotorTemperatureSensorEnabled)
5658
{
@@ -449,8 +451,8 @@ bool YarpSensorBridge::getJointVelocities(Eigen::Ref<Eigen::VectorXd> jointVeloc
449451

450452
if (jointVelocties.size() != m_pimpl->controlBoardRemapperMeasures.jointVelocities.size())
451453
{
452-
log()->error("[YarpSensorBridge::getJointVelocities] Joint velocities and positions have "
453-
"different sizes.");
454+
log()->error("[YarpSensorBridge::getJointVelocities] The size of the input vector does not "
455+
"match the number of joints.");
454456
return false;
455457
}
456458

@@ -519,7 +521,8 @@ bool YarpSensorBridge::getJointAccelerations(Eigen::Ref<Eigen::VectorXd> jointAc
519521
if (jointAccelerations.size()
520522
!= m_pimpl->controlBoardRemapperMeasures.jointAccelerations.size())
521523
{
522-
log()->error("{} Joint accelerations and positions have different sizes.", logPrefix);
524+
log()->error("{} The size of the input vector does not match the number of joints.",
525+
logPrefix);
523526
return false;
524527
}
525528

@@ -1211,4 +1214,4 @@ bool YarpSensorBridge::getMotorTemperatures(Eigen::Ref<Eigen::VectorXd> motorTem
12111214
= m_pimpl->controlBoardRemapperMeasures.receivedTimeInSeconds;
12121215

12131216
return true;
1214-
}
1217+
}

0 commit comments

Comments
 (0)