Camera in simulation

Hey everyone, pretty new here. I have PX4-Autopilot, QGroundControl, mavsdk installed on ubuntu. I was able to start a jmavsim and control the drone using python. Now I want to:

  • Take a picture from that drone of the simulation env (downside view from drone);
  • Add some obstacles in the sim env.

I tried camera connection from this example, await drone.camera.set_mode(Mode.PHOTO) but got timeout error. Is there a way to emulate a camera? Maybe I am suing wring simulator? Anyways, any suggestions on how to achieve this goal appreciated.

I tired using gazebo with make px4_sitl gz_x500_baylands and make px4_sitl gz_x500_mono_cam_baylands but got the same timeout error while trying to capture a photo. At least with bayland I don’t need to create objects anymore. I now only need a way to capture frames from mavsdk of gazebo env.

I use this part of documentation