Skip to content
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

Refactor YarpRobotControl::setReferences function to include optional current joint values and avoid to switch control mode in YarpRobotControl::setReferences #833

Merged
merged 7 commits into from
Apr 5, 2024

Conversation

GiulioRomualdi
Copy link
Member

@GiulioRomualdi GiulioRomualdi commented Apr 5, 2024

This pull request restructures YarpRobotControl in the following manner:

  • It avoids automatically switching the control mode when a reference is set via YarpRobotControl::setReferences. Refer to issue Avoid to switch the control mode in setReference of the RobotControlHelper #820 for more details.
  • Furthermore, setReference can now accept a vector of joints as input (optional). If provided, YarpRobotControl::setReferences avoids calling getEncoders from the interface to check if the maximum error is lower than the acceptable threshold.

Finally, it updates the utilities to work with the new modifications

Warning

As previously mentioned in issue #820, upon merging this PR, several existing code instances will stop functioning. Users should update their code by calling YarpRobotControl::setControlMode() with the desired control mode once before entering the main control loop.

… current joint values and avoid to switch control mode in YarpRobotControl::setReferences
@GiulioRomualdi GiulioRomualdi self-assigned this Apr 5, 2024
@GiulioRomualdi GiulioRomualdi marked this pull request as ready for review April 5, 2024 14:12
@GiulioRomualdi GiulioRomualdi enabled auto-merge (squash) April 5, 2024 14:12
@GiulioRomualdi
Copy link
Member Author

bindings/python/RobotInterface/src/RobotControl.cpp Outdated Show resolved Hide resolved
bindings/python/RobotInterface/src/RobotControl.cpp Outdated Show resolved Hide resolved
@@ -486,17 +530,13 @@ def advance(self):
return True

def __del__(self):
print("chiudo tutto e devo mori")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda miss this message 😂

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too :(

@S-Dafarra S-Dafarra disabled auto-merge April 5, 2024 14:31
GiulioRomualdi and others added 2 commits April 5, 2024 16:32
Co-authored-by: Stefano Dafarra <stefano.dafarra@gmail.com>
Co-authored-by: Stefano Dafarra <stefano.dafarra@gmail.com>
@GiulioRomualdi GiulioRomualdi merged commit b711a64 into master Apr 5, 2024
13 checks passed
@GiulioRomualdi GiulioRomualdi deleted the clean_robot_control branch April 5, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid to switch the control mode in setReference of the RobotControlHelper
2 participants