Class Iv4xrEnvironment

java.lang.Object
nl.uu.cs.aplib.mainConcepts.Environment
eu.iv4xr.framework.mainConcepts.Iv4xrEnvironment
Direct Known Subclasses:
MyAgentEnv, W3DEnvironment

public class Iv4xrEnvironment extends Environment
An extension of the standard Environment. The extra feature is that the method observe(String) now returns the observation as an instance of WorldModel.

Note that this class is not use-ready. You have to implement several methods

Author:
Wish
  • Constructor Details

    • Iv4xrEnvironment

      public Iv4xrEnvironment()
  • Method Details

    • worldNavigableMesh

      public Mesh worldNavigableMesh()
      You can implement this method.

      Return a polygon-mesh describing the navigable surface of the 3D-world of the real environment/system that is represented/controlled by this environment, if this information is provided by the real environment. Else the method returns null.

      The obtained Mesh can subsequently be converted into a navigation graph that is attached to an agent-state, in particular a state of type Iv4xrAgentState. To do the conversion, see for example the methods Iv4xrAgentState.loadSimpleNavGraph(Iv4xrAgentState) and Iv4xrAgentState.loadSurfaceNavGraph(Iv4xrAgentState, float).

    • observe

      public WorldModel observe(String agentId)
      You should implement this method.

      This method should send a command to the real environment that will cause it to send back what the agent of the given id observes in the real environment. This method should translate the obtained observation to an a WorldModel and return this world-model.

      Overrides:
      observe in class Environment
      Parameters:
      agentId - The id of the agent whose observation is requested.
      Returns:
      An instance of WorldModel representing what the specified agent observes.