-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPS Initialization and Projection #565
Comments
For #1: which vehicle are you using (car / multirotor (simple_flight / PX4))? We are planning to add this in settings file. Right now we don't have any other way than changing code, however. For #2: Right now everything is from UE4 to NED. The UE4 coordinates are all internal and all of the AirSim code as well as APIs expose only NED coordinates. I think it might be good to support other coordinate systems. Is that what you are talking about? Or are you thinking about how UE4 to NED conversion happens? The current code for conversion is simpler but should be fairly accurate over large area that matters for multirotors. Of course, for cars its different matter... For #3: PX4 SIL allows you to fly drones using PX4 firmware without having hardware such as Pixhawk or Pixracer. However its difficult to setup and get working. This is why we designed simple_flight firmware. Currently, well, its really simple and only had PID controllers but later we would add state estimation as well. PX4 SIL doesn't enable event subscription model. We are planning to add ROS adapter later (current APIs don't support push model). One think PX4 can do is allow listening to MavLink messages. That's as close as you can get to listening to events. However you will need significant technical know how on how to do this and in the end you get to listen to MavLink messages that might be convertible to ROS messages. That should work in SIL or HIL mode. We have app called LogViewer that does this. |
Thanks for the quick response!
P.S. The whole GPS thing is important for my research. I am able to automatically construct a geo-referenced virtual world in UE4 that matches the real world. For example I can then send GPS positions of real buildings in the world, and the multirotor will then fly to these high fidelity reconstucted buildings in UE4 (this is already working). The only issue is that the GPS positions sent back by AirSim will be wrong because they are using a totally different transformation (also the home position is off). I can convert it post receiving, but I will need to know the exact transformation you are using. I hope this makes more sense, and here is a video so that you can see what I am talking about. Thanks again for all your help! |
Sorry for the off-topic comment, @JeremyBYU can you please provide more details about "constructing a geo-referenced virtual world in UE4 that matches the real world", any link that demonstrates how to match the real word or a source of data for the geo-images are greatly appreciated, thanks a lot. |
Hi Mohamed, Just to clarify my desire for this issue, because I think my response to sytelus was pretty confusing:
Right now I'm just not using the GPS 'sensor' from AirSim. I just get the NED coordinates and convert them to GPS coordinates myself. Thanks! Jeremy |
We are process to expose sensor data through API which will include GPS. I'll update this thread as soon as this will be ready. |
#1920 sensor APIs were added here The geo-referenced import in UE4 is pretty cool! Marking as something to be added to the docs. |
@madratman , However I have made a recent paper about using Unreal Engine to simulate Rooftop Landings (does not use the methods just discussed). You can find the paper here and short video here. In the process I made many useful tools:
I think these other tools I mentioned are actually quite useful and will release them soon. I will probably do a write up of the tools sometime in July and release them all. How should I get in touch when more of this stuff is ready. Should I just e-mail you directly? |
I finished writing the blog posts and putting together a code repository. Repository for allowing AirSim to understand other projection systems: AirSimGeo |
Hi,
I just have a 2 questions about GPS in AirSim and a final generic question.
Question 1
How to set the initial GPS location (I believe this is called
home_point
in the code) . For clarification this is my setup:OS: Windows 10
Flight Controller: Simple Flight
UE4 Custom Map - Pawn Spawns automatically
It seems that it is set to some Microsoft building (47.6414680,-122.140167) by default. I see it hardcoded here and here.
I think the first link is the relevant code and its being automatically set. So I can change this code myself manually and rebuild, but I was wondering if there was a more elegant way. Like maybe a settings files configuration, or maybe a custom property on the a vehicle pawn that is set on the UE4 editor (maybe UE4 has a GPS property on an object, I didnt see it). Or maybe an API to set the Home position (I'm using python and I dont see it there).
Question 2
I am looking at the projection that you are using to convert between GPS and NED (planar coordinates: x,y,z). I think the code is here or here. The first looks a like a very simple projection, but was wondering how you would feel about supporting other projections. Right now my map in UE4 is projected in EPSG:3857 and all object can be geo-referenced this way. I was wondering how you would feel about using proj4 to do the conversion for you between the planar coordinates/GPS coordinates (instead of the two links I showed). I think the big concern would be speed and adding an extra dependency. However this would allow any research to just simply specify the projection (using the SRID like EPSG:3857 maybe in a setting file) and the projection is taken care of. Just wondering!
Question 3
So I am NOT using PX4 SIL, nor ground control. Can you explain the benefit of these items and how they fit in to the AirSim global picture. Is PX4 a replacement for
simple_flight
? Something I miss is the ability to subscribe to data events like the pawn position/orientation, instead of having to query it like the python API provides. I come from ROS/LCM background so this would be like a topic that I can subscribe to. Does PX4 SIL or Ground control provide that ability. Anyways thanks for all your help and the great product.Thanks,
Jeremy
The text was updated successfully, but these errors were encountered: