PX4-SITL_gazebo-classic
PX4-SITL_gazebo-classic copied to clipboard
Cannot get data of cameras when simulating multiple iris drone
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:
Then I used the file mavros_posix_sitl.launch and it got the image I wanted (you can see it in the picture)
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)
So do you have any ideas to solve this problem? I really appreciate your help)
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.
Use group namesapce when you spawn your model into gazebo. You have to make sure your depth camera have <robot_namespace> </robot_namespace>.