Class UnitySpaceStation

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.unity.UnityAgent
edu.tufts.hrilab.unity.space_station.UnitySpaceStation

public class UnitySpaceStation extends UnityAgent
  • Constructor Details

    • UnitySpaceStation

      public UnitySpaceStation()
  • Method Details

    • healthResponse

      protected float healthResponse(Message msg)
      Sends a health or tubeHealth message to Unity and awaits the response. Value is index 0 in response message response : ["100"]
    • healthResponse

      protected float healthResponse()
    • healthResponse

      protected float healthResponse(Symbol tube)
    • tubesResponse

      protected List<Symbol> tubesResponse(Message msg)
      Sends a tubesDamaged, tubesBroken or tubesOff message to Unity and awaits the response. Response is list of strings containing all matching tubes
    • tubesResponse

      protected List<Symbol> tubesResponse(String action)
    • tubesResponse

      protected List<Symbol> tubesResponse(String action, Symbol area)
    • tubeStateResponse

      protected boolean tubeStateResponse(String action, Symbol tube)
      Sends a tubeDamaged, tubeBroken or tubeOff message requesting the state of a specific tube. Response is in form ["name", "true"] where index 0 is the name of the requested state and index 1 is the stringified boolean of the state.
    • getSpaceStationHealth

      public float getSpaceStationHealth()
      Gets the health of the space station as a float [0:100].
    • getSpaceStationTubesDamaged

      public List<Symbol> getSpaceStationTubesDamaged()
      Gets a list of damaged tubes, optionally limited to the area.
    • getSpaceStationTubesDamaged

      public List<Symbol> getSpaceStationTubesDamaged(Symbol area)
    • getSpaceStationTubesBroken

      public List<Symbol> getSpaceStationTubesBroken()
      Gets a list of broken tubes, optionally limited to the area.
    • getSpaceStationTubesBroken

      public List<Symbol> getSpaceStationTubesBroken(Symbol area)
    • getSpaceStationTubesOff

      public List<Symbol> getSpaceStationTubesOff()
      Gets a list of off tubes, optionally limited to a area.
    • getSpaceStationTubesOff

      public List<Symbol> getSpaceStationTubesOff(Symbol area)
    • getSpaceStationTubeHealth

      public float getSpaceStationTubeHealth(Symbol tube)
      Gets the health of a specific tube via name as a float [0:100].
    • getSpaceStationTubeDamaged

      public boolean getSpaceStationTubeDamaged(Symbol tube)
      Gets the damaged state of a tube, true if damaged.
    • getSpaceStationTubeBroken

      public boolean getSpaceStationTubeBroken(Symbol tube)
      Gets the broken state of a tube, true if broken.
    • getSpaceStationTubeOff

      public boolean getSpaceStationTubeOff(Symbol tube)
      Gets the off state of a tube, true if off.