Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
897d5a7
Add ROS# link (#55)
mpinol Jan 25, 2021
d29850a
Fixing message name that should not take a capital first letter autom…
flonou Jan 29, 2021
b6a7e18
AIRO-331 Code Cleanup and Testing Framework (#57)
mrpropellers Feb 1, 2021
f16ceb3
RosMessageGeneration namespace change (#61)
LaurieCheers-unity Feb 4, 2021
8ecb5df
Amanda/read chunks (#62)
at669 Feb 10, 2021
2f3e4a0
Adding prebuilt ObjectRecognition and Octomap messages (#64)
LaurieCheers-unity Feb 12, 2021
3c70eb1
M prefix for all messages (#66)
LaurieCheers-unity Feb 25, 2021
cf39bd8
Topic list service (#72)
LaurieCheers-unity Mar 12, 2021
3d3d941
Adding install instructions to README
mrpropellers Mar 12, 2021
a424741
Updating Contribution Content (#77)
at669 Mar 29, 2021
a05dd6d
Adding PR template (#81)
at669 Apr 7, 2021
97f51e5
One persistent connection for all messages sent to Unity
LaurieCheers-unity Apr 8, 2021
96ee3d0
IP address check for Unity IP address and ROS IP address (#80)
vidurvij-Unity Apr 13, 2021
8c5350e
Resolve conflicts
peifeng-unity Apr 17, 2021
fc1df2e
Merge branch 'main' into dev
LaurieCheers-unity Apr 20, 2021
ac3c30f
Merge pull request #86 from Unity-Technologies/laurie/MergeToMain
LaurieCheers-unity Apr 20, 2021
e73a46a
Update package.json (#87)
LaurieCheers-unity Apr 20, 2021
e6d48a5
Update version number in readme, and clean up some weird instructions…
LaurieCheers-unity Apr 20, 2021
da85dc4
MDuration namespace change (#91)
LaurieCheers-unity Apr 22, 2021
da5e364
Minor link fix (#98)
at669 May 5, 2021
e5eacbb
RosConnection 2.0 (#94)
LaurieCheers-unity May 6, 2021
e852adf
add changelog (#100)
peifeng-unity May 12, 2021
35179d7
Forum links to README, config.yml (#101)
at669 May 13, 2021
63730e6
Laurie/connection status hud (#99)
LaurieCheers-unity May 13, 2021
80fe3a9
add test coverage (#102)
peifeng-unity May 14, 2021
0810c0d
Reducing character count for path to generated messages
mrpropellers May 21, 2021
a8d7f53
Add Linter (#103)
sdiao May 25, 2021
ccbc4f7
Resolve conflicts (#106)
peifeng-unity May 26, 2021
0421d7a
Shuo/resolve conflict (#107)
sdiao May 27, 2021
40926b7
add changelog meta file (#109)
peifeng-unity May 27, 2021
3ef9556
update version to 0.4.0 (#110)
peifeng-unity May 27, 2021
8ee5003
Merge branch 'main' of github.com:Unity-Technologies/ROS-TCP-Connecto…
peifeng-unity Jun 1, 2021
6b9ea6f
rremove stale merge
peifeng-unity Jun 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
75 changes: 75 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
; see http://editorconfig.org/ for docs on this file
; See https://github.com/dotnet/format for dotnet format

root = true

[*]
ignore_if_in_header = This code was generated by a tool|<auto-generated>
indent_style = space
indent_size = 4
; uncomment to help with sharing files across os's (i.e. network share or through local vm)
#end_of_line = lf
; avoid a bom, which causes endless problems with naive text tooling
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
; keeping auto-format enabled helps avoid merge hell for projects without CI-based format validation
#disable_auto_format = true

[*.cs]
; uncomment to enable full formatting of c# files
formatters = generic, uncrustify

[*.asmdef]
scrape_api = true

[**/Tests/**.asmdef]
scrape_api = false

[*.Tests.asmdef]
scrape_api = false

[*.md]
indent_size = 2
; trailing whitespace is unfortunately significant in markdown
trim_trailing_whitespace = false
; uncomment to enable basic formatting of markdown files
#formatters = generic

[{Makefile,makefile}]
; tab characters are part of the Makefile format
indent_style = tab

[*.asmdef]
indent_size = 4

[*.json]
indent_size = 2

[*.{vcproj,bat,cmd,xaml,tt,t4,ttinclude}]
end_of_line = crlf

; this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited.
; the settings are meant to closely match what VS does to minimize unnecessary diffs.
[*.{vcxproj,vcxproj.filters}]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = false
; must be broken out because of 51-char bug (https://github.com/editorconfig/editorconfig-visualstudio/issues/21)
[*.{csproj,pyproj,props,targets}]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = false
[*.{sln,sln.template}]
indent_style = tab
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Unity Robotics Forum
url: https://forum.unity.com/forums/robotics.623/
about: Discussions and questions about Unity Robotics tools, demos, or integrations.
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Provide any relevant links here.

## Testing and Verification

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.
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.

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

## Other comments
17 changes: 17 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pre-commit

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7.x
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- uses: pre-commit/action@v2.0.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.DS_Store
*.swp
*.vscode/
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: mixed-line-ending
exclude: >
(?x)^(
.*cs.meta|
.*.css|
.*.meta|
.*.mat|
.*.preset|
.*.lighting
)$
args: [--fix=lf]

- id: trailing-whitespace
name: trailing-whitespace-markdown
types: [markdown]
- id: check-merge-conflict
args: [--assume-in-merge]
- id: check-yaml
# Won't handle the templating in yamato
exclude: \.yamato/.*


- repo: https://github.com/dotnet/format
rev: "7e343070a0355c86f72bdee226b5e19ffcbac931"
hooks:
- id: dotnet-format
args: [--folder, --include]
11 changes: 8 additions & 3 deletions .yamato/yamato-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ commands:
- python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u 2020.2.0b9 -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
- git clone git@github.cds.internal.unity3d.com:unity/utr.git utr
- utr/utr --testproject=./TestRosTcpConnector --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor
- utr/utr --testproject=./TestRosTcpConnector --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor --enable-code-coverage --coverage-results-path=../test-results --coverage-options="assemblyFilters:+Unity.Robotics.ROSTCPConnector,+Unity.Robotics.ROSTCPConnector.Editor;generateHtmlReport;generateBadgeReport;generateAdditionalMetrics"
# check test coverage
- command: |
linecoverage=$(cat test-results/Report/Summary.xml | grep Linecoverage | grep -Eo '[+-]?[0-9]+([.][0-9]+)?')
echo "Line coverage: $linecoverage%"
if (( $(echo "$linecoverage < 0" | bc -l) )); then exit 1; fi
triggers:
cancel_old_ci: true
expression: |
(pull_request.target eq "main" AND
NOT pull_request.push.changes.all match "**/*.md") OR
(push.branch eq "dev" AND
NOT push.changes.all match "**/*.md")
(pull_request.target eq "dev" AND
NOT pull_request.push.changes.all match "**/*.md")
artifacts:
logs:
paths:
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contribution Guidelines

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

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

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

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).
Additionally, the [Unity Coding package](https://docs.unity3d.com/Packages/com.unity.coding@0.1/manual/index.html)
can be used to format, encode, and lint your code according to the standard Unity
development conventions. Be aware that these Unity conventions will supersede the
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).
Additionally, the [Unity Coding package](https://docs.unity3d.com/Packages/com.unity.coding@0.1/manual/index.html)
can be used to format, encode, and lint your code according to the standard Unity
development conventions. Be aware that these Unity conventions will supersede the
Microsoft C# Coding Conventions where applicable.

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

## Contribution review

Once you have a change ready following the above ground rules, simply make a
Once you have a change ready following the above ground rules, simply make a
pull request in GitHub.
26 changes: 13 additions & 13 deletions MessageGeneration.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Message Generation
To work with a ROS message in Unity, you first need to generate the corresponding C# message class. Select the menu option "RosMessageGeneration->Browse..." to open the message browser.
![](images~/MessageBrowser.png)
Select your ROS message folder at the top, then you can navigate through the folder structure to find the .msg files. Click the "Build msg" button to build the messages you want.
# Message importers
For a more automated workflow, you may find it useful to simply drag an entire ROS module folder into your Unity project. Unity will automatically find any .msg and .srv files in the folder structure, and convert them into C# message classes for you. And the classes will be updated if the .msg or .srv files change on disk.
NB: The message generation system looks for a ROS package.xml to determine what code to generate, so if you're working this way it's recommended to import an entire ROS module, rather than individual .msg files, into your Unity project.
# Message Generation

To work with a ROS message in Unity, you first need to generate the corresponding C# message class. Select the menu option "RosMessageGeneration->Browse..." to open the message browser.

![](images~/MessageBrowser.png)

Select your ROS message folder at the top, then you can navigate through the folder structure to find the .msg files. Click the "Build msg" button to build the messages you want.

# Message importers

For a more automated workflow, you may find it useful to simply drag an entire ROS module folder into your Unity project. Unity will automatically find any .msg and .srv files in the folder structure, and convert them into C# message classes for you. And the classes will be updated if the .msg or .srv files change on disk.

NB: The message generation system looks for a ROS package.xml to determine what code to generate, so if you're working this way it's recommended to import an entire ROS module, rather than individual .msg files, into your Unity project.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Installation
1. Using Unity 2020.2 or later, open the package manager from `Window` -> `Package Manager` and select "Add package from git URL..."
1. Using Unity 2020.2 or later, open the package manager from `Window` -> `Package Manager` and select "Add package from git URL..."
![image](https://user-images.githubusercontent.com/29758400/110989310-8ea36180-8326-11eb-8318-f67ee200a23d.png)
2. Enter the following URL. If you don't want to use the latest version, substitute your desired version tag where we've put `v0.3.0` in this example:
`https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector#v0.3.0`
2. Enter the following URL. If you don't want to use the latest version, substitute your desired version tag where we've put `v0.4.0` in this example:
`https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector#v0.4.0`
3. Click `Add`.


## Tutorials
## Tutorials
Scripts used to send [ROS](https://www.ros.org/) messages to an [TCP endpoint](https://github.com/Unity-Technologies/ROS_TCP_Endpoint) running as a ROS node.

This Unity package provides three main features:

- ROSConnection: See the [Unity Robotics Hub](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/master/tutorials/ros_unity_integration/README.md) repository for information and tutorials on how to use this component.
- ROSConnection: See the [Unity Robotics Hub](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/README.md) repository for information and tutorials on how to use this component.

- [Message Generation](MessageGeneration.md)

Expand All @@ -27,16 +27,17 @@ Special thanks to the Siemens [ROS# Project Team]( https://github.com/siemens/ro

## Community and Feedback

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

## Support
For general questions, feedback, or feature requests, connect directly with the
Robotics team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
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.

For feature requests, bugs, or other issues, please file a [GitHub issue](https://github.com/Unity-Technologies/ROS-TCP-Connector/issues) using the provided templates and the Robotics team will investigate as soon as possible.

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

## License
[Apache License 2.0](LICENSE)
Loading