Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unit tests for UrdfJoint #100

Merged
merged 17 commits into from
May 20, 2021
Merged

add unit tests for UrdfJoint #100

merged 17 commits into from
May 20, 2021

Conversation

peifeng-unity
Copy link
Contributor

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: add unit tests

Testing and Verification

Yamato pipeline

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

Other comments

sdiao
sdiao previously approved these changes May 19, 2021
sdiao
sdiao previously approved these changes May 19, 2021
sdiao
sdiao previously approved these changes May 19, 2021
Comment on lines 14 to 15
public static RosSharp.Urdf.Joint.Axis AxisData(Vector3 axis) => GetAxisData(axis);
public void Dynamics(RosSharp.Urdf.Joint.Dynamics dynamics) => SetDynamics(dynamics);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to add a using RosSharp.Urdf.Joint to the includes above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that RosSharp.Urdf.Joint is not a namespace and the Dynamics is an inner class of the Joint class. It has to be explicit here is due to the naming conflicts of UnityEngine.Joint and RosSharp.Urdf.Joint

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then unless both are being used in this file, you should have using RosSharp.Urdf.Joint as Joint at the top.

at669
at669 previously approved these changes May 19, 2021
Copy link
Contributor

@mrpropellers mrpropellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one dangling code convention nit and everything else looks good!

@peifeng-unity peifeng-unity merged commit 30d259a into dev May 20, 2021
@peifeng-unity peifeng-unity deleted the peifeng/add-joint-test-1 branch May 20, 2021 18:38
sdiao added a commit that referenced this pull request Jun 1, 2021
* 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

* support for runtime urdf importing (#67)

* moved "NeedsRuntimeConversion" to Runtime and adjusted namespace

* moved MeshProcessing and AssetHandler to Runtime

* move all editor only calls to RuntimeURDF.cs

* fixed compile issues: builds in runtime, but does nothing

* URDF can now be imported in runtime (STL only)

* cleanup: moved files into corresponding runtime directories.

* Added UnityMeshImporter and AssimpNet plugin

* Loading collada files in runtime (using AssimpNet plugin).

* Proper creation of materials for HDRP/Standard when loading collada files

* disable Assimpnet for IL2CPP builds

* added parameter to URDFRobotExtensions.Create() to allow the option of using the runtime import mode in editor.

* cleaning up material extensions

* disable controller component during import to avoid incorrect configuration.

* fix for the default diffuse material in HDRP

* minor clean up and code convention fixes

* added support for .obj visual meshes

* don't enable the controller automatically in runtime mode.

* variable name typo fix

* Broke the Create() function into pipeline stages to reuse the code for both the none-blocking coroutine and blocking function call.

* Added RuntimeURDFImporter component as an example usage of runtime import functionality

* fix the bug with editor dialogs

* random code formatting fixes

* Moved and renamed the Transform extension function FindChildByQuery

* fixed materials for URP projects.

* removed unused code.

* minor code formatting

* removed unused code

* URDF imported objects lose mesh colliders when made into prefabs (#72)

* Saving decomposed mesh

* checks to make the newly added vhacd mesh creation be compatible with the runtime mode.

* minor code formatting

Co-authored-by: Hamid Younesy <hamid.younesy@unity3d.com>

* removing lfs as causes issues with the plugin dlls

* deleting plugin to add it back without lfs

* adding back AssimpNet libraries without lfs

* deleting vhacd library to add it back without lfs

* adding back VHACD libraries without lfs

* Fixed the overexposed highlight color

Co-authored-by: vidurvij-Unity <60901103+vidurvij-Unity@users.noreply.github.com>

* Hamid/fix bad merge (#87)

* 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: 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>

* removing unused meta file

Co-authored-by: LaurieCheers-unity <73140792+LaurieCheers-unity@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: Amanda <31416491+at669@users.noreply.github.com>

* [AIRO-589] Model and collision rotation mismatch (#78)

correct collider rotation only for y-axis and add null check

* Replace ../ with package://, throw more warnings otherwise (#90)

* Replace ../ with package://, throw more warnings otherwise

* PR feedback: more descriptive warning message

* add changelog (#92)

add changelog

* Save assets for generated cylinder meshes (#91)

* Initial GeneratedMeshes directory commit

* Cylinder mesh saving

* PR feedback: new cylinder method, Unity decomposer support

* PR feedback: non-VHACD cylinder, unit tests

* PR feedback: unit test conventions

* Forum links to README, config.yml (#96)

* Add test coverage (#93)

* Math, VHACD Unit Tests (#94)

* Math, VHACD tests

* Organization for Math, VHACD

* Vector3 fixes

* fix the bash numeric error (#99)

* RuntimeURDF tests (#97)

* RuntimeURDF tests, skippping dialogs

* PR feedback: removing unused blocks

* Geometry, GeometryCollision Tests (#95)

* UrdfGeometry tests

* Folder organization

* PR feedback: test fixes, Yamato config

* Added sample STL for Geometry tests

* UrdfCollisionExtensions, UrdfCollisionsExtensions Tests (#98)

* UrdfCollisionExtensions tests

* UrdfCollisionsExtensions tests

* Destroy objects, naming conventions

* UrdfCollision(s) minor cleanup, reorganization

* Fixing line coverage typo

* Cleaning up Geometry tests, fixes to Collisions tests

* Remove class member

* add unit tests for UrdfJoint (#100)

* BuiltInExtensions Tests (#103)

* BuiltInExtensions Tests

* Removed debug logs

* PR feedback: internal BuiltIn class

* Add unit tests for UrdfJoints (#102)

* UrdfAssetPathHandler Tests (#104)

* UrdfAssetPathHandler Tests

* UrdfAssetPathHandler test cleanup

* PR feedback

* update version to 0.4.0 (#109)

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: LaurieCheers-unity <73140792+LaurieCheers-unity@users.noreply.github.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>
Co-authored-by: Hamid Younesy <hyounesy@users.noreply.github.com>
sdiao added a commit that referenced this pull request Jun 1, 2021
* 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

* support for runtime urdf importing (#67)

* moved "NeedsRuntimeConversion" to Runtime and adjusted namespace

* moved MeshProcessing and AssetHandler to Runtime

* move all editor only calls to RuntimeURDF.cs

* fixed compile issues: builds in runtime, but does nothing

* URDF can now be imported in runtime (STL only)

* cleanup: moved files into corresponding runtime directories.

* Added UnityMeshImporter and AssimpNet plugin

* Loading collada files in runtime (using AssimpNet plugin).

* Proper creation of materials for HDRP/Standard when loading collada files

* disable Assimpnet for IL2CPP builds

* added parameter to URDFRobotExtensions.Create() to allow the option of using the runtime import mode in editor.

* cleaning up material extensions

* disable controller component during import to avoid incorrect configuration.

* fix for the default diffuse material in HDRP

* minor clean up and code convention fixes

* added support for .obj visual meshes

* don't enable the controller automatically in runtime mode.

* variable name typo fix

* Broke the Create() function into pipeline stages to reuse the code for both the none-blocking coroutine and blocking function call.

* Added RuntimeURDFImporter component as an example usage of runtime import functionality

* fix the bug with editor dialogs

* random code formatting fixes

* Moved and renamed the Transform extension function FindChildByQuery

* fixed materials for URP projects.

* removed unused code.

* minor code formatting

* removed unused code

* URDF imported objects lose mesh colliders when made into prefabs (#72)

* Saving decomposed mesh

* checks to make the newly added vhacd mesh creation be compatible with the runtime mode.

* minor code formatting

Co-authored-by: Hamid Younesy <hamid.younesy@unity3d.com>

* removing lfs as causes issues with the plugin dlls

* deleting plugin to add it back without lfs

* adding back AssimpNet libraries without lfs

* deleting vhacd library to add it back without lfs

* adding back VHACD libraries without lfs

* Fixed the overexposed highlight color

Co-authored-by: vidurvij-Unity <60901103+vidurvij-Unity@users.noreply.github.com>

* Hamid/fix bad merge (#87)

* 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: 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>

* removing unused meta file

Co-authored-by: LaurieCheers-unity <73140792+LaurieCheers-unity@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: Amanda <31416491+at669@users.noreply.github.com>

* [AIRO-589] Model and collision rotation mismatch (#78)

correct collider rotation only for y-axis and add null check

* Replace ../ with package://, throw more warnings otherwise (#90)

* Replace ../ with package://, throw more warnings otherwise

* PR feedback: more descriptive warning message

* add changelog (#92)

add changelog

* Save assets for generated cylinder meshes (#91)

* Initial GeneratedMeshes directory commit

* Cylinder mesh saving

* PR feedback: new cylinder method, Unity decomposer support

* PR feedback: non-VHACD cylinder, unit tests

* PR feedback: unit test conventions

* Forum links to README, config.yml (#96)

* Add test coverage (#93)

* Math, VHACD Unit Tests (#94)

* Math, VHACD tests

* Organization for Math, VHACD

* Vector3 fixes

* fix the bash numeric error (#99)

* RuntimeURDF tests (#97)

* RuntimeURDF tests, skippping dialogs

* PR feedback: removing unused blocks

* Geometry, GeometryCollision Tests (#95)

* UrdfGeometry tests

* Folder organization

* PR feedback: test fixes, Yamato config

* Added sample STL for Geometry tests

* UrdfCollisionExtensions, UrdfCollisionsExtensions Tests (#98)

* UrdfCollisionExtensions tests

* UrdfCollisionsExtensions tests

* Destroy objects, naming conventions

* UrdfCollision(s) minor cleanup, reorganization

* Fixing line coverage typo

* Cleaning up Geometry tests, fixes to Collisions tests

* Remove class member

* add unit tests for UrdfJoint (#100)

* BuiltInExtensions Tests (#103)

* BuiltInExtensions Tests

* Removed debug logs

* PR feedback: internal BuiltIn class

* Add unit tests for UrdfJoints (#102)

* UrdfAssetPathHandler Tests (#104)

* UrdfAssetPathHandler Tests

* UrdfAssetPathHandler test cleanup

* PR feedback

* update version to 0.4.0 (#109)

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: LaurieCheers-unity <73140792+LaurieCheers-unity@users.noreply.github.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>
Co-authored-by: Hamid Younesy <hyounesy@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: LaurieCheers-unity <73140792+LaurieCheers-unity@users.noreply.github.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>
Co-authored-by: Hamid Younesy <hyounesy@users.noreply.github.com>
peifeng-unity added a commit that referenced this pull request Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants