-
Notifications
You must be signed in to change notification settings - Fork 71
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
[AIRO-589] Model and collision rotation mismatch #78
Conversation
@@ -241,7 +241,10 @@ public static void CorrectAxis(GameObject robot) | |||
|
|||
foreach (UrdfCollision collision in collisionMeshList) | |||
{ | |||
collision.transform.localRotation = collision.transform.localRotation * correction; | |||
if (robotScript.choosenAxis != ImportSettings.axisType.zAxis) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is robotScript
guarranteed to be not null or do we need a null check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! This is a public class so we probably need to have the null check. Just updated and added the null check to the beginning of the method.
* 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>
* 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>
correct collider rotation only for y-axis and add null check
Z-axis doesn't need to correct the rotation of colliders. Tested with a few robots: iRobot, vacuum cleaner, Kuka, and husky.