IntelligentRoboticsLabs / ARViz

ARViz Project
57 stars 10 forks source link

`System.DllNotFoundException´ in rcldotnet_common.dll #1

Closed MischaRo closed 5 years ago

MischaRo commented 5 years ago

Hi @dvargasfr I tried out your Unity solution, but unfortunately it did not work for me.

I Used Unity 2018.2.91f, the ros2-dotnet-uwp-x84 prebuild release from ros2_dotnet (https://github.com/esteve/ros2_dotnet/releases), and the Hololens Emulator to test it.

I encountered a deviation from the instruction when I tried to add the reference to the rcldotnet_assemblies.dll, rcldotnet_common.dll and the std_msgs_assemblies.dll. I got an error message telling me that the references cant be included, because they already exist.

reference exists

After starting the Hololens Emulator, the application was terminated due to an System.DllNotFoundException in rcldotnet_common.dll rlsdotnet not found

I tried adding thercldotnet_assemblies.dll, rcldotnet_common.dll and the std_msgs_assemblies.dll to the project as well but that did not change anything

dvargasfr commented 5 years ago

the ros2-dotnet-uwp-x84 prebuild release from ros2_dotnet

x86 or x64? I hope you mean x86 :)

I got an error message telling me that the references cant be included, because they already exist.

Ok, these references already exist on the VS solution generated from Unity, but they are referencing files from an Unprocessed folder. Just after including rcldotnet_assemblies.dll, rcldotnet_common.dll and std_msgs_assemblies.dll check if the references still point to Unprocessedfiles or are updated to the new DLLs added. If not updated, remove those three references and add them again.

MischaRo commented 5 years ago

x86 or x64? I hope you mean x86 :)

Yeah sorry, my bad, I ment x86 :)

Alright, so I got a little farther, but the problems are still not completely solved. This is the script, that I attached to a Game Object in Unity:

using UnityEngine;
using ROS2;
public class Ros2Test : MonoBehaviour

{
    string[] args;
    void Start()
    {
        //RCLDotnetTalker.Main(args);
        RCLdotnet.Init();
        INode node = RCLdotnet.CreateNode("listener");
        RCLdotnet.Spin(node);
    }
}

Just as basic as possible… When I run the Hololens Emulator, the application starts, but it still gives me an System.DllNotFoundException in rcldotnet_common.dll exception

rlsdotnet not found2

Since there seems to be an UnsatisfiedLinkError, does that mean that there are some dlls missing?

esteve commented 5 years ago

@MischaRo could you open this ticket on the ros2_dotnet repo, it'll be easier for me to help you out there other users, but also to have it as a reference in case someone else has the same problem.

@dvargasfr please don't package your ros2_dotnet workspace and call it a release, it's really confusing and misleading for everyone who wants to use ros2_dotnet