Skip to content

Commit

Permalink
Fix flaking test
Browse files Browse the repository at this point in the history
  • Loading branch information
biotinker committed May 21, 2024
1 parent 27086ab commit 6b970f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/base/kinematicbase/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (ptgk *ptgBaseKinematics) GoToInputs(ctx context.Context, inputSteps ...[]r

defer func() {
ptgk.inputLock.Lock()
ptgk.currentState.currentInputs = zeroInput
ptgk.currentState = baseState{currentInputs: zeroInput}
ptgk.inputLock.Unlock()
}()

Expand Down
6 changes: 4 additions & 2 deletions components/base/kinematicbase/fake_kinematics.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ func (fk *fakePTGKinematics) GoToInputs(ctx context.Context, inputSteps ...[]ref

fk.inputLock.Lock()
fk.currentIndex = i
fk.currentInput = []referenceframe.Input{inputs[0], inputs[1], inputs[2], inputs[2]}
fk.currentInput, err = fk.frame.Interpolate(zeroInput, inputs, 0)
fk.inputLock.Unlock()

if err != nil {
return err
}
finalPose, err := fk.frame.Transform(inputs)
if err != nil {
return err
Expand Down

0 comments on commit 6b970f3

Please sign in to comment.