Skip to content
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

Position of the car in the NH Environment #1893

Closed
HsnAtwi opened this issue Apr 17, 2019 · 7 comments
Closed

Position of the car in the NH Environment #1893

HsnAtwi opened this issue Apr 17, 2019 · 7 comments
Labels

Comments

@HsnAtwi
Copy link

HsnAtwi commented Apr 17, 2019

Hello, I'm trying to train a car in the NH environment (Linux version with Unreal Engine) using Reinforcement Learning.

I need to know the position of the car wrt the road for example, I've used the method in the compute_reward function here https://github.com/Microsoft/AirSim/blob/fff500f6111d463c6f8a0cf386d54cfccf5c0d1b/PythonClient/car/DQNcar.py#L468
but it's not clear on what basis it calculates the distance between the edge of the road and the car itself, the threshold distance (=3.5) is not clear as well and it's not consistent on all the roads. There is also no explanation on what are the points used or what do they represent

I've also tried the method in the driving cookbook-- distributed RL but also did not work.

So, is there a way to know the map of the NH containing the coordinates of the roads for example, or at least an explanation to the 9 points used to calculate the distance and the chose behind the threshold distance.
This will also benefit me when I need to try different initial positions for the car to start training from

Any help would be appreciated.

@HsnAtwi HsnAtwi changed the title Position of the car with respect to the environment Position of the car in the NH Environment Apr 17, 2019
@BrianN92
Copy link

Thanks for posting! I am learning the distributed RL tutorial and I have the same question. It seems like the figure of precomputed centers of each road is not as same as the NH map. The vehicle does not go with those lines in the same direction.

@NextSim
Copy link
Contributor

NextSim commented Apr 26, 2019

You can use the files reward_points.txt and road_lines.txt to look at the road paths and the reward points.. you can plot the points and see it in excel.

Remember that the autonomous driving cookbook uses a specific version of the neighborhood map using an older, incompatible version of the airsim api. It has different coordinates, so the road lines on the autonomous driving cookbook map will not be the same if you mapped with the latest released neighborhood map.

It is also probably best to post in the autonomous driving cookbook issues.

@HsnAtwi
Copy link
Author

HsnAtwi commented Apr 26, 2019

Thanks for the reply @NextSim
Yeah I expected that they won't be the same, I wanna know if there is a defined map or coordinates for the latest version on Linux

@ghost
Copy link

ghost commented May 29, 2019

I'm working on Reinforcement Learning as well and tried using the given AirSim code. I believe the given given points that are defined here are simply the center of the road. Hence it will only work in the NH environment.

@zimmy87
Copy link
Contributor

zimmy87 commented Jan 7, 2021

possibly related to #1009

@zimmy87
Copy link
Contributor

zimmy87 commented Jan 15, 2021

Hi, thank you for reporting this issue. This script was recently removed in #3215 and replaced with a new script at \AirSim\PythonClient\reinforcement_learning\dqn_car.py that uses the new OpenAI gym wrapper. I tested the new script locally and it runs for me. Can you retest with the new script and report back if you see any issues?

@zimmy87 zimmy87 closed this as completed Jan 15, 2021
@LLM1602
Copy link

LLM1602 commented Jul 5, 2021

You can use the files reward_points.txt and road_lines.txt to look at the road paths and the reward points.. you can plot the points and see it in excel.

Remember that the autonomous driving cookbook uses a specific version of the neighborhood map using an older, incompatible version of the airsim api. It has different coordinates, so the road lines on the autonomous driving cookbook map will not be the same if you mapped with the latest released neighborhood map.

It is also probably best to post in the autonomous driving cookbook issues.

i want to konw where can find the file which you said reward_points.txt and road_lines.txt , can you told me the position of the file in detail?Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants