-
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 joint torque control device and friction estimation through PINN #866
Implement joint torque control device and friction estimation through PINN #866
Conversation
329ceef
to
e33f3b6
Compare
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.
I would avoid to add both the onnx and the config files here. Onnx can be saved on huggingface and the config file in robots' configuration
CHANGELOG.md
Outdated
@@ -227,7 +228,6 @@ All notable changes to this project are documented in this file. | |||
- Fix `QPTSID` documentation (https://github.com/ami-iit/bipedal-locomotion-framework/pull/634) | |||
- Fix error messages in `QPTSID` class (https://github.com/ami-iit/bipedal-locomotion-framework/pull/639) | |||
- Fix compilation failure when using CMake 3.26.1 and pybind11 2.4.3 (https://github.com/ami-iit/bipedal-locomotion-framework/pull/643) | |||
- Fixed changelog checker (https://github.com/ami-iit/bipedal-locomotion-framework/pull/856) |
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.
This line shouldn't be removed
/** | ||
* @file JointTorqueControlDevice.h | ||
* @authors Ines Sorrentino | ||
* @copyright 2023 Istituto Italiano di Tecnologia (IIT). This software may be modified and |
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.
* @copyright 2023 Istituto Italiano di Tecnologia (IIT). This software may be modified and | |
* @copyright 2024 Istituto Italiano di Tecnologia (IIT). This software may be modified and |
struct CouplingMatrices | ||
{ | ||
Eigen::MatrixXd fromJointTorquesToMotorTorques; | ||
Eigen::MatrixXd fromMotorTorquesToJointTorques; | ||
Eigen::MatrixXd fromJointVelocitiesToMotorVelocities; | ||
void reset(int NDOF) | ||
{ | ||
fromJointTorquesToMotorTorques = Eigen::MatrixXd::Identity(NDOF, NDOF); | ||
fromMotorTorquesToJointTorques = Eigen::MatrixXd::Identity(NDOF, NDOF); | ||
fromJointVelocitiesToMotorVelocities = Eigen::MatrixXd::Identity(NDOF, NDOF); | ||
} | ||
}; |
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.
Could you comments these?
double kt; ///< motor torque to current gain | ||
double kfc; ///< friction compensation weight parameter | ||
double kp; ///< proportional gain | ||
double maxCurr; ///< maximum current |
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.
Comments are like
double kt /**< motor torque to current gain */
devices/JointTorqueControlDevice/include/BipedalLocomotion/JointTorqueControlDevice.h
Show resolved
Hide resolved
double now = yarp::os::Time::now(); | ||
|
||
std::lock_guard<std::mutex> lock(globalMutex); | ||
if (now - timeOfLastControlLoop >= this->getPeriod()) |
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.
You can use blf clock and use std::chrono::nanoseconds for handling the time
@@ -7,8 +7,8 @@ BSD-3-Clause license. --> | |||
<param name="robot">ergocub</param> |
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.
I would avoid to touch this config file in this PR
@@ -26,7 +26,7 @@ BSD-3-Clause license. --> | |||
</group> | |||
|
|||
<group name="ExogenousSignals"> | |||
<param name="vectors_collection_exogenous_inputs">("Walking", "GridTracking","cmw")</param> |
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.
I would avoid to touch this config fil here
yError("PassThroughControlBoard error: %d devices passed to attachAll, but only 1 is " | ||
"supported. If you want to connect several device to a single " | ||
"PassThroughControlBoard, please use a controlboardremapper device in the middle.\n", | ||
p.size()); | ||
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.
You may use blf::log()->error()
bool legacyOption = false; | ||
legacyOption = legacyOption || config.check("proxy_remote"); | ||
legacyOption = legacyOption || config.check("proxy_local"); | ||
|
||
if (legacyOption) | ||
{ | ||
yError("PassThroughControlBoard error: legacy option proxy_remote and proxy_local are not " | ||
"supported anymore. Please use the yarprobotinterface to compose devices.\n"); | ||
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.
I think this can be removed.
What do you think @traversaro ?
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.
Yes, it was a leftover from the copy&paste from controlboardwrapper2 or similar I guess.
1a67586
to
026a82e
Compare
55f862f
to
b75b750
Compare
df38a34
to
b42d4c1
Compare
Hi @isorrentino let me know if It is ready for a review |
Hi @GiulioRomualdi, it is ready for review. |
Co-authored-by: Giulio Romualdi <[email protected]>
Hi @GiulioRomualdi do you have time to check if everything is ok now? |
On windows there is a failure: https://github.com/ami-iit/bipedal-locomotion-framework/actions/runs/10454540285/job/28947375460?pr=866#step:13:496 |
a5a6550
to
30f3ce6
Compare
30f3ce6
to
9c67e80
Compare
Waiting for the CI |
843889f should fix the issue |
Thanks |
No description provided.