[SequencePlayer/seqplay.h] skip removing state if state==created in remove() #1318
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
に遷移するようにしました。