# Lidarview-odom-slam integration

**URL:** https://discourse.paraview.org/t/lidarview-odom-slam-integration/17292
**Category:** LidarView, Lidar, and SLAM
**Created:** [November 5, 2025, 7:26am UTC](https://discourse.paraview.org/t/lidarview-odom-slam-integration/17292 "2025-11-05T07:26:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![white\_11](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@white\_11](https://discourse.paraview.org/u/white_11)
#### Post date: [November 5, 2025, 7:26am UTC](https://discourse.paraview.org/t/lidarview-odom-slam-integration/17292/1 "2025-11-05T07:26:04Z")

</div>

I’m working on extending **LidarView** to integrate live **external odometry data** from my robot into the **SLAM (Online)** pipeline.  
The goal is to let the SLAM algorithm fuse both **LiDAR point cloud** and **odometry** information for improved mapping accuracy and trajectory stability.

What I’m trying to achieve  
I have a **custom LiDAR plugin** that publishes `PointCloud2` data in real time.  
Separately, I also have **odometry data** (from wheel encoders) available as ROS 2 messages.

I would like the **SLAM (Online)** module in LidarView to use this odometry as a **motion prior / initial pose estimate** during scan matching — effectively improving SLAM convergence and reducing drift.

What I have implemented  
I’ve created a custom class derived from `vtkPacketInterpreter` that handles LiDAR data and also initializes a ROS 2 node.  
Inside this interpreter, I’ve implemented a function:

”_void vtkCustomPacketInterpreter::SetManualSlamConnect(bool enable);_”

This function sets up the communication between my odometry publisher and the SLAM pipeline.

Now, I would like this function to be called automatically when the user selects **“SLAM (Online)”** from the LidarView GUI.

I found the corresponding XML proxy definition:

and I’m considering either:

1. Calling `SetManualSlamConnect()` inside the `vtkSlam` constructor, or

2. Adding this to the XML:

3. so that the method is triggered when the SLAM filter is instantiated.

### Expected outcome

Once integrated, I expect the SLAM trajectory in LidarView to become smoother and more stable, particularly during slow rotations or when re-localizing after loop closure, since odometry will provide a reliable motion prior alongside the point cloud data.  
Environment

- LidarView built from source (Superbuild)

- Custom plugin derived from `vtkPacketInterpreter`

- ROS 2 Humble

- External odometry published as `nav_msgs/Odometry`

---

<div class="post-metadata">

### Author: ![Tong\_Fu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tong_fu/32/13154_2.png) [@Tong\_Fu](https://discourse.paraview.org/u/Tong_Fu)
#### Post date: [February 27, 2026, 9:56am UTC](https://discourse.paraview.org/t/lidarview-odom-slam-integration/17292/2 "2026-02-27T09:56:24Z")

</div>

Hello,

Thank you for using LidarView and SLAM, and apologies for the late reply.

> 1. What is the **recommended way** to trigger a function (like `SetManualSlamConnect()`) when a filter such as _SLAM (Online)_ is created or selected from the GUI?  
> Should this be done via XML hints, directly in the `vtkSlam` constructor, or through a manager class like `pqLidarSlamManager`?

We recently added an optional external sensor input to the SLAM filter in LidarView, which provides functionality very similar to your use case. Please refer to the related [merge request](https://gitlab.kitware.com/keu-computervision/slam/-/merge_requests/504) for implementation detail.

Futhermore, LidarView supports loading MCAP data and ROS2 subscribers has recently been added, allowing direct reception of ROS message such as: pointcloud, IMU, odometry, image… etc  
You can find more detail in this repo: [https://gitlab.kitware.com/LidarView/plugins/ros2-io](https://gitlab.kitware.com/LidarView/plugins/ros2-io)

> 1. If my external ROS 2 odometry data is successfully connected,  
> will the **SLAM (Online)** module actually **consume and use odometry** as an additional input (e.g., as an initial guess for registration)?  
> Or is the current implementation designed to rely solely on LiDAR-based pose estimation?
> 2. Are there any **additional parameters or configuration options** (in the SLAM `.xml` or `.json` files) that must be enabled for SLAM to accept external odometry?

Yes, external odometry can be used as an initial motion estimate in SLAM.  
To enable this, you can choose `Ego-Motion Mode` as `External` or `External OR Motion Extrapolation` .This allows SLAM to use your odometry as a motion prior of registration.

Our SLAM supports external sensors in multiple roles, including: initial pose estimation, undistortion, local constraints, pose graph optimization.

You can refer to the [External Sensors section](https://gitlab.kitware.com/keu-computervision/slam/-/blob/master/paraview_wrapping/Plugin/doc/How_to_SLAM_with_LidarView.md#external-sensors) of the SLAM documentation for more details about how to use them and how to set parameters.

Theorically, it is now possible to subscribe directly to an odometry topic inside LidarView and use it as an external SLAM input with our recent updates, The remaining step is aligning the ROS odometry message format with the SLAM internal format — this is currently under development.  
Please stay tuned for upcoming updates.

I hope this helps, and please feel free to contact us if you need further support.
