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

Vehicle heading angle #587

Open
izvvv opened this issue Apr 8, 2024 · 2 comments
Open

Vehicle heading angle #587

izvvv opened this issue Apr 8, 2024 · 2 comments

Comments

@izvvv
Copy link

izvvv commented Apr 8, 2024

How do I change the heading angle of a parked vehicle? I need to keep the vehicle level.

image
image

@izvvv
Copy link
Author

izvvv commented Apr 8, 2024

And I've already added PI/2 to my goal
image

@eleurent
Copy link
Collaborator

eleurent commented Apr 14, 2024

v = Vehicle.make_on_lane(...) aligns the vehicle heading with the lane direction, by default.
you can just add the following line below to rotate the vehicles:

v = Vehicle.make_on_lane(...)
v.heading += np.pi / 2
v.color = ...

(or you can just replace the call to make_on_lane by a copy of the function's code and change the heading as needed)

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