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

Is the steering angle in an ActuatorDynamic action space degrees or radians? #1833

Closed
ajlangley opened this issue Feb 6, 2023 · 4 comments · Fixed by #1834
Closed

Is the steering angle in an ActuatorDynamic action space degrees or radians? #1833

ajlangley opened this issue Feb 6, 2023 · 4 comments · Fixed by #1834
Labels
help wanted Extra attention is needed

Comments

@ajlangley
Copy link
Contributor

High Level Description
As title. I just couldn't find the steering angle units.

Desired SMARTS version
1.0.1

@ajlangley ajlangley added the help wanted Extra attention is needed label Feb 6, 2023
@Gamenot
Copy link
Collaborator

Gamenot commented Feb 6, 2023

@ajlangley The units should always be in SI aside from the action. The following should roughly be the case:

action for ActuatorDynamic is a clipped value between [-1, 1] (clipped_steering_change).
p is a constant 1 - 1e-3.
dt_sec is the time-step in seconds (typically 0.1s)

ActuatorDynamic modifies the action in the following way:
steering_control = p * last_steering_control + clipped_steering_change * dt_sec

For our typical vehicle, the steering wheel we model has 2 radians (max_steering) of turn and a steering gear ratio of 17.4 (steering_gear_ratio).

Both wheels use the following equation:
-steering_control * max_steering * (1/steering_gear_ratio)

This is the ideal case but the physics engine may have other ideas in some situations.

@ajlangley
Copy link
Contributor Author

Thanks for your reply. In that case, if I added ActuatorDynamics to the FormatAction environment wrapper and set the action space to Box([-1, 1], [-1, 1], [-2*pi, 2.pi]), would that be of interest?

@Gamenot
Copy link
Collaborator

Gamenot commented Feb 6, 2023

Hello, @ajlangley. My understanding is that ActuatorDynamic uses the same Box([0, 1], [0, 1], [-1, 1]) as Continuous.

I am surprised reading the documentation that we did not make this properly noted. I am updating the current documentation to make this clear.

Otherwise, this is still of interest.

@Gamenot Gamenot linked a pull request Feb 6, 2023 that will close this issue
@ajlangley
Copy link
Contributor Author

Great, thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants