glim
glim copied to clipboard
failed to deserialize factor graph!! when loading sample data in offline_viewer
Describe the bug
I am unable to load the dump data from the inarimae_mmm sample mapping sessions into the offline_viewer
To Reproduce I first ran
docker run -it \
--rm \
--net=host \
--ipc=host \
--pid=host \
--gpus all \
-e=DISPLAY \
-e=ROS_DOMAIN_ID \
-v $(realpath config):/glim/config \
-v $(realpath data):/glim/data koide3/glim_ros2:humble_cuda12.2 \
ros2 run glim_ros offline_viewer
with the inarimae_mmm extracted to data
At this point, clicking either yes or no to optimization will result in the following error
gabriel@gabriel-Z790-AORUS-ELITE-AX:/tmp/glim$ docker run -it --rm --net=host --ipc=host --pid=host --gpus all -e=DISPLAY -e=ROS_DOMAIN_ID -v $(realpath config):/glim/config -v $(realpath data):/glim/data koide3/glim_ros2:humble_cuda12.2 ros2 run glim_ros offline_viewer
[2025-06-10 02:25:51.415] [glim] [info] config_path: /root/ros2_ws/install/glim/share/glim/config
[2025-06-10 02:25:51.701] [viewer] [info] Starting interactive viewer
[2025-06-10 02:26:18.130] [viewer] [info] Use config from /glim/data/inarimae_mmm/dump_01/config
[2025-06-10 02:26:29.771] [viewer] [info] enable_optimization=true
[2025-06-10 02:26:29.837] [global] [info] Load submaps (session_id=0)
[2025-06-10 02:26:30.072] [global] [info] deserializing factor graph
[2025-06-10 02:26:30.072] [global] [error] failed to deserialize factor graph!!
[2025-06-10 02:26:30.072] [global] [error] unsupported version
[2025-06-10 02:26:30.072] [global] [info] deserializing values
[2025-06-10 02:26:30.072] [global] [error] failed to deserialize values!!
[2025-06-10 02:26:30.072] [global] [error] unsupported version
[2025-06-10 02:26:30.072] [global] [info] creating matching cost factors
[2025-06-10 02:26:30.073] [global] [info] optimize
[2025-06-10 02:26:30.073] [global] [error] an exception was caught during global map optimization!!
[2025-06-10 02:26:30.073] [global] [error] Attempting to at the key "x0", which does not exist in the Values.
[2025-06-10 02:26:30.073] [viewer] [info] --- smoother_updated ---
count new lin elim gpu_e gpu_l delta time_msec
0 0 0 0 0 0 0 0
terminate called after throwing an instance of 'std::out_of_range'
what(): Requested variable 'x0' is not in this VectorValues.
[ros2run]: Aborted
Environment (please complete the following information):
- CPU/GPU: rtx 3080
- OS: Ubuntu 20.04
- ROS: docker ros2 (koide3/glim_ros2:humble_cuda12.2)
- CUDA: host Driver Version: 535.183.01 CUDA Version: 12.2
If I create a mapping session using os0-64.bag and load the dump data into the ros2 viewer, it appears to run without problem
I encountered this problem as well. Have you solved it?