How to configure ArduPilot to utilize the depth camera data for obstacle detection.
Are there any existing plugins or tools that facilitate this process?
Any code snippets or examples demonstrating obstacle avoidance using depth cameras with ArduPilot in Gazebo.
I have already reviewed the relevant documentation, but additional insights from the community would be immensely helpful. Thank you in advance for your assistance!
Hi @Jazx_Jazx - a full answer to your question will probably take a few posts, but the first part asking to integrate a depth camera into your simulated drone should not be too difficult.
Gazebo Garden and Harmonic support depth cameras directly, so you may not need to used the one from the plugin (you may need to tune the camera intrinsics to match, which would be for a follow up).
The next step is to integrate the data from the camera topics with ArduPilot. For that we’ll probably want to use the tools available in ROS to carry out any image manipulation required, or at least convert the image data into a format recognised by ROS which will be more accessible to other tools. For this we’ll use the ros_gz bridge - more on that in the next post.
I’ve been developing a simulation environment using your waves.sdf as the world, where I placed a BlueBoat model equipped with an OAK-D stereo camera. The boat is controlled via the ArduPilot plugin.
However, I encountered an issue: although the point cloud topic is being published in Gazebo (confirmed via gz topic -l), I cannot visualize the point cloud in either Gazebo or RViz.
Hi @Andy_Chen, nice to see you’ve got the BlueBoat sim running. Most likely the issue is with the configuration of the ros_gz bridge. Reducing the resolution of the camera will help with performance.
There is a discussion in the research channel of the AP Discord server here about mapping point cloud data from Gazebo to ROS 2.
The tricky part: when SDF is converted to URDF, the <sensor> tag gets dropped, and ROS doesn’t recognize the sensor frame by default. However, typing the exact frame name in RViz still works after adding the static transform. Not sure why, but it works.
@Andy_Chen if the TF from the model was generated correctly, that should not be necessary (except maybe a static TF from map to odom if that is not otherwise available). The iris with gimbal example in ardupilot_gz has all the necessary transforms to handle the additional elements attached to the vehicle.
I wonder if some of these are missing in your set up. Getting sdformat_urdf to work correctly on more complex models is a bit fiddly as there are some issues traversing nested models.
Hi friend, I know this is irrelevant but, I was wondering if you still support the “Gazebo: X-UAV Mini Talon V-Tail” project because I want to use it but I can’t find the latest files.