Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
214 stars 71 forks source link

UWP Built fresh project doesn't work (VS project unloaded), and duplicate assimp.dll #213

Open sergiosolorzano opened 1 year ago

sergiosolorzano commented 1 year ago

Describe the bug A fresh Unity project with imported URDF package builds an sln does throws errors and can't be used to deploy in Hololens 2.

After building in Unity, I open the .sln project but the UWP project says unloaded)

image

The only error shown in VS2022 v17.4.3 C:\Temp\testproject\Build-Dev\testproject\testproject.vcxproj : error : Cannot load project with duplicated project items: C:\Temp\testproject\Build-Dev\testproject\assimp.dll is included as 'None' and as 'None' item types.

To Reproduce Steps to reproduce the behavior:

  1. Create new fresh Unity project Unity 2021.3.15 (all tested versions outlined below) switch to URP, set .NET Framework api compatibility
  2. Add ROS TCP Connector and URDF importer packages from url.
  3. Build for release, add scene, open visual studio .sln project, the UWP project can't be deployed, VS says project unloaded and VS shows error . VS2022 17.4.3
  4. image
image

Only 1 error shown in VS output window: C:\Temp\testproject\Build-Dev\testproject\testproject.vcxproj : error : Cannot load project with duplicated project items: C:\Temp\testproject\Build-Dev\testproject\assimp.dll is included as 'None' and as 'None' item types.

  1. Move URDF importer into assets/packages as suggested here leads to same error result. After moving the folder I also made sure Unity-Robotics-Hub\tutorials\pick_and_place\PickAndPlaceProject\Library\PackageCache\com.unity.robotics.ros-tcp-connector@c27f00c6cf\Runtime\Unity.Robotics.ROSTCPConnector.asmdef includes Platform UWP

  2. Moving also ROS TCP Connector package as in 5 above also continues to show same error in VS. After moving the folder I also changed Unity-Robotics-Hub\tutorials\pick_and_place\PickAndPlaceProject\Packages\com.unity.robotics.urdf-importer@90f353e435\Runtime\Unity.Robotics.URDFImporter.asmdef to include Platform UWP

  3. Also tried Regenerate Project files but has the same error:

image
  1. I also tried selecting Editor and UWP, but also only UWP in asimpNet.dll as per this suggestion but the same error happens.
image

I had also tried deleting the Library, vcxproj but didn't make any difference to the error result.

Console logs / stack traces The only error shown in VS is as shown above. Unity does not show any errors when building.

Expected behavior VS sln opens so we can deploy to Hololens 2.

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

Environment (please complete the following information, where applicable):

Additional context Can't use this package for UWP builds for Hololens 2. Bug also posted at UnityRobotics Hub

HVLrobotics commented 1 year ago

We are facing a similar problem, did you solve it @sergiosolorzano ?

sergiosolorzano commented 1 year ago

Hey @HVLrobotics unfortunately not.

I tried as suggested by Unity's Tautvydas-Zilys but I couldn't get it to work.

I think Tautvydas is right: "The real issue is that it seems that this package for whatever reason doesn't have support for all runtime platforms. I don't know why that is, unfortunately. It's either that this DLL was never meant to be used at runtime and was only supposed to be used in the editor (in which case its plugin settings need to be fixed), or the package is still in its infancy and they haven't gotten to making it work on all platforms. We'll have to wait for folks maintaining the package to respond :) (which is likely to not happen until the new year)."

Unity's URDF-Importer or Unity-Robotics-Hub teams didn't respond :(

Sorry I could not be of more help. If you figure it out I'd much appreciate you drop a hint here or at the Unity forum thread I posted.

Good luck, Sergio

bv-radiusmedia commented 3 weeks ago

Any update on this guys @sergiosolorzano or @HVLrobotics?

sergiosolorzano commented 3 weeks ago

Hi there @bv-radiusmedia no sorry to say, I moved on as I couldnt solve it nor got support on requests