Add Search Path for Lidar Configs


Is there any possibility to add a search path at the beginning of a python script to find a custom lidar config file in my project directory?

Thanks in advance!

Best regards,

Hi @christof.schuetzenhoefer - You can try the following script and let us know if you still face any issues:

You can replace /path/to/your_project_directory with the actual path to your project directory, and replace custom_lidar_config with the name of your LiDAR config file (without the .py extension).

import sys
import os

# Replace 'your_project_directory' with the actual path to your project directory
project_directory = "/path/to/your_project_directory"

# Add the project directory to the sys.path list
sys.path.insert(0, project_directory)

# Now you can import your custom LiDAR config file as a module
# Replace 'custom_lidar_config' with the actual name of your config file (without the .py extension)
import custom_lidar_config

# Use the custom LiDAR config in your script
# ...

Is this working with json files like the config file Example_Rotary? I assume this will only work with python scripts, but the question for me is, how can I use python scripts as lidar configuration files?

In my case, I would like to have multiple json config files for multiple sensors and when I create a new sensor I would like to use just the name of the config file like in RTX Lidar Sensor — Omniverse Robotics documentation.

You can add folders to the app.sensors.nv.lidar.profileBaseFolder setting in the exts/omni.isaac.sensor/config/extension.tomlfile.

The search will use the first config if finds with the name you put in, so don’t have two configs named the same!

See Lidar Config Files

There is no way to set this in python, it must be set in the toml file before isaac sim starts up.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.