DeepGTAV icon indicating copy to clipboard operation
DeepGTAV copied to clipboard

Getting GPS map coordinates

Open alexgkendall opened this issue 7 years ago • 4 comments

Hey - great code! I've managed to set it up and interface with VPilot.

I'm interested in being able to set a GPS waypoint for the agent and getting access to the game's route planning. Do you know if this has been done/is possible/or could suggest how we could do it?

Thanks!

alexgkendall avatar Jun 29 '17 13:06 alexgkendall

Hi Alex,

The most similar thing to route planning you can get are the directions given by the game engine. Given a waypoint, these are instructions like:

  1. In 200 m turn right
  2. Stay in the right
  3. Straight for 100 m
  4. Turn left
  5. etc...

In VPilot this corresponds to the directions field. I added the functionality but never used it, so I am not much aware of the encoding of the instructions, another user came up with some hints which you can check here: http://www.dev-c.com/nativedb/func/info/f90125f1f79ecdf8

aitorzip avatar Jun 30 '17 07:06 aitorzip

Hey - really awesome work!

I also have a question regarding the paths.xml and the GPS.

Is it already possible to get the GPS position (global coordinates) of the ego-vehicle for a localization within the map?

Best regards and thanks!

manuelschmidt avatar Jul 21 '17 12:07 manuelschmidt

Hi @manuelschmidt

Set location to True in the VPilot dataset message

aitorzip avatar Sep 08 '17 11:09 aitorzip

@aitorzip I appreciate your project and it's been very helpful for me learning.

To turn 'directions' on, it requires me to pass in a an array of three floats. Is this the destination location coordinates?

I gave a location and json returned a val with key 'direction' with two values: from the code I understood that the first one is direction and the second one is the distance.

I got data like

[[ 2.  0.]
 [ 2.  0.]
 [ 2.  0.]
 ..., 
 [ 2.  0.]
 [ 2.  0.]
 [ 2.  0.]]

And it's the same for more than 1000 frames. What does '0', '1', '2' mean for direction? and why is it a 0.0 distance for all frames? How do I interpret

  1. In 200 m turn right
  2. Stay in the right
  3. Straight for 100 m
  4. Turn left

from those two values?

saravanabalagi avatar Mar 17 '18 01:03 saravanabalagi