Skip to content

Commit 18612dc

Browse files
sdiaomrpropellersat669LaurieCheers-unityhyounesy
authored
Merge Dev to main for release 0.4.0 (#74)
* Add logging dependency (#32) * Changing yamato host flavor to large (#33) * Amanda/read chunks (#36) * s.send to s.sendall * Increase default timeout * Timeout as argument on instantiation * Update version number (#38) * Laurie/topic list (#41) * Updating Contribution Content (#44) * Contributing guidelines * Issue templates * PR feedback * Updated per later changes (#45) * Adding PR template (#46) * One persistent connection for all messages sent to Unity * make UnityService accessible from ros_tcp_endpoint (#49) * Don't keep retrying on success (#50) * Resolve conflicts for merging dev to main * Queue module was renamed in Python 3 (#53) * Update package.xml (#54) * RosConnection 2.0 (#57) * Remove outdated handshake references * Fix sending response to unity service (#59) * add changelog (#60) * Forum links to README, config.yml (#61) * Send empty message on connection start (#58) * add test coverage for python scripts (#62) * fix the bug (#64) * Minor bug fixes (#65) * Add Tests and Linter (#63) * Add tests for tcp sender * Add linter and pre-commit hooks * Reformat with python black * Add tests * Add tests for server, client, publisher, subscriber, ros_service, unity_service, thread_pauser * Fix pre-commit-config file name; Add client tests * Add github workflow check * Formatting * Resolve conflicts (#66) * Fix bug (#68) * Fix bug * Temporarily remove publisher test Co-authored-by: Shuo Diao <shuo@unity3d.com> * update version to 0.4.0 (#69) Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com> Co-authored-by: Amanda <31416491+at669@users.noreply.github.com> Co-authored-by: LaurieCheers-unity <73140792+LaurieCheers-unity@users.noreply.github.com> Co-authored-by: Hamid Younesy <hyounesy@users.noreply.github.com> Co-authored-by: peifeng-unity <56408141+peifeng-unity@users.noreply.github.com>
1 parent a5e0fd1 commit 18612dc

34 files changed

+811
-222
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Unity Robotics Forum
4+
url: https://forum.unity.com/forums/robotics.623/
5+
about: Discussions and questions about Unity Robotics tools, demos, or integrations.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Provide any relevant links here.
1616

1717
## Testing and Verification
1818

19-
Please describe the tests that you ran to verify your changes. Please also provide instructions, ROS packages, and Unity project files as appropriate so we can reproduce the test environment.
19+
Please describe the tests that you ran to verify your changes. Please also provide instructions, ROS packages, and Unity project files as appropriate so we can reproduce the test environment.
2020

2121
### Test Configuration:
2222
- Unity Version: [e.g. Unity 2020.2.0f1]
@@ -27,8 +27,9 @@ Please describe the tests that you ran to verify your changes. Please also provi
2727
## Checklist
2828
- [ ] Ensured this PR is up-to-date with the `dev` branch
2929
- [ ] Created this PR to target the `dev` branch
30-
- [ ] Followed the style guidelines as described in the [Contribution Guidelines](../CONTRIBUTING.md)
30+
- [ ] Followed the style guidelines as described in the [Contribution Guidelines](https://github.com/Unity-Technologies/ROS-TCP-Endpoint/blob/main/CONTRIBUTING.md)
3131
- [ ] Added tests that prove my fix is effective or that my feature works
32+
- [ ] Updated the [Changelog](https://github.com/Unity-Technologies/ROS-TCP-Endpoint/blob/dev/CHANGELOG.md) and described changes in the [Unreleased section](https://github.com/Unity-Technologies/ROS-TCP-Endpoint/blob/dev/CHANGELOG.md#unreleased)
3233
- [ ] Updated the documentation as appropriate
3334

3435
## Other comments

.github/workflows/pre-commit.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.7.x
14+
- uses: pre-commit/action@v2.0.0

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: https://github.com/python/black
3+
rev: 19.3b0
4+
hooks:
5+
- id: black
6+
args: [--line-length=100]
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v3.4.0
9+
hooks:
10+
- id: trailing-whitespace
11+
name: trailing-whitespace-markdown
12+
types: [markdown]

.yamato/yamato-config.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,26 @@ agent:
44
image: robotics/ci-ubuntu20:latest
55
flavor: i1.large
66
commands:
7-
- source /opt/ros/noetic/setup.bash && echo "ROS_DISTRO == $ROS_DISTRO" &&
8-
cd .. && mkdir -p catkin_ws/src && cp -r ./ROS-TCP-Endpoint catkin_ws/src &&
9-
cd catkin_ws && catkin_make && source devel/setup.bash && python3 -m pytest
7+
# run unit tests and save test results in /home/bokken/build/output/Unity-Technologies/ROS-TCP-Endpoint
8+
- command: |
9+
source /opt/ros/noetic/setup.bash && echo "ROS_DISTRO == $ROS_DISTRO"
10+
cd .. && mkdir -p catkin_ws/src && cp -r ./ROS-TCP-Endpoint catkin_ws/src
11+
cd catkin_ws && catkin_make && source devel/setup.bash
12+
cd src/ROS-TCP-Endpoint
13+
python3 -m pytest --cov=. --cov-report xml:../../../ROS-TCP-Endpoint/test-results/coverage.xml --cov-report html:../../../ROS-TCP-Endpoint/test-results/coverage.html test/
14+
# check the test coverage
15+
- command: |
16+
linecoverage=$(head -2 test-results/coverage.xml | grep -Eo 'line-rate="[0-9]+([.][0-9]+)?"' | grep -Eo "[0-9]+([.][0-9]+)?")
17+
echo "Line coverage: $linecoverage"
18+
if (( $(echo "$linecoverage < 0.3" | bc -l) )); then exit 1; fi
1019
triggers:
1120
cancel_old_ci: true
1221
expression: |
1322
(pull_request.target eq "main" AND
1423
NOT pull_request.push.changes.all match "**/*.md") OR
15-
(push.branch eq "dev" AND
16-
NOT push.changes.all match "**/*.md")
24+
(pull_request.target eq "dev" AND
25+
NOT pull_request.push.changes.all match "**/*.md")
26+
artifacts:
27+
logs:
28+
paths:
29+
- "test-results/**/*"

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
All notable changes to this repository will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6+
7+
## Unreleased
8+
9+
### Upgrade Notes
10+
11+
### Known Issues
12+
13+
### Added
14+
15+
### Changed
16+
17+
### Deprecated
18+
19+
### Removed
20+
21+
### Fixed
22+
23+
## [0.4.0] - 2021-05-27
24+
25+
Note: the logs only reflects the changes from version 0.3.0
26+
27+
### Upgrade Notes
28+
29+
RosConnection 2.0: maintain a single constant connection from Unity to the Endpoint. This is more efficient than opening one connection per message, and it eliminates a whole bunch of user issues caused by ROS being unable to connect to Unity due to firewalls, proxies, etc.
30+
31+
### Known Issues
32+
33+
### Added
34+
35+
Add a link to the Robotics forum, and add a config.yml to add a link in the Github Issues page
36+
37+
Add linter, unit tests, and test coverage reporting
38+
39+
### Changed
40+
41+
### Deprecated
42+
43+
### Removed
44+
45+
Remove outdated handshake references
46+
47+
### Fixed

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ find_package(catkin REQUIRED COMPONENTS
99

1010
catkin_python_setup()
1111

12-
add_message_files(DIRECTORY msg)
12+
add_message_files(FILES
13+
RosUnityError.msg
14+
RosUnitySrvMessage.msg
15+
RosUnitySysCommand.msg
16+
)
1317

14-
add_service_files(DIRECTORY srv)
18+
add_service_files(FILES
19+
RosUnityTopicList.srv
20+
)
1521

1622
generate_messages(DEPENDENCIES std_msgs)
1723

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contribution Guidelines
22

3-
Thank you for your interest in contributing to Unity Robotics! To facilitate your
4-
contributions, we've outlined a brief set of guidelines to ensure that your extensions
3+
Thank you for your interest in contributing to Unity Robotics! To facilitate your
4+
contributions, we've outlined a brief set of guidelines to ensure that your extensions
55
can be easily integrated.
66

77
## Communication
@@ -40,10 +40,10 @@ We run continuous integration on all PRs; all tests must be passing before the P
4040

4141
All Python code should follow the [PEP 8 style guidelines](https://pep8.org/).
4242

43-
All C# code should follow the [Microsoft C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions).
44-
Additionally, the [Unity Coding package](https://docs.unity3d.com/Packages/com.unity.coding@0.1/manual/index.html)
45-
can be used to format, encode, and lint your code according to the standard Unity
46-
development conventions. Be aware that these Unity conventions will supersede the
43+
All C# code should follow the [Microsoft C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions).
44+
Additionally, the [Unity Coding package](https://docs.unity3d.com/Packages/com.unity.coding@0.1/manual/index.html)
45+
can be used to format, encode, and lint your code according to the standard Unity
46+
development conventions. Be aware that these Unity conventions will supersede the
4747
Microsoft C# Coding Conventions where applicable.
4848

4949
Please note that even if the code you are changing does not adhere to these guidelines,
@@ -60,5 +60,5 @@ email us at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
6060

6161
## Contribution review
6262

63-
Once you have a change ready following the above ground rules, simply make a
63+
Once you have a change ready following the above ground rules, simply make a
6464
pull request in GitHub.

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ Instructions and examples on how to use this ROS package can be found on the [Un
1010

1111
## Community and Feedback
1212

13-
The Unity Robotics projects are open-source and we encourage and welcome contributions.
14-
If you wish to contribute, be sure to review our [contribution guidelines](CONTRIBUTING.md)
13+
The Unity Robotics projects are open-source and we encourage and welcome contributions.
14+
If you wish to contribute, be sure to review our [contribution guidelines](CONTRIBUTING.md)
1515
and [code of conduct](CODE_OF_CONDUCT.md).
1616

1717
## Support
18-
For general questions, feedback, or feature requests, connect directly with the
19-
Robotics team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
18+
For questions or discussions about Unity Robotics package installations or how to best set up and integrate your robotics projects, please create a new thread on the [Unity Robotics forum](https://forum.unity.com/forums/robotics.623/) and make sure to include as much detail as possible.
19+
20+
For feature requests, bugs, or other issues, please file a [GitHub issue](https://github.com/Unity-Technologies/ROS-TCP-Endpoint/issues) using the provided templates and the Robotics team will investigate as soon as possible.
2021

21-
For bugs or other issues, please file a GitHub issue and the Robotics team will
22-
investigate the issue as soon as possible.
22+
For any other questions or feedback, connect directly with the
23+
Robotics team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
2324

2425
## License
2526
[Apache License 2.0](LICENSE)

config/params.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ROS_IP: 127.0.0.1
1+
ROS_IP: 127.0.0.1

0 commit comments

Comments
 (0)