There is a bug in controller.py. Can't use MoveArm()!!!!!!!!!!!!!!
WZX0Swarm0Robotics opened this issue · 4 comments
My code is:
import ai2thor.controller
controller = controller.step(
action="MoveArm",
position=dict(x=object_position['x'], y=object_position['y'], z=object_position['z']),
coordinateSpace="world",
restrictMovement=False,
speed=1,
returnToStart=False,
fixedDeltaTime=0.02
)
event = controller.search_all_closed('FloorPlan227')
My version of ai2thor is 5.0.0.
The output is:
ValueError: Invalid action: MoveArm
could you provide what parameters you are giving your agent on the Initialize
action? There may be something related to how you are initializing your agent that may be the cause of this
my Initialize action are fellow:
import ai2thor
from ai2thor.controller import Controller
controller = ai2thor.controller.Controller(agentMode="arm",
scene="FloorPlan203",
visibilityDistance=1.5,
gridSize=0.5,
renderDepthImage=False,
renderInstanceSegmentation=False,
width=224,
height=224,
fieldOfView=60)
Aha!! The issue is you are passing in fixedDeltaTime
to the action, which is no longer part of the parameters that are valid for MoveArm
. This was an internal change where the fixed delta time is now set explicitly during agent initialization by passing in fixedDeltaTime
along with all the other controller initializing parameters you are already passing in, and this is set globally for the environment at that time.
I will make a note to update our documentation to reflect these changes so it is less confusing, but for now you should be able to resolve your issue by removing fixedDeltaTime
from the action call, and instead setting it upon agent initialization.
It works. Thank you very much!