Documentation ¶
Index ¶
- type Gazebo
- func (g *Gazebo) AddPostStepAction(action StepActions)
- func (g *Gazebo) Iterations() uint64
- func (g *Gazebo) Position(ctx context.Context) (entities.Position, error)
- func (gazebo *Gazebo) Shutdown(ctx context.Context) error
- func (gazebo *Gazebo) SimTime(ctx context.Context) (time.Time, error)
- func (gazebo *Gazebo) Start() error
- func (g *Gazebo) Step(ctx context.Context) error
- type GazeboConfig
- type Sim
- type StepActions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gazebo ¶
type Gazebo struct { sync.Mutex ExecutablePath string Config *GazeboConfig Logger *log.Logger Cmd *exec.Cmd TimePath string StepPath string PositionPath string TotalIterations uint64 PTY *os.File TemporaryPostStepActions []StepActions // contains filtered or unexported fields }
func (*Gazebo) AddPostStepAction ¶
func (g *Gazebo) AddPostStepAction(action StepActions)
implements sim.Sim
func (*Gazebo) Iterations ¶
implements sim.Sim safe to call from a post-step action.
type GazeboConfig ¶
type GazeboConfig struct { // contains the world configuration WorldPath string // where to execute Gazebo WorkDir string // Any additional environment variables Env []string // Actions to invoke pre-step PreStepActions []StepActions // Actions to invoke post-step PostStepActions []StepActions // Length of each unit of simulation StepSize uint64 }
type Sim ¶
type Sim interface { Start() error Shutdown(ctx context.Context) error Step(ctx context.Context) error SimTime(ctx context.Context) (time.Time, error) Position(ctx context.Context) (entities.Position, error) AddPostStepAction(action StepActions) Iterations() uint64 }
func NewGazeboFromEnv ¶
func NewGazeboFromEnv(config *GazeboConfig) (Sim, error)
type StepActions ¶
type StepActions func()
Click to show internal directories.
Click to hide internal directories.