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

Feature Request: Add Gaussian Noise #29

Open
camilleconcepcion3012 opened this issue Feb 1, 2024 · 6 comments
Open

Feature Request: Add Gaussian Noise #29

camilleconcepcion3012 opened this issue Feb 1, 2024 · 6 comments

Comments

@camilleconcepcion3012
Copy link

Hi sir, is it possible to add a gaussian noise feature to this plugin? I am using this plugin for a project and wanted to add gaussian noise to the point cloud data. I did some reseacrh and found that there is an API call within the RobotecGPULidar github that generates a node to add gaussian noise to the point cloud data. I have tried to integrate the feature to the plugin by upgrading the core.h file to v0.13.1. However, I ran into the issue where the library libRobotecGPULidar.so provided clashes with the upgraded core.h file, presumably due to in being from v0.11.3. I was wondering if there is an updated version of the libRobotecGPULidar.so for v0.13.1. Thanks in advance.

@PawelLiberadzki
Copy link

Hi @camilleconcepcion3012, I am not sure what was exactly the process in your case - can you maybe elaborate? Binaries in releases are the newest that we support. We did not prepare or publish more up-to-date version.

However, if you are really willing to put some work into it, your goal should be possible to achieve. You have to build this plugin from source following this paragraph. Before building you have to update RGL_VERSION (for binary) and RGL_COMMIT (for core.h) here. For v0.13.1 it should be:
set(RGL_VERSION "0.13.1")
set(RGL_COMMIT "9786a9689ee0c84208753b98ee35f2c7ddb67d24")

This should give you access to v0.13.1 RGL API calls. Then, you should create gaussian noise node here and connect it to RGL graph here. You can find more information about this node here. RGL API rather did not change much or at all between v0.11.3 and v0.13.1 - if you will have any problems, you will have to update RGL native calls probably mostly in this file.

Best regards!

@camilleconcepcion3012
Copy link
Author

camilleconcepcion3012 commented Feb 2, 2024

Hi @PawelLiberadzki, thanks for the response!

My process is quite similar to the one you have suggested. I defined the gaussian noise node in the RGLServerInstance.hh via this code:
image

After which, I created the gaussian noise node and connected it to the RGL graph as shown in the code below(for now using hard-coded values):
image

Then, I updated the RGL_VERSION and RGL_COMMIT to 'v0.13.1' and '9786a9689ee0c84208753b98ee35f2c7ddb67d24' and proceeded to build the plugin and copied the updated binaries to my ign_gazebo_6 plugin directory. However, when running the sonoma test world, it resulted in the following error:
image

Further troubleshooting, I discovered that the dowloaded binaries for the libRobotecGPULidar.so are empty:
image

Could you please advise as to how I can solve this issue?

@msz-rai
Copy link
Contributor

msz-rai commented Feb 2, 2024

Hi @camilleconcepcion3012
We have missed that since v0.12.0, RGL binaries are packed into zip files. Sorry for that.

You have two options:

  1. Download the zip file (link) to the RGLServerPlugin/include/rgl and extract it manually.
  2. Modify CMakeLists to make it done automatically. We have already implemented a similar solution in the other of our plugins (link). I think this may be helpful.

It's also worth knowing that RGL binaries for our releases are built with all available extensions. For instance, with v0.12.0 there was a new extension added (ROS2), so to run RGL binary from the release v0.12.0+ you have to provide ROS2 libraries. You can do this in two ways:

  1. Install ROS2 Humble on your machine and source it before running the simulation.
  2. Copy all libraries from the zip file downloaded from the release into the same location as libRobotecGPULidar.so. The zip file contains all of the dependent libraries (mostly ROS2 libraries) required for RGL.

Alternatively, you can build RGL yourself from source without ROS2 extension. Instructions can be found in the RGL README.

Best regards!

@camilleconcepcion3012
Copy link
Author

camilleconcepcion3012 commented Feb 28, 2024

Hi @msz-rai @PawelLiberadzki
I followed your 2nd method and copied all the libraries and RGL binaries to the same location. However, when building the plugin, I encountered a new error:

Screenshot from 2024-02-28 08-59-47

I believe this is due to my environment being on Ubuntu 20.04. For project-specific reasons, I am unable to update to Ubuntu 22.04 and thus trying the alternative method which is to build RGL from source on my current environment. I have followed the steps in the RGL README but I am facing this error when building:

image

Could you please advise as to how I can solve this issue?
Environment

  • Ubuntu: 20.04
  • Nvidia Optix: 7.2
  • Nvidia Driver: 525
  • CUDA: V11.8.89
  • Cmake: 3.28

@msz-rai
Copy link
Contributor

msz-rai commented Feb 29, 2024

@camilleconcepcion3012

I followed your 2nd method and copied all the libraries and RGL binaries to the same location. However, when building the plugin, I encountered a new error (...). I believe this is due to my environment being on Ubuntu 20.04

You are correct. The released RGL binaries are built with ROS2 Humble so it is supposed to be used on Ubuntu22.

I have followed the steps in the RGL README but I am facing this error when building:

We are not supporting RGL on Ubuntu20 actively, so we cannot ensure proper work on it. However, the error message you got is related to one of our internal tools. You can try to build RGL without those tools with the following command:

./setup.py --cmake="-DRGL_BUILD_TOOLS=OFF"

I hope it will solve your issue.

Best regards!

@msz-rai
Copy link
Contributor

msz-rai commented Aug 20, 2024

@camilleconcepcion3012

Good news: the Plugin has been updated to the newer RGL version (0.17.0). This makes the Gaussian noise feature should be added without requiring any custom RGL builds on your side. If you haven't resolved your issue yet, the latest changes to the Plugin might help you move forward.

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

3 participants