Positioning the iris drone at startup inside gazebo

I am a newbie so apologies if this is a stupid question, which may be more
of a gazebo question than SITL, but the model is coming from the gazebo_ardupilot repository so maybe this is an ok question for here.

I have gazebo_ardupilot working fine.

I want to position the drone at a position on a platform above the ground.

I have added the platform as a model to the gazebo world – all good.

Then I want to position the drone on the platform so in the world file I have added
a pose

<model name="iris_demo">
    <uri>model://iris_with_ardupilot </uri>
    <pose>0 0 3 0 0 0 </pose>	

but it doesn’t work. The drone stays positioned on the ground at startup.
If I modify the x or y these work fine. i.e. I can move the drone to any x,y starting position. Just not the z position

Note that this is just gazebo before I fire up sitl.

I guess I could use the -L option on SITL to adjust the starting altitude - but not sure if that’s really a good way. I just don’t understand why my pose can adjust x,y but not z.

Any suggestions gratefully received.

Ah, found the problem. Newbie mistake - with an incorrect collision setting for the platform I created. so the drone does start at the correct height it just falls through the platform immediately after the sim starts.

hi @geoff , can you give me advise about using gazebo and own world? It seems I have the issue with coordinate system. Ardupilot uses NED and gazebo uses XZY system. Do you know how to sync those two? Currently is my drone turned by 90 degs …

Gazebo vs ArduPilot coordinates discussed further here: Gazebo 11 with ardupilot plugin vs NED - #2 by rhys.

1 Like