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

Add agent communication wrapper. #1881

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2d03833
Add agent communication wrapper.
Gamenot Feb 22, 2023
05e1f87
Add docstrings.
Gamenot Feb 22, 2023
9f8d428
Add header.
Gamenot Feb 22, 2023
eacbeaa
Update configuration.
Gamenot Feb 22, 2023
7efa724
Mock up interface for message
Gamenot Feb 22, 2023
b2a4c8d
Add custom block to interface option.
Gamenot Feb 22, 2023
d2081ba
Bring wrapper close to completion.
Gamenot Feb 23, 2023
96a878e
Remove agent interface todo.
Gamenot Feb 23, 2023
b7dc02e
Fix docstring test.
Gamenot Feb 23, 2023
e9a22c0
Add agent communcation example.
Gamenot Feb 23, 2023
cde2091
Add agent communication wrapper.
Gamenot Feb 22, 2023
e021a06
Add docstrings.
Gamenot Feb 22, 2023
1e78270
Add header.
Gamenot Feb 22, 2023
356a922
Update configuration.
Gamenot Feb 22, 2023
4decba0
Mock up interface for message
Gamenot Feb 22, 2023
8b0ed19
Add custom block to interface option.
Gamenot Feb 22, 2023
8960f52
Bring wrapper close to completion.
Gamenot Feb 23, 2023
5268ebd
Remove agent interface todo.
Gamenot Feb 23, 2023
af425d0
Fix docstring test.
Gamenot Feb 23, 2023
f6355a6
Add agent communcation example.
Gamenot Feb 23, 2023
a2f3a1d
Merge branch 'tucker/add_agent_communication' of https://github.com/h…
Gamenot Mar 2, 2023
842f60e
Improve action space.
Gamenot Mar 2, 2023
f98350f
Add vehicle targetting communication wrapper.
Gamenot Mar 3, 2023
931800f
make gen-header
Gamenot Mar 10, 2023
b519785
Fix docstring test
Gamenot Mar 10, 2023
b1a03ef
Fix type test.
Gamenot Mar 10, 2023
85c7582
Fix remaining typing issues.
Gamenot Mar 10, 2023
2cef72e
Remove unused import.
Gamenot Mar 10, 2023
ca0b51e
Merge branch 'master' into tucker/add_agent_communication
Gamenot Mar 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add header.
  • Loading branch information
Gamenot committed Feb 22, 2023
commit 9f8d428cdb4104338ffabb2dc16f4e5bfc10c4bf
23 changes: 21 additions & 2 deletions smarts/env/gymnasium/wrappers/agent_communication.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import gymnasium as gym
# MIT License
#
# Copyright (C) 2023. Huawei Technologies Co., Ltd. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from typing import Any, Dict, NamedTuple, Optional, Tuple
from smarts.env.gymnasium.hiway_env_v1 import HiWayEnvV1

import numpy as np

Expand Down