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

fly.py is slow with vision = True (VisionAviary) #60

Closed
thaipduong opened this issue Nov 19, 2021 · 4 comments
Closed

fly.py is slow with vision = True (VisionAviary) #60

thaipduong opened this issue Nov 19, 2021 · 4 comments
Labels
question Further information is requested

Comments

@thaipduong
Copy link

Hi,
I'd like to get depth image from the drones and have a few questions.
I try fly.py with VisionAviary object by setting vision = True. However, the GUI shows that the drones move very slowly, even thought the camera image size is 64x48 only. Is this expected? Is there any way to speed this up? And is there a laser scanner available so that I can get the depth measurements faster?

Thank you so much.

@JacopoPan
Copy link
Member

Hi @thaipduong

yes, that is expected, of course, the slowdown will be proportional to:

  • number of UAVs num_drones (Not the the vision is in each UAV frame so these are all separate render views)
  • resolution self.IMG_RES = np.array([64, 48]) in BaseAviary
  • framerate of capture self.IMG_FRAME_PER_SEC = 24 in BaseAviary
    For the sake of collecting data, I would recommend running headless (gui=False) and to use an Ubuntu machine and GPU
    In this case you can uncomment line 203 in BaseAviary
if platform == "linux": p.setAdditionalSearchPath(pybullet_data.getDataPath()); plugin = p.loadPlugin(egl.get_filename(), "_eglRendererPlugin"); print("plugin=", plugin)

for hardware acceleration (see section "Plugins" of PyBullet manual)

@JacopoPan JacopoPan added the question Further information is requested label Nov 19, 2021
@thaipduong
Copy link
Author

I see. Thank you, @JacopoPan
Just to confirm, there is currently no lidar on the drone, right?

@JacopoPan
Copy link
Member

Sorry, I forgot to answer your second question.

I didn't implement anything specifically in this repo, but if you look at another work-in-progress env I have here there is an example of how to use PyBullet's rayTest to determine if there is line-of-sight between agents.

@thaipduong
Copy link
Author

Awesome! I'll take a look. Thanks, @JacopoPan

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

No branches or pull requests

2 participants