I’ve generated a .tif file of my college and created a world file on gazebo. My goal is to do simple missions with the Software In the Loop and/or Mission Planner, but I’m stuck in a problem that I couldn’t really find a solution.
To illustrate the problem, I’ve positioned the ArduCopter in a location in the Gazebo World that is basically the same one that the Software In The Loop is initializing, just like in the next two pictures:
But when I try to send the drone to a direction, like the drawn in the SITL picture, the drone in Gazebo moves towards a different direction. There is something that I can do to handle with it?
Gazebo uses a different XYZ ordering to ArduPilot. I believe you need to rotate the maps/terrian 270 degrees (in yaw) to have it line up with Aurdpilot.
I was trying to use your script and I’m getting this error:
Traceback (most recent call last):
File “./rotate.py”, line 42, in
dst_ds.GetRasterBand(1).WriteArray( array_rot270 )
File “/usr/lib/python3/dist-packages/osgeo/gdal.py”, line 2547, in WriteArray
callback_data = callback_data )
File “/usr/lib/python3/dist-packages/osgeo/gdal_array.py”, line 381, in BandWriteArray
raise ValueError(“array larger than output file, or offset off edge”)
ValueError: array larger than output file, or offset off edge
Does anything like that have ever happened to you?
Hi @Lucas_Baptista , did solve the issue? I have similar issue, when I want to use my own world. I have noticed there is some setup of orientation system in ardupilot plugin in sdf file. Can I fix it with that?
Lukas