Skip to content
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

RobotecGPULidar library cannot be found! #330

Open
alonsollorente opened this issue Aug 27, 2024 · 4 comments
Open

RobotecGPULidar library cannot be found! #330

alonsollorente opened this issue Aug 27, 2024 · 4 comments

Comments

@alonsollorente
Copy link

alonsollorente commented Aug 27, 2024

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

@msz-rai
Copy link
Collaborator

msz-rai commented Aug 28, 2024

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

@luis-robotic
Copy link

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.

@phatli
Copy link

phatli commented Sep 18, 2024

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.

@msz-rai
Copy link
Collaborator

msz-rai commented Sep 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@phatli @msz-rai @alonsollorente @luis-robotic and others