Skip to content

Commit 8ee9d5c

Browse files
LaurieCheers-unitympinolflonoumrpropellersat669
authored
Merge 0.3.0 to main (#90)
* Add ROS# link (#55) * Add ROS# link * Fixing message name that should not take a capital first letter automatically (#47) * Fixing message name that should not take a capital first letter automatically * Adding warning when a message file name starts with a lowercase character * AIRO-331 Code Cleanup and Testing Framework (#57) * Moving package files into package subdirectory * Adding tests and fixing Yamato config. * Adding missing using statement to MessageParser * RosMessageGeneration namespace change (#61) * Amanda/read chunks (#62) * Read message in chunks min * Removing unpredictable DataAvailable check * Configurable byte chun k size * Prevent infinite hang on reading message contents * Wait for frame on data read retry * PR Feedback * Adding prebuilt ObjectRecognition and Octomap messages (#64) * M prefix for all messages (#66) * Topic list service (#72) * Adding install instructions to README Partially addressing issue #71 wherein a user couldn't find up-to-date instructions for installing the connector into a new project. * Updating Contribution Content (#77) * Contributing content commit * Link fix * PR feedback * Adding PR template (#81) * One persistent connection for all messages sent to Unity * Read multiple messages from each connection * Compiles * First thing sent on each new connection is the timeout * Comments! * Stop the connection on leaving play mode * Add a "timeout on idle" config setting so Endpoint doesn't have to send it * IP address check for Unity IP address and ROS IP address (#80) * Add Ip address check * Adding condition for alphaumeric IP address https://man7.org/linux/man-pages/man5/hosts.5.html * Resolve conflicts Resolve the conflicts to merge dev to main * Update package.json (#87) * Update version number in readme, and clean up some weird instructions (#89) Co-authored-by: mpinol <mpinol@users.noreply.github.com> Co-authored-by: flonou <florian.nouviale@inria.fr> Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com> Co-authored-by: Amanda <31416491+at669@users.noreply.github.com> Co-authored-by: vidurvij-Unity <60901103+vidurvij-Unity@users.noreply.github.com> Co-authored-by: peifeng-unity <56408141+peifeng-unity@users.noreply.github.com>
1 parent 2b09bf7 commit 8ee9d5c

File tree

547 files changed

+3445
-2963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

547 files changed

+3445
-2963
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Console logs / stack traces**
21+
Please wrap in [triple backticks (```)](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) to make it easier to read.
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Screenshots**
27+
If applicable, add screenshots or videos to help explain your problem.
28+
29+
**Environment (please complete the following information, where applicable):**
30+
- Unity Version: [e.g. Unity 2020.2.0f1]
31+
- Unity machine OS + version: [e.g. Windows 10]
32+
- ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]
33+
- ROS–Unity communication: [e.g. Docker]
34+
- Branch or version: [e.g. v0.2.0]
35+
36+
**Additional context**
37+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Proposed change(s)
2+
3+
Describe the changes made in this PR.
4+
5+
### Useful links (GitHub issues, JIRA tickets, forum threads, etc.)
6+
7+
Provide any relevant links here.
8+
9+
### Types of change(s)
10+
11+
- [ ] Bug fix
12+
- [ ] New feature
13+
- [ ] Code refactor
14+
- [ ] Documentation update
15+
- [ ] Other (please describe)
16+
17+
## Testing and Verification
18+
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.
20+
21+
### Test Configuration:
22+
- Unity Version: [e.g. Unity 2020.2.0f1]
23+
- Unity machine OS + version: [e.g. Windows 10]
24+
- ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]
25+
- ROS–Unity communication: [e.g. Docker]
26+
27+
## Checklist
28+
- [ ] Ensured this PR is up-to-date with the `dev` branch
29+
- [ ] Created this PR to target the `dev` branch
30+
- [ ] Followed the style guidelines as described in the [Contribution Guidelines](../CONTRIBUTING.md)
31+
- [ ] Added tests that prove my fix is effective or that my feature works
32+
- [ ] Updated the documentation as appropriate
33+
34+
## Other comments

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
71+
version 1.4, available at
72+
https://www.contributor-covenant.org/version/1/4/code-of-conduct/
73+
74+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Contribution Guidelines
2+
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
5+
can be easily integrated.
6+
7+
## Communication
8+
9+
First, please read through our
10+
[code of conduct](CODE_OF_CONDUCT.md),
11+
as we expect all our contributors to follow it.
12+
13+
Second, before starting on a project that you intend to contribute to any of our
14+
Unity Robotics packages or tutorials, we **strongly** recommend posting on the repository's
15+
[Issues page](https://github.com/Unity-Technologies/ROS-TCP-Connector/issues) and
16+
briefly outlining the changes you plan to make. This will enable us to provide
17+
some context that may be helpful for you. This could range from advice and
18+
feedback on how to optimally perform your changes or reasons for not doing it.
19+
20+
## Git Branches
21+
22+
The `main` branch corresponds to the most recent stable version of the project. The `dev` branch
23+
contains changes that are staged to be merged into `main` as the team sees fit.
24+
25+
When contributing to the project, please make sure that your Pull Request (PR)
26+
does the following:
27+
28+
- Is up-to-date with and targets the `dev` branch
29+
- Contains a detailed description of the changes performed
30+
- Has corresponding changes to documentation, unit tests and sample environments (if
31+
applicable)
32+
- Contains a summary of the tests performed to validate your changes
33+
- Links to issue numbers that the PR resolves (if any)
34+
35+
<!-- ## Continuous Integration (CI)
36+
37+
We run continuous integration on all PRs; all tests must be passing before the PR is merged. -->
38+
39+
## Code style
40+
41+
All Python code should follow the [PEP 8 style guidelines](https://pep8.org/).
42+
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
47+
Microsoft C# Coding Conventions where applicable.
48+
49+
Please note that even if the code you are changing does not adhere to these guidelines,
50+
we expect your submissions to follow these conventions.
51+
52+
## Contributor License Agreements
53+
54+
When you open a pull request, you will be asked to acknowledge our Contributor
55+
License Agreement. We allow both individual contributions and contributions made
56+
on behalf of companies. We use an open source tool called CLA assistant. If you
57+
have any questions on our CLA, please
58+
[submit an issue](https://github.com/Unity-Technologies/ROS-TCP-Connector/issues) or
59+
email us at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
60+
61+
## Contribution review
62+
63+
Once you have a change ready following the above ground rules, simply make a
64+
pull request in GitHub.

LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,17 @@
174174
of your accepting any such warranty or additional liability.
175175

176176
END OF TERMS AND CONDITIONS
177+
178+
Copyright 2020 Unity Technologies
179+
180+
Licensed under the Apache License, Version 2.0 (the "License");
181+
you may not use this file except in compliance with the License.
182+
You may obtain a copy of the License at
183+
184+
http://www.apache.org/licenses/LICENSE-2.0
185+
186+
Unless required by applicable law or agreed to in writing, software
187+
distributed under the License is distributed on an "AS IS" BASIS,
188+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189+
See the License for the specific language governing permissions and
190+
limitations under the License.

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# ROS-TCP-Connector
22

3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
5+
## Installation
6+
1. Using Unity 2020.2 or later, open the package manager from `Window` -> `Package Manager` and select "Add package from git URL..."
7+
![image](https://user-images.githubusercontent.com/29758400/110989310-8ea36180-8326-11eb-8318-f67ee200a23d.png)
8+
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:
9+
`https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector#v0.3.0`
10+
3. Click `Add`.
11+
12+
13+
## Tutorials
314
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.
415

516
This Unity package provides three main features:
@@ -14,4 +25,18 @@ This Unity package provides three main features:
1425

1526
Special thanks to the Siemens [ROS# Project Team]( https://github.com/siemens/ros-sharp/wiki/Info_Acknowledgements) for driving the ROS-Unity Integration Open Source since 2017.
1627

17-
This repo is a fork of [ROS#](https://github.com/siemens/ros-sharp) and was a great starting point for our development.
28+
## Community and Feedback
29+
30+
The Unity Robotics projects are open-source and we encourage and welcome contributions.
31+
If you wish to contribute, be sure to review our [contribution guidelines](CONTRIBUTING.md)
32+
and [code of conduct](CODE_OF_CONDUCT.md).
33+
34+
## Support
35+
For general questions, feedback, or feature requests, connect directly with the
36+
Robotics team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
37+
38+
For bugs or other issues, please file a GitHub issue and the Robotics team will
39+
investigate the issue as soon as possible.
40+
41+
## License
42+
[Apache License 2.0](LICENSE)

com.unity.robotics.ros-tcp-connector/Editor/ROSSettingsEditor.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public static void OpenWindow()
1717

1818
GameObject prefabObj;
1919
ROSConnection prefab;
20-
2120
protected virtual void OnGUI()
2221
{
2322
if (prefab == null)
@@ -48,6 +47,15 @@ protected virtual void OnGUI()
4847
new GUIContent("Override Unity IP Address", "If blank, determine IP automatically."),
4948
prefab.overrideUnityIP);
5049
prefab.unityPort = EditorGUILayout.IntField("Unity Port", prefab.unityPort);
50+
if ((prefab.overrideUnityIP != "" && !ROSConnection.IPFormatIsCorrect(prefab.overrideUnityIP)))
51+
{
52+
EditorGUILayout.HelpBox("Unity Override IP invalid", MessageType.Warning);
53+
}
54+
55+
if(!ROSConnection.IPFormatIsCorrect(prefab.rosIPAddress))
56+
{
57+
EditorGUILayout.HelpBox("ROS IP is invalid", MessageType.Warning);
58+
}
5159
EditorGUILayout.Space();
5260
EditorGUILayout.LabelField("If awaiting a service response:", EditorStyles.boldLabel);
5361
prefab.awaitDataMaxRetries = EditorGUILayout.IntField(
@@ -66,6 +74,10 @@ protected virtual void OnGUI()
6674
new GUIContent("Max Read retries",
6775
"While waiting to read a full message, check this many times before giving up."),
6876
prefab.awaitDataReadRetry);
77+
prefab.timeoutOnIdle = EditorGUILayout.FloatField(
78+
new GUIContent("Timeout on idle (seconds)",
79+
"If no messages have been sent for this long, close the connection."),
80+
prefab.timeoutOnIdle);
6981

7082
if (GUI.changed)
7183
{

0 commit comments

Comments
 (0)