This editor example shows how to interact with holodeck worlds while they are being built
in the Unreal Engine. Most people that use holodeck will not need this.
sensors = [Sensors.RGB_CAMERA, Sensors.LOCATION_SENSOR, Sensors.VELOCITY_SENSOR]
agent = AgentDefinition("uav0", agents.UavAgent, sensors)
env = HolodeckEnvironment(agent, start_world=False)
env.agents["uav0"].set_control_scheme(1)
command = [0, 0, 10, 50]
for i in range(10):
env.reset()
for _ in range(1000):
state, reward, terminal, _ = env.step(command)
def editor_multi_agent_example():
This editor example shows how to interact with holodeck worlds that have multiple agents.
After Change
env.reset()
_ = env.act("turtle0", command)
_ = env.act("turtle1", command)
_ = env.act("turtle2", command)
_ = env.act("turtle3", command)
_ = env.act("turtle4", command)
for _ in range(10000):
states = env.tick()