Comments (3)
You can write it like this
event = controller.step(action="GetMapViewCameraProperties")
controller.step(
action="AddThirdPartyCamera",
**event.metadata["actionReturn"]
)
This snippet comes from this link #814
from ai2thor.
@wanhaozhangxiaorui Thank you very much, this problem has been solved, but I have a new problem. What I want to know is how to adjust the camera parameters to get a high-definition photo.
from ai2thor.
Can you try this
def get_top_down_frame():
# Setup the top-down camera
event = controller.step(action="GetMapViewCameraProperties", raise_for_failure=True)
pose = copy.deepcopy(event.metadata["actionReturn"])
bounds = event.metadata["sceneBounds"]["size"]
max_bound = max(bounds["x"], bounds["z"])
pose["fieldOfView"] = 50
pose["position"]["y"] += 1.1 * max_bound
pose["orthographic"] = False
pose["farClippingPlane"] = 50
del pose["orthographicSize"]
# add the camera to the scene
event = controller.step(
action="AddThirdPartyCamera",
**pose,
skyboxColor="white",
raise_for_failure=True,
)
top_down_frame = event.third_party_camera_frames[-1]
return Image.fromarray(top_down_frame)
get_top_down_frame()
Maybe while creating the controller, give the quality to be "very high".
controller = Controller(platform=CloudRendering, scene=house, quality= "Very High")
from ai2thor.
Related Issues (20)
- How to use procthor-10k in object navigation task? HOT 1
- How to use the procthor-models
- connection to VR interface?
- Where can I see all actions I can execute HOT 1
- Error about Socket Exception HOT 1
- object visible in the metadata can not seen in the observation image
- Docker erro: parse_vt_settings: Cannot open /dev/tty0 (No such file or directory)
- ValueError: Invalid action: SetStateOfAllObjects
- Inaccurate Agent Position and Orientation After `controller.step(action)` HOT 2
- How to use CloudRendering
- snapToGrid affects GetReachablePositions
- 'receptacleObjectIds' is empty after 'PickupObject' object action HOT 1
- Failure to PutObject(s) Lettuce and Bread onto Fridge - no valid positions found HOT 2
- There is a bug in controller.py. Can't use MoveArm()!!!!!!!!!!!!!! HOT 4
- TimeouError when opening or closing Blinds in iTHOR HOT 1
- Docker container error HOT 1
- Documentation Error for GetSpawnCoordinatesAboveReceptacle's Parameter Behavior
- Licensing of Assets?
- How to run ai2thor on NVIDIA GPU?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai2thor.