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

Gocarx #18

Closed
wants to merge 97 commits into from
Closed

Gocarx #18

wants to merge 97 commits into from

Conversation

alezana
Copy link
Member

@alezana alezana commented Jan 2, 2025

No description provided.

wu-hy and others added 30 commits July 9, 2024 15:51
Add the tricycle model of the gokart and a dummy agent demo to test the simulator
Add demo of two agent, reimplement   the function of distance to boundary calculation
Add a new state yaw_rate, there might be still some compatibility problem
Test observe, metric and termination function. The dynamic model still need to be refined.
observe, reward , reset need to be further improved
neural network may return NaN after several iterations
evaluation visualized in wandb
alezana and others added 28 commits November 13, 2024 23:33
simplified some env structures and wrappers
- add acc_x and acc_y to trajectory array (needed by ignition)
add dynamics from forces solver and ignition
* new metrics

* minor

* small updates

* wip

* unit tests

* Update waymax/metrics/gokart_offroad.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* wip

* final

* revert back to GokartActionHistory

* minor renaming

* remove specific state metrics

* minor

* updates

* minors

* update bounds metric

* Update gokart_offroad.py

remove useless import

* wip

* to be verified, seems to work as expected

* refactored metrics, rewards

* Update waymax/rewards/linear_transformed_reward.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* fix tests

* fixes

---------

Co-authored-by: alezana <[email protected]>
Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>
Copy link

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some food for thought. View full project report here.

elif x.dtype == jnp.bool_:
return jnp.zeros_like(x).astype(jnp.bool_)
else:
raise ValueError("Unsupport dtype: %s" % x.dtype)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise ValueError("Unsupport dtype: %s" % x.dtype)
raise ValueError(f"Unsupport dtype: {x.dtype}")

f-string is easier to read, write, and less computationally expensive than legacy string formatting. More.

passed into the environment. This runs metrics that may be specific to the
planning agent case.
def discount_spec(self) -> specs.BoundedArray:
return specs.BoundedArray(shape=tuple(), minimum=0.0, maximum=1.0, dtype=jnp.float32)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return specs.BoundedArray(shape=tuple(), minimum=0.0, maximum=1.0, dtype=jnp.float32)
return specs.BoundedArray(shape=(), minimum=0.0, maximum=1.0, dtype=jnp.float32)

Using tuple literal syntax is simpler and computationally quicker. Read more.

@alezana alezana closed this Jan 2, 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

Successfully merging this pull request may close these issues.

5 participants