Skip to content

Commit

Permalink
RSDK-7670 Fix errorstate when plan is complete (viamrobotics#3985)
Browse files Browse the repository at this point in the history
  • Loading branch information
biotinker authored May 22, 2024
1 parent c2cc3ff commit bf6023f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/base/kinematicbase/ptgKinematics.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ func (ptgk *ptgBaseKinematics) ErrorState(ctx context.Context) (spatialmath.Pose
currentInputs := ptgk.currentState.currentInputs
ptgk.inputLock.RUnlock()

if currentExecutingSteps == nil {
// We are not currently executing a plan
return spatialmath.NewZeroPose(), nil
}

currPoseInArc, err := ptgk.frame.Transform(currentInputs)
if err != nil {
return nil, err
Expand Down

0 comments on commit bf6023f

Please sign in to comment.