Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a bug in controller.py. Can't use MoveArm()!!!!!!!!!!!!!! #1212

Open
WZX0Swarm0Robotics opened this issue Apr 30, 2024 · 4 comments
Assignees

Comments

@WZX0Swarm0Robotics
Copy link

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

@winthos
Copy link
Collaborator

winthos commented Apr 30, 2024

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

@WZX0Swarm0Robotics
Copy link
Author

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)

@winthos
Copy link
Collaborator

winthos commented May 2, 2024

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.

@winthos winthos self-assigned this May 2, 2024
@WZX0Swarm0Robotics
Copy link
Author

It works. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants