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

Fix joint velocity abs bug in GC controller #117

Merged
merged 1 commit into from
Jul 5, 2019
Merged

Conversation

zchen24
Copy link
Member

@zchen24 zchen24 commented Jun 5, 2019

No description provided.

@zchen24 zchen24 requested a review from vincent-hui June 5, 2019 01:02
Copy link
Contributor

@vincent-hui vincent-hui left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this bug, we tested your patch with three MTMs. It works well. We also fixed the same bug in matlab code. jhu-dvrk/dvrk-gravity-compensation@1f1fcc3

@vincent-hui
Copy link
Contributor

@adeguet1 do you think we should move this patch to master branch to make a patch release?

@adeguet1
Copy link
Contributor

adeguet1 commented Jun 6, 2019

Re. minor release, this is really up to you since I don't know how much impact this bug has.

Does the patch also require to recalibrate the arms, i.e. acquire data and/or re-run the parameter identification code? I see two recent commits on https://github.com/jhu-dvrk/dvrk-gravity-compensation and it seems that we can use the existing gc-MTMX-12345.json.

If the users don't have to recalibrate, I would do a minor release (1.7.1). If we need to recalibrate the arm, the question is: how bad is the current code? If it's not too bad, I would patch the devel branch and wait for the next release. On the other hand, if the bug has potentially catastrophic consequences (apply random/high torques) and might damage some hardware, we should create a new release (1.8) with a new file format revision (3) for the gc-MTMX-12345.json (to force users to recalibrate). 1.8 would be forked from master@1.7, not the devel branch since it is somewhat untested.

@linhongbin
Copy link

Thanks for your reply. Sorry for the code mistake. I might try to answer the points you asked.

Q1:
-Does the patch also require to recalibrate the arms?
A1:
No, it is not necessary. There are two new commits in the matlab code, which are for correcting the equation and tuning down the effect of friction compensation respectively. The first one is not related to the CPP code and the later one just is to reduce the drift of MTM by tuning down the friction compensation ratio.

Q2:
-how bad is it using the existing code(1.7.0)?
A2:
I think the difference of result between released(1.7.0) and minor patch(1.7.1 maybe) is minor. The code difference of these releases is related to friction compensation, which is on a relatively small scale compared to gravity compensation with respect to the compensate torques. In addition, we actually have implemented some saturated function for dealing the case like high output torques,(i.e. if the output torques surpass the saturated output torques, we will output the saturated ones).

Q3:
-how bad is the current code if we do not re-calibrate the 'gc-MTMX-12345.json'.
A3:
I think the only difference of results between 'gc-MTMX-12345.json' with and without re-calibration is friction compensation ratio. The JSON file without re-calibration just worked fine. I hope I could further improve the performance by tuning parameters in the JSON files, but not changing the Matlab code. And the recalibration does not need to collect new data again.

Cheers.

@vincent-hui
Copy link
Contributor

@adeguet1 this patch does not require to acquire data, re-running the parameter identification code is optional. If users prefer higher friction, they can re-run the parameter identification code to get new friction compensation ratio, dynamic parameters will not be changed.
If it does not take you too much effort, would you do a minor release (1.7.1) after one or two weeks? I think the most easiest way to do the minor release is to cherry pick this commit to master branch.
Thank you

@adeguet1
Copy link
Contributor

adeguet1 commented Jun 7, 2019

Since it is a one line code change I indeed intended to patch the master branching release 1.7.1. You mentioned waiting for a week or too, is this so you can test/verify the code further? If not I can release asap but if you need further time to validate your code, let me know.

@vincent-hui
Copy link
Contributor

Yes, we need more time to review our code and test our code with hardware.

@vincent-hui
Copy link
Contributor

Hi @adeguet1, I think we can release 1.7.1. For matlab code, please merge devel branch into master branch. Thank you very much.

@adeguet1
Copy link
Contributor

adeguet1 commented Jul 1, 2019

Sorry for the delay, I was hoping to find some time to do the release while on vacation but that didn't happen. I should be able to release within a couple of days.

@adeguet1 adeguet1 changed the base branch from devel to rc-1.7.1 July 5, 2019 02:03
@adeguet1 adeguet1 merged commit 823a89c into rc-1.7.1 Jul 5, 2019
@adeguet1 adeguet1 deleted the gc-bug-patch-1 branch July 5, 2019 02:05
@adeguet1 adeguet1 restored the gc-bug-patch-1 branch July 5, 2019 02:08
adeguet1 added a commit that referenced this pull request Jul 5, 2019
(manually merge #117 after botched attempt to merge)
@adeguet1 adeguet1 deleted the gc-bug-patch-1 branch July 5, 2019 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants