Skip to content

Commit c412085

Browse files
LaurieCheers-unitympinolchris15josephvidurvij-Unitymrpropellers
authored
Merge 0.3.0 into main (#86)
* Adding ROS# link (#39) * Adding ROS# link * Fixing Unity 2020.1.8f1 compatability issues. * Adding precompile error if an older version of Unity is used * Fixing spacing * Removing 2020.1 version enforcement * Remove degree to rad conversions (#44) * AIRO-331 Re-organizing package directory and adding Yamato integration (#41) * Moving package into package folder * Adding test project. * Adding boilerplate tests. * Add yamato config * Disabling audio in test project and adding submodule checkout to Yamato cfg * Adding Unity .gitattributes and normalizing line endings. (#42) * Vidur/remove controller limits for free joints (#45) * AIRO - 365 Add feedback while URDF is being imported (#43) * Convert RobotExtensions to an iterator * Adding EditorCorutine to package manifest * Adding import status data * Updating the assembly file. * Adding option to add or remove progressbar * Update git links with tags(#48) * Regenerating meta files for tests copied from ROS-TCP-Connector * Latest VHACD (#49) * Remove the submodule for now, to avoid a packman bug. (#52) * Update version (#53) * VHACD license -> root folder (#55) * VHACD dlls should not be in LFS * update latest version in readme (#58) * Disable RigidbodyEditor controls at runtime Fix for #59 * test.txt * deleting the txt file added by mistake * Adding default values for Articulation Body Parameters (#57) * Adding a default value if mass is zero. * Correct the null value error in Articulation Body attributes * Adding return value of Create function as GameObject * Adding default values variables for damping and friction * Update link branch from master to main. (#66) * Updating Contribution Content (#68) * Contributing content * PR feedback * Adding PR template (#73) * Resolve conflicts (#80) Merge main to dev and resolve all the conflicts * Update package.json (#84) * Fix bad merge * Fix bad merge Co-authored-by: mpinol <mpinol@users.noreply.github.com> Co-authored-by: Christopher Joseph <cjoseph@virtanatech.com> Co-authored-by: Christopher Joseph <38385529+chris15joseph@users.noreply.github.com> Co-authored-by: vidurvij-Unity <60901103+vidurvij-Unity@users.noreply.github.com> Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com> Co-authored-by: Devin Miller <devin.miller@unity3d.com> Co-authored-by: peifeng-unity <56408141+peifeng-unity@users.noreply.github.com> Co-authored-by: Hamid Younesy <hamid.younesy@unity3d.com> Co-authored-by: Amanda <31416491+at669@users.noreply.github.com>
1 parent bbb411e commit c412085

File tree

16 files changed

+280
-65
lines changed

16 files changed

+280
-65
lines changed
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/URDF-Importer/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/URDF-Importer/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: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# URDF Importer
22

3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
35
URDF Importer allows you to import a robot defined in [URDF](http://wiki.ros.org/urdf/XML) format in a Unity scene. URDF defines the geometry, visual meshes, kinematic and dynamic attributes of a Robot. Importer parses a URDF file and imports it into Unity using PhyX 4.0 articulation bodies.
46

57
# Using the Package
@@ -12,7 +14,7 @@ URDF Importer allows you to import a robot defined in [URDF](http://wiki.ros.org
1214

1315
<img src = "images~/Package_manager_add.png">
1416

15-
3. Enter the git URL for the URDF Importer with the latest version tag (currently v0.1.2) `https://github.com/Unity-Technologies/URDF-Importer.git#v0.1.2` in the text box and press `Enter`.
17+
3. Enter the git URL for the URDF Importer with the latest version tag (currently v0.3.0) `https://github.com/Unity-Technologies/URDF-Importer.git?path=/com.unity.robotics.urdf-importer#v0.3.0` in the text box and press `Enter`.
1618

1719
4. Click `Import URDF`.
1820

@@ -33,11 +35,26 @@ URDF Importer allows you to import a robot defined in [URDF](http://wiki.ros.org
3335

3436
# Tutorials
3537

36-
Instructions for using URDF importer can be found [here](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/master/tutorials/urdf_importer/urdf_tutorial.md).
37-
38+
Instructions for using URDF importer can be found [here](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/urdf_importer/urdf_tutorial.md).
3839

3940
## ROS#
4041

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

43-
This repo is a fork of [ROS#](https://github.com/siemens/ros-sharp) and was a great starting point for our development.
44+
This repo is a fork of [ROS#](https://github.com/siemens/ros-sharp) and was a great starting point for our development.
45+
46+
## Community and Feedback
47+
48+
The Unity Robotics projects are open-source and we encourage and welcome contributions.
49+
If you wish to contribute, be sure to review our [contribution guidelines](CONTRIBUTING.md)
50+
and [code of conduct](CODE_OF_CONDUCT.md).
51+
52+
## Support
53+
For general questions, feedback, or feature requests, connect directly with the
54+
Robotics team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
55+
56+
For bugs or other issues, please file a GitHub issue and the Robotics team will
57+
investigate the issue as soon as possible.
58+
59+
## License
60+
[Apache License 2.0](LICENSE)

com.unity.robotics.urdf-importer/Editor/CustomEditors/RigidbodyEditor.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

com.unity.robotics.urdf-importer/Editor/NeedsRuntimeConversion/Extensions/UrdfRobotExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ public static void Create()
4747

4848
#region Import
4949

50-
public static IEnumerator Create(string filename, ImportSettings settings, bool loadStatus = false)
50+
public static IEnumerator<GameObject> Create(string filename, ImportSettings settings, bool loadStatus = false)
5151
{
5252
CreateTag();
5353
importsettings = settings;
5454
Robot robot = new Robot(filename);
55-
5655
settings.totalLinks = robot.links.Count;
5756

5857
if (!UrdfAssetPathHandler.IsValidAssetPath(robot.filename))
@@ -98,6 +97,8 @@ public static IEnumerator Create(string filename, ImportSettings settings, bool
9897

9998
CorrectAxis(robotGameObject);
10099
CreateCollisionExceptions(robot, robotGameObject);
100+
101+
yield return robotGameObject;
101102
}
102103

103104
public static void CorrectAxis(GameObject robot)

com.unity.robotics.urdf-importer/Runtime/UrdfComponents/UrdfInertial.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class UrdfInertial : MonoBehaviour
3434

3535
private const int RoundDigits = 10;
3636
private const float MinInertia = 1e-6f;
37+
private const float minMass = 0.1f;
3738

3839
public static void Create(GameObject linkObject, Link.Inertial inertial = null)
3940
{
@@ -46,7 +47,7 @@ public static void Create(GameObject linkObject, Link.Inertial inertial = null)
4647
#endif
4748
if (inertial != null)
4849
{
49-
robotLink.mass = (float)inertial.mass;
50+
robotLink.mass = ((float)inertial.mass > 0)?((float)inertial.mass):minMass;
5051
if (inertial.origin != null) {
5152

5253
robotLink.centerOfMass = UrdfOrigin.GetPositionFromUrdf(inertial.origin);

0 commit comments

Comments
 (0)