[SequencePlayer/seqplay.h] skip removing state if state==created in remove()#1318
Closed
Naoki-Hiraoka wants to merge 2 commits intofkanehiro:masterfrom
Closed
[SequencePlayer/seqplay.h] skip removing state if state==created in remove()#1318Naoki-Hiraoka wants to merge 2 commits intofkanehiro:masterfrom
Naoki-Hiraoka wants to merge 2 commits intofkanehiro:masterfrom
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SequencePlayerの
removeJointGroup()を未使用のJointGroupに対して呼ぶと、SequencePlayerから出力される指令関節角度の値が0に突然変化し、2.5秒かけてもとの値に戻る、という挙動を示し、危険でした。原因は、未使用のJointGroup(
state==created)はget関数のなかで何もしないことが期待されているにも関わらず、removeJointGroup()を呼ぶとstateがremovingに変化してしまい、初期値の0から2.5秒かけてもとの値に戻る補間軌道が実行されてしまうためでした。hrpsys-base/rtc/SequencePlayer/seqplay.h
Lines 71 to 90 in 41f853a
hrpsys-base/rtc/SequencePlayer/seqplay.h
Lines 125 to 128 in 41f853a
未使用のJointGroup(
state==created)は、removeJointGroup()を呼んだときに、stateremovingを経由せずに直接stateremovedに遷移するようにしました。