-
Notifications
You must be signed in to change notification settings - Fork 104
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
fixed the checkJointTypes function for the case of TORQUE control #719
Conversation
…is not consistent across joints
Co-authored-by: Ugo Pattacini <ugo.pattacini@iit.it>
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 can see a verbatim copy'n'paste of lots of code lines we could thus refactor and made much more compact.
@AlexAntn we can get away w/ less by refactoring the main routine and make it call 2 sub-routines that implement each the body of the 2 for loops. In this case, indeed, each subroutine can stick to the generic case of the base class as we don't deal w/ pointers arithmetic inside the subroutines' body. |
Ìn the last commit to this issue I have refactored the loops in order to reduce duplicated code. I have also changed how we obtain the These changes have been tested directly on the robot and are working ( |
LGTM, thanks a lot @AlexAntn 🚀 |
I'll wait for the CI to complete and then squash and merge the PR. @Nicogene in the meantime, you may be willing to review it as well. |
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.
LGTM
I think we can squash all the commit in just one |
Don't do that please, otherwise CI will start over from scratch! I can simply use the corresponding button from the GH GUI, instead, to squash the commits. |
This PR fixes issue #718 .
Since we have an array of PidInfo / TrqPidInfo, we can't rely on class inheritance to query the parameters of each PID (an array of Derived is not a kind-of array of Base). As such, we need to check if the PID type is torque and handle it differently.