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

Invertedai waypoints ue4 #8619

Open
wants to merge 4 commits into
base: ue4-dev
Choose a base branch
from

Conversation

rf-ivtdai
Copy link

@rf-ivtdai rf-ivtdai commented Jan 30, 2025

Description

Hi there, I am an ML engineer from Inverted AI. I've been using the invertedai_traffic PythonAPI examples, and noticed a few issues need fixing before users can run Carla simulations with our APIs more smoothly.

  1. The script spawns actors into Carla based on agent states and properties returned by IAI, but fails for most agents because their carla transform locations has z = 0, using something like z = 0.1 improves things a lot.
  2. With the above fix, there are still occasional failures in actor spawning, resulting in downstream errors when --iai-log is enabled, this is also fixed in this PR.
  3. We introduced a new way to drive IAI agents better: by passing carla waypoints to our API. The command line options and code are included in this change.
  4. Carla pedestrians have orientations in degrees but need to be converted into radians prior to being passed to Inverted AI.
  5. The default map Town10 is not loaded into Carla world, which causes downstream errors especially when getting waypoints from Carla.
  6. We noticed setting a max_speed for IAI agents improves driving behaviour.

Fixes #

Where has this been tested?

  • **Platform(s):Ubuntu
  • **Python version(s):Python 3.8 & 3.10
  • **Unreal Engine version(s):UE4

This PR is applicable to the same example for ue5-dev branch, as the logic and resources used calling inverted AI APIs are the same, and are independent of the engine and assets.

Possible Drawbacks

No known drawbacks. Tested with IAI cars only or Carla pedestrians + IAI cars.


This change is Reviewable

@rf-ivtdai rf-ivtdai requested a review from a team as a code owner January 30, 2025 19:31
Copy link

update-docs bot commented Jan 30, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

controller.set_max_speed(0.5 + random.random())

return pedestrians
# loc = world.get_random_location_from_navigation()

Choose a reason for hiding this comment

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

@rf-ivtdai Should this not be outright deleted or kept in instead of being commented?

Copy link
Author

Choose a reason for hiding this comment

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

I'm actually hoping to still run this with IAI cars and the rest of the change.

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.

2 participants