state

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package state provides apis for motion builtin plan executions and manages the state of those executions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteResponse

type ExecuteResponse struct {
	// If true, the Execute function didn't reach the goal & the caller should replan
	Replan bool
	// Set if Replan is true, describes why replanning was triggered
	ReplanReason string
}

ExecuteResponse is the response from Execute.

type PlanExecutorConstructor

type PlanExecutorConstructor[R any] func(
	ctx context.Context,
	req R,
	seedPlan motionplan.Plan,
	replanCount int,
) (PlannerExecutor, error)

PlanExecutorConstructor creates a PlannerExecutor if ctx is cancelled then all PlannerExecutor interface methods must terminate & return errors req is the request that will be used during planning & execution seedPlan (nil during the first plan) is the previous plan if replanning has occurred replanCount is the number of times replanning has occurred, zero the first time planning occurs. R is a genric type which is able to be used to create a PlannerExecutor.

type PlanResponse

type PlanResponse struct {
	Waypoints        Waypoints
	Motionplan       motionplan.Plan
	PosesByComponent []motion.PlanStep
}

PlanResponse is the response from Plan.

type PlannerExecutor

type PlannerExecutor interface {
	Plan() (PlanResponse, error)
	Execute(Waypoints) (ExecuteResponse, error)
	Cancel()
}

PlannerExecutor implements Plan and Execute.

type State

type State struct{}

State is the state of the builtin motion service It keeps track of the builtin motion service's executions.

func NewState

func NewState(ctx context.Context, logger logging.Logger) *State

NewState creates a new state.

func (*State) Stop

func (s *State) Stop()

Stop stops all executions within the State.

type Waypoints

type Waypoints [][]referenceframe.Input

Waypoints represent the waypoints of the plan.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL