跳转至

Playable Entities

Historical source, not current validated instructions. Original English content is retained for completeness. For execution use the current Getting Started and current UnrealCV command guide; do not copy historical commands without checking current compatibility.

英文历史原文补充,尚未翻译;本地视频为保留内容的网页播放版。

Original source

  • ^LRo: Codebase

Interactive embodied agents

We've created a range of interactive agents to address different training needs, like object tracking, autonomous driving, indoor/outdoor navigation, and drone tasks. Researchers can easily choose the agent types and environments they need for training. Our platform covers** six main types of agents: virtual humans, animals, cars, motorcycles, and drones.**

Each agent type shares most API interfaces, including control of movement, navigation, and texture adjustments. Plus, we are developing interaction features among agents.

Showcase of different agents

Human Character 🚶🏻‍♂️🚶🏻‍♀️

A diverse range of mesh bodies for virtual characters are used to construct rich and highly realistic environments. These virtual characters can be employed to create dense crowds and simulate real urban scenes, and each character can be controlled and randomly change appearance through our API interfaces.

8053ac76164eb85556855d05dacea84.png

Animals 🐘 🐕 🐎 🐧 🐢 🐖 🐏 🐂

bbf0fa8c2237b1140eb85a8bcd25fcb.png

Vehicle 🏍️ 🚗

We also have developed various types of vehicles including cars and motorcycles. These can be utilized for additional tasks such as autonomous driving and simulating dynamic traffic scenes.

UE4

e2b28bdef79dd1988b8a29621e91b8c.png

**UE5 **

💡Please note that, in the latest UE5 version, to support more realistic chaos system, each vehicle has its own class name, set_app cannot change the appearance anymore. If you want to use another vehicle, please spawn a new instance vehicle.

image.png

Drone 🛩️

The drone can be controlled like vehicles through our APIs. It can be used for multi-agent collaboration or anomaly detection tasks, etc.

6bb42da16d76f3d2235b7176c6acb4a.png

Mobile Robot 🤖

Untitled

Pickable Object 🧸

human character could use set_pickupto pick/drop the item, researchers could use api to set them anywhere in the map and use set_app to change its appearance.

image.png

APIs:

We utilize the BluePrint Function in Unreal Engine to construct these APIs for controlling the agent. Developers could directly call them via UnrealCV in the built-in console or Python code, following the UnrealCV command system:

vbp [obj_name] [func_name] [arg1] [arg2] …

obj_name is the name of the instance of the entity, such as bp_character_2

func_name is the name of the blueprint function, such as nav_to_object

arg is the input parameter for the blueprint function, such as the goal location coordinates.

💡The following linked pages detail the Blueprint APIs for each type of playable entity

Examples

1. Basic movement control

vbp bp_character_2 set_move 0 100
vbp bp_character_2 set_move 20 100
# Control the movement of the agent step by step, 
# specifying the movement speed and direction through given angle and speed parameters. 
# The interval time for single-step execution can be customized and adjusted using "set_interval" 
  • video: Collection - 虚幻编辑器 2024-04-22 10-29-14_set_move_2.mp4 — view original media

Open playback video

2. Advanced movement control

# For further complex environment exploration task 

vbp bp_character_2 set_crouch 
vbp bp_character_2 set_move 0 100
# Set crouch and walk across some narrow obstacles
  • video: Collection - 虚幻编辑器 2024-04-22 11-12-05_set_crouch.mp4 — view original media

Open playback video

vbp bp_character_2 set_move 45 100
vbp bp_character_2 set_jump 
# while agent faces some low obstacles, the agent could jump and climb over the obstacles

Open playback video

vbp bp_character_2 set_liedown 100 0
vbp bp_character_2 set_standup 
# Simulate the actions of falling down, given the direction of falling, 
# as well as the recovery animation.

Open playback video

3. Control movement via navigation system

vbp bp_character_2 nav_to_object bp_animal_2 200
# using navigation system control the bp_character move to a specific object (bp_animal_2),
# and stop when reaching a radius range of 200 
  • video: Collection - 虚幻编辑器 2024-04-23 15-29-46_nav_to_object_natrue.mp4 — view original media

Open playback video

vbp Sport_2 set_viewport
vbp bp_basecar_2 nav_to_goal -1620 -3071 487
vbp Sport_2 set_viewport
# Display the first-person view of motorbike agent.
# Using navigation system control the motorbike agent navigates to a given location in the environment, following the shortest path
# Display the free-roaming perspective 
  • video: Collection - 虚幻编辑器 2024-04-23 18-13-10_motorbike_nav_to_goal.mp4 — view original media

Open playback video

4. Pick/Drop up an object

vbp bp_character_2 set_pickup
# Display the Third-person view of human agent.
# When the human agent reached in the range of interactive object, 
#'set_pickup' command or press keyboard 'E' will trigger the object interaction animation. 
# call set_pickup again, the agent will drop the object. 

Open playback video

5. Open a door

vbp bp_character_2 set_opendoor 1 #open door
vbp bp_character_2 set_opendoor 0 #close door

# Display the First-person view of human agent.
# When the human agent reached in the range of interactive door, 
#'set_opendoor' command or press keyboard 'E' will trigger the door interaction animation. 

Open playback video