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

Print the joints which undergo spikes when the emergency stop on encoders ratio triggers #81

Closed
S-Dafarra opened this issue Oct 29, 2019 · 7 comments
Assignees

Comments

@S-Dafarra
Copy link
Collaborator

The Yoga has an emergency stop when the encoder ratio is bigger than a threshold. This is pretty useful, even if, when it triggers, it would be helpful to understand which joint triggered it and what was the entity of the spike

@gabrielenava
Copy link
Collaborator

Here, the cleanest solution is to save to workspace the vector that contains the check done on each single joint, then in the function that runs when the model is stopped we add a warning message. in this way it is even possible to print the name of the joint undergoing spikes, which is clearer than just printing the joint number.

However, this requires to add an extra output to the check_spikes function, and this means breaking the compatibility of the WBC matlab functions library w.r.t. older models.

I will do it, but this change has to be advertised somewhere.

@gabrielenava
Copy link
Collaborator

Also the check_range function can be updated in the same way.

@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Mar 17, 2020

However, this requires to add an extra output to the check_spikes function, and this means breaking the compatibility of the WBC matlab functions library w.r.t. older models.

I will do it, but this change has to be advertised somewhere.

What about copying into a new one and deprecating the old one?

@gabrielenava
Copy link
Collaborator

What about copying into a new one and deprecating the old one?

You convinced me, so let's do the following:

  • I create two new functions checkInputRange and checkInputSpikes;

  • I leave checkRange and checkSpikes in the library but I'll add a warning message saying that these functions are deprecated and they'll be removed in a future release;

  • I will open an issue here as a reminder for removing the functions in the release 3.0.

@gabrielenava
Copy link
Collaborator

It was necessary to add a unit delay block because otherwise the vector that contains the check done on each single joint at time t = t_fail is not sent to workspace. But for the rest, I've implemented it.

After my testing session I'll add the commit and close the issue.

@gabrielenava
Copy link
Collaborator

Tested. Here is the message when the joint hits the limits:

limits

Here is the message when the joint has a spike:

spike

Here is the part of the commit relevant for this issue (part of the modifications are hidden in Simulink models):

bdbf7fd#diff-fc685c058894133c193c74a2f206badbL60

Same modification done for all the stopFunctions. Closing.

@S-Dafarra
Copy link
Collaborator Author

Awesome!

gabrielenava pushed a commit that referenced this issue Mar 23, 2020
* added data processing utility

* documentation of the repo updated

* Update README.md

* Update README.md

* cleanup of documentation, cmake and models

* added Simulink balancing simulator

* added home positions for the yarpmotorgui

* updated installation path of homePos

* Revert "updated installation path of homePos"

This reverts commit 55928fb.

* fixed warning in CMakeLists.txt

* added goToWholeBodyControllers.m generation

* updated documentation for goToWholeBodyControllers.m

* updated GUI (#82) and print warning when joints have spikes or exit range (#81)

* added pictures of the simulink models

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update How-to-run-controllers-with-gazebo-simulator.md

* Update How-to-run-controllers-with-gazebo-simulator.md

* Update How-to-run-controllers-with-gazebo-simulator.md

* Update How-to-setup-iCub-for-wbc-experiments.md

* Update autogeneration (#92)

* Add driver.cpp.in template

* Update clang-format

* Update main CMakeLists.txt to use the driver.cpp.in template

* Minor edit in RegisteMdl.cmake

* Update CreateAutogeneratedCodeTargets.cmake.in template

* fix block names for autogen

* fixed also the model without Gazebo for autogen

* modified installation path of +wbc library

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* models exported to 2017b

Co-authored-by: Diego Ferigo <[email protected]>

Co-authored-by: Diego Ferigo <[email protected]>
gabrielenava pushed a commit that referenced this issue Mar 23, 2020
* added data processing utility

* documentation of the repo updated

* Update README.md

* Update README.md

* cleanup of documentation, cmake and models

* added Simulink balancing simulator

* added home positions for the yarpmotorgui

* updated installation path of homePos

* Revert "updated installation path of homePos"

This reverts commit 55928fb.

* fixed warning in CMakeLists.txt

* added goToWholeBodyControllers.m generation

* updated documentation for goToWholeBodyControllers.m

* updated GUI (#82) and print warning when joints have spikes or exit range (#81)

* added pictures of the simulink models

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update How-to-run-controllers-with-gazebo-simulator.md

* Update How-to-run-controllers-with-gazebo-simulator.md

* Update How-to-run-controllers-with-gazebo-simulator.md

* Update How-to-setup-iCub-for-wbc-experiments.md

* Update autogeneration (#92)

* Add driver.cpp.in template

* Update clang-format

* Update main CMakeLists.txt to use the driver.cpp.in template

* Minor edit in RegisteMdl.cmake

* Update CreateAutogeneratedCodeTargets.cmake.in template

* fix block names for autogen

* fixed also the model without Gazebo for autogen

* modified installation path of +wbc library

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* models exported to 2017b

Co-authored-by: Diego Ferigo <[email protected]>

Co-authored-by: Diego Ferigo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants