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

Fast_gicp do not work #2

Open
huarzail opened this issue Jul 17, 2024 · 0 comments
Open

Fast_gicp do not work #2

huarzail opened this issue Jul 17, 2024 · 0 comments

Comments

@huarzail
Copy link

I found that the official code of fase_gicp is linked to the main branch. But when I run the command "bash tum.sh", it was not well running. It endless loop at the second iter(current_pose = self.reg.align(initial_pose)).
The issue suggested I use the branch of gs_gicp_slam.(link: Lab-of-AI-and-Robotics/GS_ICP_SLAM#25)

When I change the fase_gicp brance of gs_gicp_slam, the error changed as : AttributeError: 'pygicp.FastGICP' object has no attribute 'set_max_knn_distance'.

What should I do???

In the fase_gicp brance of gs_gicp_slam environment, I had a test script as:

import pygicp
import numpy as np
from multiprocessing import Process, Queue

def align_task(queue, src_points, tgt_points, initial_pose):
reg = pygicp.FastGICP()

reg.set_input_target(tgt_points)
reg.set_input_source(src_points)

print("initial_guess:",initial_pose)

current_pose = reg.align(initial_pose)

print("current_pose:",current_pose)

queue.put(current_pose)

if name == 'main':
src = np.random.rand(100, 3).astype(np.float32)
tgt = np.random.rand(100, 3).astype(np.float32)
initial_pose = np.eye(4, dtype=np.float32)

queue = Queue()

p = Process(target=align_task, args=(queue, src, tgt, initial_pose))
p.start()
p.join()

if not queue.empty():
    result = queue.get()
    print("Alignment successful. Current pose:", result)

Output:

(gsicpslam_01) gvlib_ljh@gvlib-MS-ljh:/3DGS-SLAM/GS_ICP_SLAM/test_ljh$ python test_fast_gicp.py
initial_guess: [[1. 0. 0. 0.]
[0. 1. 0. 0.]
[0. 0. 1. 0.]
[0. 0. 0. 1.]]
(gsicpslam_01) gvlib_ljh@gvlib-MS-ljh:
/3DGS-SLAM/GS_ICP_SLAM/test_ljh$

It sees that the code of "current_pose = reg.align(initial_pose)" was not executed.

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

1 participant