-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement motor currents reading #187
Implement motor currents reading #187
Conversation
b5d6136
to
11f29b7
Compare
jointCurrents = yarp::eigen::toEigen(m_pimpl->controlBoardRemapperMeasures.jointCurrents); | ||
receiveTimeInSeconds = &m_pimpl->controlBoardRemapperMeasures.receivedTimeInSeconds; | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End of line
std::cerr << "[YarpSensorBridge::getJointVelocity] " << jointName | ||
<< " could not be found in the configured list of joints" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::cerr << "[YarpSensorBridge::getJointVelocity] " << jointName | |
<< " could not be found in the configured list of joints" << std::endl; | |
std::cerr << "[YarpSensorBridge::getMotorCurrent] " << jointName | |
<< " could not be found in the configured list of joints" << std::endl; |
@isorrentino please be aware of this PR #191 Whichever gets merged first, the other might have to fix merge conflicts ;D |
if (std::binary_search(controlBoardRemapperMeasures.jointCurrents.begin(), controlBoardRemapperMeasures.jointCurrents.end(), NAN)) | ||
{ | ||
std::cerr << logPrefix << " NAN values read from current control interface, use previous measurement" << std::endl; | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5a04b07
to
44e683d
Compare
* Helper method to maintain SensorBridgeOptions struct by populating it from the configuration | ||
* parameters | ||
* @note the user may choose to use/not use this method depending on their requirements for the | ||
* implementation if the user chooses to not use the method, the implementation must simply | ||
* contain "return true;" | ||
* | ||
* @param[in] handler Parameters handler | ||
* @param[in] sensorBridgeOptions SensorBridgeOptions to hold the bridge options for streaming sensor measurements | ||
* @param[in] sensorBridgeOptions SensorBridgeOptions to hold the bridge options for streaming | ||
* sensor measurements | ||
*/ | ||
virtual bool populateSensorBridgeOptionsFromConfig(std::weak_ptr<BipedalLocomotion::ParametersHandler::IParametersHandler> handler, | ||
SensorBridgeOptions& sensorBridgeOptions) { return true; }; | ||
virtual bool populateSensorBridgeOptionsFromConfig( | ||
std::weak_ptr<BipedalLocomotion::ParametersHandler::IParametersHandler> handler, | ||
SensorBridgeOptions& sensorBridgeOptions) | ||
{ | ||
return true; | ||
}; | ||
|
||
/** | ||
* Helper method to maintain SensorLists struct by populating it from the configuration parameters | ||
* @note the user may choose to use/not use this method depending on their requirements for the implementation | ||
* if the user chooses to not use the method, the implementation must simply contain "return true;" | ||
* Helper method to maintain SensorLists struct by populating it from the configuration | ||
* parameters | ||
* @note the user may choose to use/not use this method depending on their requirements for the | ||
* implementation if the user chooses to not use the method, the implementation must simply | ||
* contain "return true;" | ||
* | ||
* @param[in] handler Parameters handler | ||
* @param[in] sensorBridgeOptions configured object of SensorBridgeOptions | ||
* @param[in] sensorLists SensorLists object holding list of connected sensor devices | ||
*/ | ||
virtual bool populateSensorListsFromConfig(std::weak_ptr<BipedalLocomotion::ParametersHandler::IParametersHandler> handler, | ||
const SensorBridgeOptions& sensorBridgeOptions, | ||
SensorLists& sensorLists) { return true; }; | ||
virtual bool populateSensorListsFromConfig( | ||
std::weak_ptr<BipedalLocomotion::ParametersHandler::IParametersHandler> handler, | ||
const SensorBridgeOptions& sensorBridgeOptions, | ||
SensorLists& sensorLists) | ||
{ | ||
return true; | ||
}; | ||
|
||
/** | ||
* Helper method to maintain SensorBridgeMetaData struct by populating it from the configuration parameters | ||
* @note the user may choose to use/not use this method depending on their requirements for the implementation | ||
* if the user chooses to not use the method, the implementation must simply contain "return true;" | ||
* Helper method to maintain SensorBridgeMetaData struct by populating it from the configuration | ||
* parameters | ||
* @note the user may choose to use/not use this method depending on their requirements for the | ||
* implementation if the user chooses to not use the method, the implementation must simply | ||
* contain "return true;" | ||
* | ||
* @param[in] handler Parameters handler | ||
* @param[in] sensorBridgeMetaData configured object of SensorBridgeMetadata | ||
* @param[in] sensorLists SensorLists object holding list of connected sensor devices | ||
*/ | ||
virtual bool populateSensorBridgeMetaDataFromConfig(std::weak_ptr<BipedalLocomotion::ParametersHandler::IParametersHandler> handler, | ||
SensorBridgeMetaData& sensorBridgeMetaData) { return true; }; | ||
virtual bool populateSensorBridgeMetaDataFromConfig( | ||
std::weak_ptr<BipedalLocomotion::ParametersHandler::IParametersHandler> handler, | ||
SensorBridgeMetaData& sensorBridgeMetaData) | ||
{ | ||
return true; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably you can revert these changes, just to have the PR cleaner. In addition, the indentation is weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
b6c7483
to
7b0577a
Compare
No description provided.