RobotecGPULidar icon indicating copy to clipboard operation
RobotecGPULidar copied to clipboard

RobotecGPULidar library cannot be found!

Open alonsollorente opened this issue 1 year ago • 13 comments

Hi everyone, hope you can help me out with this one.

I'm trying to implement RobotecGPULidar in my Unity project alongside with Ros2ForUnity, but I'm facing some issues regarding its installation. I'm working with Unity 2023.2.8f1 in Ubuntu 22.04LTS and with AWSIM scripts for generating LiDAR point clouds.

This are the steps I followed to use the Library:

  1. Install CUDA Toolkit 11.7+.
  2. Download NVidia OptiX 7.2. --> Configured environment variable accordingly.
  3. Install dependencies with command: ./setup.py --install-deps
  4. Execute: ./setup.py --with-ros2-standalone --lib-rpath \$ORIGIN/../../../../Ros2ForUnity/Plugins/Linux/x86_64/
  5. Move the generated libRobotecGpuLidar.so to the RGLUnityPlugin/Plugins/Linux/x86_64/ directory.
  6. Copy-paste the build/lib/ros2_standalone .so files to the Ros2ForUnity/Plugins/Linux/x86_64 directory and skip for duplicates.

After this, I Re-Imported all the assets and I'm getting these errors:

image

I am concerned about #187 issue, stating that we shouldn't source ROS2 while using this plugin in the standalone version, but still I'm having this problem.

I don't really know why Unity stopped recognizing this Library, but maybe you can give me some hints in things to look out that may be useful towards solving this issue, since my experience with dynamic libraries installation is limited.

Thank you, Alonso

alonsollorente avatar Aug 27 '24 15:08 alonsollorente

Hi @alonsollorente

To assist in reproducing your issue, could you please provide the following details:

  • Which version of RobotecGPULidar are you building?
    • Are you using the latest develop branch? If so, please provide the commit hash.
    • Or are you working with a specific release tag?
  • What version of RGLUnityPlugin are you using?

Additionally, you can try to inspect shared object dependencies of libRobotecGPULidar.so and check whether all of them are satisfied. You can do this using the following command:

ldd {YourUnityProject}/Assets/RGLUnityPlugin/Plugins/Linux/x86_64/libRobotecGPULidar.so

msz-rai avatar Aug 28 '24 09:08 msz-rai

Hello @msz-rai I faced the same issue @alonsollorente had and I solved it this way:

(Ubuntu 22.04 - ROS2 Humble)

First of all, I have to clarify that I am working with AWSIM project and I took the libraries from there. And I used the develop branch.

To install the RGLUnityPlugin: -Create RGLUnityPlugin folder and drop libRobotecGPULidar.so from this project -Drag and drop the Ros2ForUnity in the Assets folder and copy-paste the /Ros2ForUnity/Plugins/Linux/x86_64/ .so files in the same directory of the new project. SKIP FOR DUPLICATES (very important) -Don't forget to add at Edit-->Project Settings-->Player-->Other Settings-->Script Compilation--> Scripting Define Symbols the following instances: UNITY_CCU ALOW_AUTHORING ROS2 -Assets-->Reimport All if necessary.

Probably that is not the proper manner to use this library so I would like to know how to install it in a standalone way. I am very interested in the weather extension. I have been trying to use it and see how it works but I receive this message when running:

        if (!IsSnowFeatureAvailable())
        {
            Debug.LogError("Loaded RGL plugin does not include support for Lidar Snow Model, removing component");
            Destroy(this);
            return;
        }

That means that the extension is not installed or can´t be found.

Could you help me to understand how to use the library correctly? Thanks you in advance.

luis-robotic avatar Sep 17 '24 09:09 luis-robotic

I have the same issue, I solved it by following @msz-rai:

  1. ldd {path}/libRobotecGPULidar.so => found some library file .so is not found (libradar_msgs__rosidl_typesupport_cpp.so in my case)
  2. I extracted the corresponding missing .so file from the releases and placed it in the project.

phatli avatar Sep 18 '24 08:09 phatli

Hi @luis-robotic

Thank you for your answer on this topic.

I may not fully understand your specific use case, but if you are working with the AWSIM project, all necessary binaries and dependencies are included within the project, and no further action is required.

However, if you are attempting to integrate the RGLUnityPlugin into your project, you might encounter some challenges (which, of course, can be resolved). The RGLUnityPlugin was developed as part of AWSIM, and we have not tried to separate it for standalone use. Below is some potentially helpful information:

RGLUnityPlugin's dependency on Ros2ForUnity:

The RGLUnityPlugin relies on Ros2ForUnity for two key reasons:

  1. Shared ROS libraries: Both Ros2ForUnity and the RGLUnityPlugin utilize ROS. Since AWSIM is configured to run in a standalone mode (where ROS does not need to be installed on the host machine), all necessary ROS libraries are included within the project. Ros2ForUnity and RGLUnityPlugin share a common set of ROS libraries (e.g., librcl.so). To avoid duplication - since Unity does not support having multiple instances of the same libraries - it was decided to store all ROS binaries within Ros2ForUnity. If your project does not use Ros2ForUnity, the ROS libraries should be placed alongside libRobotecGPULidar.so.

  2. TimeSource class dependency: There is one place of RGLUnityPlugin code that utilizes a class from Ros2ForUnity (TimeSource). If you wish to eliminate this dependency, you will need to modify how time synchronization is handled within your scene.

RGLUnityPlugin's dependency on AWSIM:

The AWSIM asset includes components, prefabs, and models that are tightly integrated with the RGLUnityPlugin. These include:

  • Components for publishing data to ROS (link)
  • Sensor prefabs (link)

When integrating the RGLUnityPlugin into a new project, these elements may also be useful.


Regarding weather extension, it was developed in collaboration with TierIV and is not publicly available. To use this feature, an extended version of the RGL binary is necessary.

msz-rai avatar Sep 18 '24 10:09 msz-rai

Hi @msz-rai , I got exactly the same error on Windows 11. I also check, and RobotecGPULidar.dll file exists on the AWSIM-Labs\Assets\RGLUnityPlugin\Plugins\Windows\x86_64 directory, I also got the following error: UnsatisfiedLinkError: tier4_simulation_msgs__rosidl_typesupport_c.dll

samanipour avatar Jan 13 '25 22:01 samanipour

Hi @samanipour Based on the details you've provided, it seems that this may not be directly related to the RobotecGPULidar library, as it is not linked to tier4_simulation_msgs. This suggests the issue may be related to another component within AWSIM.

msz-rai avatar Jan 15 '25 11:01 msz-rai

Thank you for your answer @msz-rai, But why am I getting RobotecGPULidar.dll not found error while it exists in the corresponding directory?

samanipour avatar Jan 15 '25 11:01 samanipour

@samanipour Most probably, one of the RobotecGPULidar dependency cannot be found, but I don't expect that tier4_simulation_msgs is missing because it is not required by our library.

To find which dependency library is missing on Windows, I recommend using tools such as Dependency Walker. However, before using the tool, you need to configure the PATH environment variable in the same way that AWSIM does on startup (link).

It may also be helpful if you describe how to reproduce your error on Windows.

msz-rai avatar Jan 15 '25 13:01 msz-rai

@msz-rai Thanks for your guidance. just for clarification, I'm using AWSIM-Labs not AWSIM. You could see differences between these two here

How to reproduce the error on Windows

You could reproduce the error on Windows 11 by exactly following the instructions on how to setup AWSIM-Lab as a unity project from its official documention.

To be more price, I'm getting the following error after I run the demo in Unity editor (last step of the instruction): image

samanipour avatar Jan 15 '25 21:01 samanipour

@samanipour I tested the issue and was able to reproduce the error you encountered. After investigating, I discovered that the AWSIM-Labs project does not include the necessary radar_msgs ROS2 libraries required by RobotecGPULidar.

To address this, I copied all the radar_msgs_* library files from the AWSIM main branch into the AWSIM-Labs. Once I did that, the error was resolved on my machine.

msz-rai avatar Jan 17 '25 11:01 msz-rai

@msz-rai Thanks your solution works, the RobotecGPULidar library cannot be found error now resolved, but the following errors still occurs on my machine:

Image

samanipour avatar Jan 17 '25 19:01 samanipour

@samanipour An EntryPointNotFoundException typically indicates a version mismatch between the RGLUnityPlugin and RobotecGPULidar binary. Please ensure you're using the latest version of AWSIM-Labs and that the RobotecGPULidar binary has not been modified. I tested the main branch of AWSIM-Labs, and everything worked correctly on my end (after including radar_msgs_* library files as I suggested on previous answer).

As for the UnsatisfiedLinkError: tier4_simulation_msgs... error, as I mentioned previously, this is unrelated to the RGLUnityPlugin, and unfortunately, we are unable to assist with it.

msz-rai avatar Jan 20 '25 10:01 msz-rai

Hi @msz-rai, Thank you for your response.

I know that the UnsatisfiedLinkError: tier4_simulation_msgs ... is not related to RGLUnityPlugin but mentioning that everything works fine on your machine I assume that corresponding .dll file should exists on your machine. So if you could only check on your systems to see if tier4_simulation_msgs__rosidl_typesupport_c.dll exists on ...\Assets\Ros2ForUnity\Plugins\Windows\x86_64 I will be very appreciated

If you have this .dll file, could you please tell me your system configuration (Windows version, Unity Editor Version and it's associated Visual Studio Build Tools). or just send the corresponding .dll and their meta files to me?

samanipour avatar Jan 23 '25 18:01 samanipour

@samanipour Thank you for your message and sorry for the delayed reply.

As this issue is not directly related to RGL or the RGLUnityPlugin, and due to limited bandwidth on our side, I will not be able to investigate or provide additional support here. I hope you have been able to find a solution in the meantime.

We will close this issue for now. If you encounter an RGL-specific problem in the future, feel free to open a new issue.

msz-rai avatar Jun 30 '25 10:06 msz-rai