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

Introducing a single agent, multi-goal, four-ways intersection environment #699

Merged
merged 73 commits into from
Aug 20, 2024

Conversation

pengzhenghao
Copy link
Member

@pengzhenghao pengzhenghao commented Apr 8, 2024

What changes do you make in this PR?

  • Please describe why you create this PR

This environment will maintain 4 goals: turn-left, turn-right, go-straight, u-turn and report the observation, termination, reward for each of these goals into the info dict. So a policy can be trained to conduct any of this four goals.

TODO:

  • Introduce an example script
  • Add unit test

Checklist

  • I have merged the latest main branch into current branch.
  • I have run bash scripts/format.sh before merging.
  • Please use "squash and merge" mode.

@pengzhenghao pengzhenghao changed the title Introducing a Multi-goal Intersection Single-agent environment Introducing a single agent, multi-goal, four-ways intersection environment Apr 8, 2024
===== timestep 220 =====
route completion:
	route_completion/goals/default: 0.92
	route_completion/goals/go_straight: 0.50
	route_completion/goals/left_turn: 0.46
	route_completion/goals/right_turn: 0.92
	route_completion/goals/u_turn: 0.53

reward:
	reward/default_reward: 1.27
	reward/goal_agnostic_reward: 0.05
	reward/goals/default: 1.27
	reward/goals/go_straight: 0.14
	reward/goals/left_turn: 0.06
	reward/goals/right_turn: 1.27
	reward/goals/u_turn: 0.01
=======================
@pengzhenghao
Copy link
Member Author

This PR is ready. Just merge after all tests passed.

@pengzhenghao pengzhenghao added the Merge after all tests pass Merge this PR when all tests pass! label Aug 8, 2024
@pengzhenghao
Copy link
Member Author

test_component/test_lane_line_detector/test_pg_map fails. Seems like not relevent to this branch.

@pengzhenghao
Copy link
Member Author

Identified that bug comes from:

image

In this PR, we build the "lane line" for "lanes in the negative road" too. I believe this should be the expected behavior and previous one which didn't build lane line for negative road was wrong.

This affects the side detector and cause the observation mismatch in test_pg_map test.

I don't think the "lane line in the negative road" will cause significant change to the system, and those value mismatch in test can be ignored by replacing the GT values by the new one.

To verify that, this is the new side detector visualization in an arbitrary map by drive_in_single_agent.py:

image

This is the old side detector visualization:

image

@pengzhenghao pengzhenghao enabled auto-merge (squash) August 20, 2024 22:29
@pengzhenghao pengzhenghao merged commit 9b3fde1 into main Aug 20, 2024
14 checks passed
@pengzhenghao pengzhenghao deleted the multigoal branch August 20, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge after all tests pass Merge this PR when all tests pass!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant