PX4-SITL_gazebo-classic icon indicating copy to clipboard operation
PX4-SITL_gazebo-classic copied to clipboard

Cannot get data of cameras when simulating multiple iris drone

Open longvucao opened this issue 1 year ago • 2 comments

Hi, I am trying to simulate multiple iris drone and want to get its camera at the same time. When I worked with a drone, I added the following code to the end of the iris.sdf file to get the camera: 4

Then I used the file mavros_posix_sitl.launch and it got the image I wanted (you can see it in the picture) 1 2

However when I use the file multi_uav_mavros_sitl.launch to simulate multiple drones (still using the edited iris.sdf file) the desired topic appears but I can't get the image (you can see the difference here picture below) 3

So do you have any ideas to solve this problem? I really appreciate your help)

longvucao avatar Jun 10 '23 15:06 longvucao

You need to find a way to namespace all the different camera topics being published so that they are distinct from each other? i.e. not publishing to the same camera topic.

JohnTGZ avatar Sep 07 '23 04:09 JohnTGZ

Use group namesapce when you spawn your model into gazebo. You have to make sure your depth camera have <robot_namespace> </robot_namespace>.

Babylonehy avatar Oct 31 '23 06:10 Babylonehy