Skip to content

Commit

Permalink
Merge 0.3.0 into main (#86)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
10 people committed Apr 21, 2021
1 parent bbb411e commit c412085
Show file tree
Hide file tree
Showing 16 changed files with 280 additions and 65 deletions.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Console logs / stack traces**
Please wrap in [triple backticks (```)](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) to make it easier to read.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots or videos to help explain your problem.

**Environment (please complete the following information, where applicable):**
- Unity Version: [e.g. Unity 2020.2.0f1]
- Unity machine OS + version: [e.g. Windows 10]
- ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]
- ROS–Unity communication: [e.g. Docker]
- Branch or version: [e.g. v0.2.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Proposed change(s)

Describe the changes made in this PR.

### Useful links (GitHub issues, JIRA tickets, forum threads, etc.)

Provide any relevant links here.

### Types of change(s)

- [ ] Bug fix
- [ ] New feature
- [ ] Code refactor
- [ ] Documentation update
- [ ] Other (please describe)

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

### Test Configuration:
- Unity Version: [e.g. Unity 2020.2.0f1]
- Unity machine OS + version: [e.g. Windows 10]
- ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]
- ROS–Unity communication: [e.g. Docker]

## 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)
- [ ] Added tests that prove my fix is effective or that my feature works
- [ ] Updated the documentation as appropriate

## Other comments
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct/

[homepage]: https://www.contributor-covenant.org
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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
can be easily integrated.

## Communication

First, please read through our
[code of conduct](CODE_OF_CONDUCT.md),
as we expect all our contributors to follow it.

Second, before starting on a project that you intend to contribute to any of our
Unity Robotics packages or tutorials, we **strongly** recommend posting on the repository's
[Issues page](https://github.com/Unity-Technologies/URDF-Importer/issues) and
briefly outlining the changes you plan to make. This will enable us to provide
some context that may be helpful for you. This could range from advice and
feedback on how to optimally perform your changes or reasons for not doing it.

## Git Branches

The `main` branch corresponds to the most recent stable version of the project. The `dev` branch
contains changes that are staged to be merged into `main` as the team sees fit.

When contributing to the project, please make sure that your Pull Request (PR)
does the following:

- Is up-to-date with and targets the `dev` branch
- Contains a detailed description of the changes performed
- Has corresponding changes to documentation, unit tests and sample environments (if
applicable)
- Contains a summary of the tests performed to validate your changes
- Links to issue numbers that the PR resolves (if any)

<!-- ## Continuous Integration (CI)
We run continuous integration on all PRs; all tests must be passing before the PR is merged. -->

## Code style

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
Microsoft C# Coding Conventions where applicable.

Please note that even if the code you are changing does not adhere to these guidelines,
we expect your submissions to follow these conventions.

## Contributor License Agreements

When you open a pull request, you will be asked to acknowledge our Contributor
License Agreement. We allow both individual contributions and contributions made
on behalf of companies. We use an open source tool called CLA assistant. If you
have any questions on our CLA, please
[submit an issue](https://github.com/Unity-Technologies/URDF-Importer/issues) or
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
pull request in GitHub.
14 changes: 14 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,17 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

Copyright 2020 Unity Technologies

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.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# URDF Importer

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

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.

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

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

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

4. Click `Import URDF`.

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

# Tutorials

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

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

## ROS#

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.

This repo is a fork of [ROS#](https://github.com/siemens/ros-sharp) and was a great starting point for our development.
This repo is a fork of [ROS#](https://github.com/siemens/ros-sharp) and was a great starting point for our development.

## 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)
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 bugs or other issues, please file a GitHub issue and the Robotics team will
investigate the issue as soon as possible.

## License
[Apache License 2.0](LICENSE)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ public static void Create()

#region Import

public static IEnumerator Create(string filename, ImportSettings settings, bool loadStatus = false)
public static IEnumerator<GameObject> Create(string filename, ImportSettings settings, bool loadStatus = false)
{
CreateTag();
importsettings = settings;
Robot robot = new Robot(filename);

settings.totalLinks = robot.links.Count;

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

CorrectAxis(robotGameObject);
CreateCollisionExceptions(robot, robotGameObject);

yield return robotGameObject;
}

public static void CorrectAxis(GameObject robot)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class UrdfInertial : MonoBehaviour

private const int RoundDigits = 10;
private const float MinInertia = 1e-6f;
private const float minMass = 0.1f;

public static void Create(GameObject linkObject, Link.Inertial inertial = null)
{
Expand All @@ -46,7 +47,7 @@ public static void Create(GameObject linkObject, Link.Inertial inertial = null)
#endif
if (inertial != null)
{
robotLink.mass = (float)inertial.mass;
robotLink.mass = ((float)inertial.mass > 0)?((float)inertial.mass):minMass;
if (inertial.origin != null) {

robotLink.centerOfMass = UrdfOrigin.GetPositionFromUrdf(inertial.origin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public enum JointTypes
protected const int RoundDigits = 6;
protected const float Tolerance = 0.0000001f;

protected int defaultDamping = 0;
protected int defaultFriction = 0;

public static void Create(GameObject linkObject, JointTypes jointType, Joint joint = null)
{
#if UNITY_2020_1_OR_NEWER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ protected override void ImportJointData(Joint joint)

if (joint.dynamics != null)
{
unityJoint.angularDamping = (float)joint.dynamics.damping;
unityJoint.jointFriction = (float)joint.dynamics.friction;
unityJoint.angularDamping = (double.IsNaN(joint.dynamics.damping)) ? defaultDamping : (float)joint.dynamics.damping;
unityJoint.jointFriction = (double.IsNaN(joint.dynamics.friction)) ? defaultFriction : (float)joint.dynamics.friction;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static UrdfJoint Create(GameObject linkObject)
{
UrdfJointFixed urdfJoint = linkObject.AddComponent<UrdfJointFixed>();
#if UNITY_2020_1_OR_NEWER
urdfJoint.unityJoint = linkObject.AddComponent<ArticulationBody>();
urdfJoint.unityJoint = linkObject.GetComponent<ArticulationBody>();
#else
urdfJoint.UnityJoint = linkObject.AddComponent<FixedJoint>();
urdfJoint.UnityJoint.autoConfigureConnectedAnchor = true;
Expand Down
Loading

0 comments on commit c412085

Please sign in to comment.