Open FabianEP11 opened 1 month ago
The URDF importer needs to compile for whichever build target you have set (In my case, I use Android).
First, move the URDF importer package from the CachedPackage folder to the asset package folder:
When the package is moved, let it recompile and find the package in the editor. Project -> Packages -> URDF Importer -> Runtime -> Unity.Robotics.URDFImporter -> (In the inspector) Click with platform you are compiling to -> Apply.
Hey, Yeah, previously I was able to build the app for a HoloLens device by manually adding "WSA" to the "includePlatforms" in the "Library\PackageCache\com.unity.robotics.urdf-importer@90f353e435\Runtime\Unity.Robotics.URDFImporter.asmdef" file. I guess that the inspector checkbox changes the same file.
Thanks!
Further more, Im not sure if this is for all build platforms, but is for Android.
An exception named 'Packages/com.unity.robotics.urdf-importer/Runtime/UnityMeshImporter/Plugins/AssimpNet/Native/win/x86/assimp.dll' (Key: assimp.dll;None) since plugin with the same name and architecture was already added ('Packages/com.unity.robotics.urdf-importer/Runtime/UnityMeshImporter/Plugins/AssimpNet/Native/win/x86_64/assimp.dll (Architecture: None)')
fails the build.
Here is the solution to that issue
Note that you do not have to remove the files, and can just check "Android" as an excluded build platform for the assimp
I have a Unity project with the URDF-Importer plugin (v0.5.2), and I need to get the name of the joints from code like this:
string joint_name = articulationBody.gameObject.GetComponent<UrdfJointRevolute>().jointName;
which usesusing Unity.Robotics.UrdfImporter
.When I run the app in the Editor everything works fine, but when I build the app, it fails because it cannot fine the namespace:
The type or namespace name 'UrdfImporter' does not exist in the namespace 'Unity.Robotics' (are you missing an assembly reference?)
I also tried adding the entire namespace to the GetComponent type like:
string joint_name = articulationBody.gameObject.GetComponent<Unity.Robotics.UrdfImporter.UrdfJointRevolute>().jointName;
but it is the sameIs the
using Unity.Robotics.UrdfImporter
just available on the Editor? or how can I fix that?