This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
575 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# game status for consai2_game | ||
|
||
# ID : text | ||
# 0 : HALT | ||
# 1 : STOP | ||
# 2 : --- | ||
# 3 : FORCE_START | ||
# 11 : OUR_KICKOFF_PREPARATION | ||
# 12 : OUR_KICKOFF_START | ||
# 13 : OUR_PENALTY_PREPARATION | ||
# 14 : OUR_PENALTY_START | ||
# 15 : OUR_DIRECT_FREE | ||
# 16 : OUR_INDIRECT_FREE | ||
# 17 : OUR_TIMEOUT | ||
# 18 : OUR_GOAL | ||
# 19 : OUR_BALL_PLACEMENT | ||
# 20 : --- | ||
# 21 : THEIR_KICKOFF_PREPARATION | ||
# 22 : THEIR_KICKOFF_START | ||
# 23 : THEIR_PENALTY_PREPARATION | ||
# 24 : THEIR_PENALTY_START | ||
# 25 : THEIR_DIRECT_FREE | ||
# 26 : THEIR_INDIRECT_FREE | ||
# 27 : THEIR_TIMEOUT | ||
# 28 : THEIR_GOAL | ||
# 29 : THEIR_BALL_PLACEMENT | ||
|
||
uint8 referee_id | ||
string referee_text | ||
|
||
bool can_move_robot | ||
float64 speed_limit_of_robot # meter/sec | ||
bool can_kick_ball | ||
bool can_enter_their_side | ||
bool can_enter_center_circle | ||
bool is_inplay | ||
float64 keep_out_radius_from_ball # meter | ||
float64 keep_out_distance_from_their_defense_area # meter | ||
|
||
geometry_msgs/Point placement_position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This msg file is copied from 'grSim_Replacement.proto' | ||
# | ||
float64 x | ||
float64 y | ||
float64 vx | ||
float64 vy | ||
|
||
bool is_enabled |
Empty file.
392 changes: 392 additions & 0 deletions
392
consai2r2_referee_wrapper/consai2r2_referee_wrapper/referee_wrapper.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>consai2r2_referee_wrapper</name> | ||
<version>0.0.0</version> | ||
<description>Referee Wrapper</description> | ||
<maintainer email="macakasit@gmail.com">akshota</maintainer> | ||
<license>MIT</license> | ||
|
||
<exec_depend>rclpy</exec_depend> | ||
<exec_depend>consai2r2_msgs</exec_depend> | ||
<exec_depend>consai2r2_receiver</exec_depend> | ||
<exec_depend>consai2r2_description</exec_depend> | ||
|
||
<!-- These test dependencies are optional | ||
Their purpose is to make sure that the code passes the linters --> | ||
<test_depend>ament_copyright</test_depend> | ||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_pep257</test_depend> | ||
<test_depend>python3-pytest</test_depend> | ||
|
||
<export> | ||
<build_type>ament_python</build_type> | ||
</export> | ||
</package> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[develop] | ||
script-dir=$base/lib/consai2r2_referee_wrapper | ||
[install] | ||
install-scripts=$base/lib/consai2r2_referee_wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from setuptools import setup | ||
|
||
package_name = 'consai2r2_referee_wrapper' | ||
|
||
setup( | ||
name=package_name, | ||
version='0.0.0', | ||
packages=[package_name], | ||
data_files=[ | ||
('share/ament_index/resource_index/packages', | ||
['resource/' + package_name]), | ||
('share/' + package_name, ['package.xml']), | ||
], | ||
install_requires=['setuptools'], | ||
zip_safe=True, | ||
author='akshota', | ||
author_email='macakasit@gmail.com', | ||
maintainer='akshota', | ||
maintainer_email='macakasit@gmail.com', | ||
keywords=['ROS'], | ||
classifiers=[ | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python', | ||
'Topic :: Software Development', | ||
], | ||
description='Translate raw referee message to AI-friendly message', | ||
license='MIT License', | ||
tests_require=['pytest'], | ||
entry_points={ | ||
'console_scripts': [ | ||
'referee_wrapper = consai2r2_referee_wrapper.referee_wrapper:main', | ||
], | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2015 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ament_copyright.main import main | ||
import pytest | ||
|
||
|
||
@pytest.mark.copyright | ||
@pytest.mark.linter | ||
def test_copyright(): | ||
rc = main(argv=['.']) | ||
assert rc == 0, 'Found errors' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2017 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ament_flake8.main import main | ||
import pytest | ||
|
||
|
||
@pytest.mark.flake8 | ||
@pytest.mark.linter | ||
def test_flake8(): | ||
rc = main(argv=[]) | ||
assert rc == 0, 'Found errors' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2015 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ament_pep257.main import main | ||
import pytest | ||
|
||
|
||
@pytest.mark.linter | ||
@pytest.mark.pep257 | ||
def test_pep257(): | ||
rc = main(argv=['.']) | ||
assert rc == 0, 'Found code style errors / warnings' |