Replies: 1 comment 3 replies
-
This will definetly be more challenging than simply using the Python API. Often, if you can simply define the task as a sequence of subtasks already defined, that would be much easier. But, if you're feeling adventurous enough, we use Unity to build the backend environment, which is then accessible from a Python API. Backend Setup.
You should then see a window that looks something like the following, which will allow you to interactively edit the scenes: Building locally. This allows you to play with your changes from the Python API.
from ai2thor.controller import Controller
controller = Controller(
local_executable_path="<BASE_DIR>/unity/builds/thor-OSXIntel64-local/thor-OSXIntel64-local.app/Contents/MacOS/AI2-Thor"
) where base DIR is the path to the cloned Adding actions. The agent you are targeting (e.g., there is a Drone agent, a Big Blue default agent, and a LoCoBot agent), will change where you'll want to add actions.
It's generally safe to just copy the style of existing actions and use them as a template. But, actions that say ServerAction as a parameter are being phased out for actions that do not. The latter should be easier to work with. Check out this Teleport action for a recent example. The syntax to add actions is based on C# and Unity, so for that part I'd look at their documentations. Adding scenes and objects. Probably easiest to simply duplicate an existing scene within from ai2thor.controller import Controller
controller = Controller(scene='MyScene')
controller.reset('MyScene') There's a bunch of extra components added to scenes and objects that make them work, whereas starting a new scene directly would not. Similarly for objects, just duplicate an existing object and possibly tinker around with its properties and parameters so that it's bounding box fits the size of the new 3D object, its object type is reasonable, and its object name is reasonable. |
Beta Was this translation helpful? Give feedback.
-
Excuse me, I want to know if we can define the actions and scenes (for example the shape of agents in multi-agent tasks) by rewriting the AI2THOR-build file. And if we can, how can we write the file to define our own tasks? Do you have some documentations or guildlines that we can learn to modify the AI2THOR-build file for our own tasks?
Beta Was this translation helpful? Give feedback.
All reactions