Documentation
¶
Index ¶
- type Emer
- type Env
- func (ev *Env) ConfigGUI(b tree.Node)
- func (ev *Env) ConfigView3D(sc *xyz.Scene)
- func (ev *Env) Defaults()
- func (ev *Env) GrabEyeImage()
- func (ev *Env) InitState()
- func (ev *Env) MakeEmer(wl *builder.World, em *Emer, name string)
- func (ev *Env) MakeModel(sc *xyz.Scene)
- func (ev *Env) MakeRoom(wl *builder.World, name string, width, depth, height, thick float32)
- func (ev *Env) MakeToolbar(p *tree.Plan)
- func (ev *Env) ModelStep()
- func (ev *Env) NoGUIRun()
- func (ev *Env) RenderEyeImg() image.Image
- func (ev *Env) RotBodyLeft()
- func (ev *Env) RotBodyRight()
- func (ev *Env) RotHeadLeft()
- func (ev *Env) RotHeadRight()
- func (ev *Env) Sensors()
- func (ev *Env) StepBackward()
- func (ev *Env) StepForward()
- func (ev *Env) UpdateView()
- func (ev *Env) ViewDepth(depth []float32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emer ¶
type Emer struct {
// if true, emer is angry: changes face color
Angry bool
// VestibHRightEar is the horizontal rotation vestibular signal measured
// at the right ear, averaged over the steps.
VestibHRightEar float32
// full height of emer
Height float32
// emer object
Obj *builder.Object `display:"-"`
// PlaneXZ joint for controlling 2D position.
XZ *builder.Joint
// ball joint for the neck.
Neck *builder.Joint
// Right eye of emer
EyeR *builder.Body `display:"-"`
}
Emer is the robot agent in the environment.
type Env ¶
type Env struct {
// Emer state
Emer Emer `new-window:"+"`
// Stiffness for actions
Stiff float32
// how far to move every step
MoveStep float32
// how far to rotate every step
RotStep float32
// number of model steps to take
ModelSteps int
// width of room
Width float32
// depth of room
Depth float32
// height of room
Height float32
// thickness of walls of room
Thick float32
// current depth map
DepthVals []float32
// offscreen render camera settings
Camera phyxyz.Camera
// color map to use for rendering depth map
DepthMap core.ColorMapName
// The core physics elements: Model, Builder, Scene
Physics builder.Physics
// 3D visualization of the Scene
SceneEditor *xyzcore.SceneEditor
// snapshot image
EyeRImg *core.Image `display:"-"`
// depth map image
DepthImage *core.Image `display:"-"`
}
Env encapsulates the virtual environment
func (*Env) ConfigView3D ¶
ConfigView3D makes the 3D view
func (*Env) GrabEyeImage ¶
func (ev *Env) GrabEyeImage()
GrabEyeImage takes a snapshot from the perspective of Emer's right eye
func (*Env) MakeToolbar ¶
func (*Env) RenderEyeImg ¶
RenderEyeImg returns a snapshot from the perspective of Emer's right eye
func (*Env) StepBackward ¶
func (ev *Env) StepBackward()
StepBackward moves Emer backward in current facing direction one step.
func (*Env) StepForward ¶
func (ev *Env) StepForward()
StepForward moves Emer forward in current facing direction one step
Click to show internal directories.
Click to hide internal directories.