PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.

Home Page:http://dev.px4.io/simulation-gazebo.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot get data of cameras when simulating multiple iris drone

longvucao opened this issue · 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)

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>.