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

How can I get the lane info of a decal road? #288

Open
xTayEx opened this issue Jan 8, 2025 · 3 comments
Open

How can I get the lane info of a decal road? #288

xTayEx opened this issue Jan 8, 2025 · 3 comments

Comments

@xTayEx
Copy link

xTayEx commented Jan 8, 2025

Hi BeamNG team! First of all, thank you for creating such a wonderful simulator and developer-friendly python API. I'm currently
working with the beamngpy library to control in-game vehicles.

My goal is to have a vehicle perform a lane change and verify that the action has been successfully executed. To do this, I would like to compare the vehicle's coordinates with those of the target lane. After thoroughly reviewing the documentation, I was unable to find a suitable method or property that provides the necessary information for this comparison. Could you kindly provide me some guidance?

Thank you!

@cpap-beamng
Copy link
Contributor

Thank you for your kind words.
So, as much as I understand your application, let me recommend here few sensors, which you may find documented at this page . These sensors would be the Roads sensor, where you can use signals like the distances to the center line, the left and the right road edges, as well as the halfwidth and number of lanes signals. Further, you can consider also the State sensor and the GPS, for the vehicle's position.
Hope this helps.

@xTayEx
Copy link
Author

xTayEx commented Jan 12, 2025

Thank you for your kind words. So, as much as I understand your application, let me recommend here few sensors, which you may find documented at this page . These sensors would be the Roads sensor, where you can use signals like the distances to the center line, the left and the right road edges, as well as the halfwidth and number of lanes signals. Further, you can consider also the State sensor and the GPS, for the vehicle's position. Hope this helps.

Thanks for your reply! I gave it a try, and it works for what I need.

@xTayEx xTayEx closed this as completed Jan 12, 2025
@xTayEx
Copy link
Author

xTayEx commented Jan 12, 2025

@cpap-beamng Another question is, how can I specify the lane of number of a decal road? In the doc, I couldn't find any related arguments.

@xTayEx xTayEx reopened this Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants