Tutorial for cuVGL Localization#

Export TensorRT Engine Files#

Note

This is a one time setup. You can export the engine files for a feature type and then use the same engine files for all the subsequent runs.

OUTPUT_MODEL_DIR="path_to_output_model_dir"

$(ros2 pkg prefix isaac_ros_visual_mapping)/bin/visual_mapping/export_lightglue_engine \
    --worker_config_file $(ros2 pkg prefix --share isaac_ros_visual_mapping)/configs/isaac/matching_task_worker_config.pb.txt \
    --model_dir $(ros2 pkg prefix --share isaac_ros_visual_mapping)/models \
    --output_model_dir $OUTPUT_MODEL_DIR

$(ros2 pkg prefix isaac_ros_visual_mapping)/bin/visual_mapping/export_extractor_engine \
    --configure_file $(ros2 pkg prefix --share isaac_ros_visual_mapping)/configs/isaac/keypoint_creation_config.pb.txt \
    --model_dir $(ros2 pkg prefix --share isaac_ros_visual_mapping)/models \
    --output_model_dir $OUTPUT_MODEL_DIR

Use Global Localization Node in ROS 2#

You can:

  • directly include the visual_global_localization.launch.py in your launch file

  • use the following command to launch the localization node

    ros2 launch visual_global_localization isaac_ros_visual_global_localization_node.launch.py vgl_model_dir:=$OUTPUT_MODEL_DIR
    

See isaac_ros_visual_global_localization to build or install the package.

This launches the localization node with the default parameters. You can change the parameters by modifying the include/visual_global_localization.launch.py file or by passing the parameters as arguments, for details see isaac_ros_visual_global_localization.

Use cuVGL in C++#

The isaac_ros_visual_global_localization ROS 2 package serves as a demonstration for using the cuVGL libraries, see the source code GitHub:

Source code available on GitHub.