Skip to content

Autoresearch on relocalization#2137

Draft
leshy wants to merge 79 commits into
mainfrom
sloptimization/ransac
Draft

Autoresearch on relocalization#2137
leshy wants to merge 79 commits into
mainfrom
sloptimization/ransac

Conversation

@leshy
Copy link
Copy Markdown
Contributor

@leshy leshy commented May 17, 2026

First pass but pretty good, sub 1s alignment on a CPU from 5s of lidar data

Next steps

better data - needs lidar frames collected from multiple independant loop closed runs. We can use this same relocalzation to align them, or use fiduciary markers for ground truth. With multiple recordings we can validate relocalization with unique never seen lidar frames into a global map.

Global mapper will try to align what it can see to a loaded map. When do we know we are ready to import loaded map into current ground truth? we need match confidence measure

better confidence measure autoresearch - we need a match confidence measure that corresponds to ground truth match quality - this way we can keep ever expanding local map, until we find a way to insert it into a lodaded global map

How does amount of lidar points affect our alignment quality / exec time?

graph runtime or numbers of points collected vs alignment quality

autoresearch on a better dataset that includes different pc sizes

Continuous alignment

We could still incorrectly align local map into a loaded global map - can we keep those permanently separate? always search for a better match? Can mapper change it's mind about where the loaded map should sit? How do we deal with env updates in that case?

leshy and others added 30 commits May 17, 2026 20:21
More candidates to choose from; 4x per-frame budget headroom on 60-frame eval.
Finer descriptors → new candidate diversity. Previously timed out at 60s/frame budget; now we have 240s/frame on 48 cores.
60 frames over ~48 cores leaves huge per-frame headroom even at 90s wall budget.
0.15m hit 171s — too slow for 90s budget. Back to [0.2, 0.3, 0.5, 0.8] with 7 restarts.
Map coverage near trajectory start is too sparse for meaningful evaluation — all algorithms fail on these. 58 frames remaining.
Down-weights inliers beyond k=RERANK_DIST. Misaligned wall fragments contribute less; aligned ones drive the solution more.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
1797 2 1795 28
View the top 2 failed test(s) by shortest run time
dimos.project.test_no_sections::test_no_section_markers
Stack Traces | 0.825s run time
def test_no_section_markers():
        """
        Fail if any file contains section-style comment markers.
    
        If a file is too complicated to be understood without sections, then the
        sections should be files. We don't need "subfiles".
        """
        violations = find_section_markers()
        if violations:
            report_lines = [
                f"Found {len(violations)} section marker(s). "
                "If a file is too complicated to be understood without sections, "
                'then the sections should be files. We don\'t need "subfiles".',
                "",
            ]
            for path, lineno, text in violations:
                report_lines.append(f"  {path}:{lineno}: {text.strip()}")
>           raise AssertionError("\n".join(report_lines))
E           AssertionError: Found 1 section marker(s). If a file is too complicated to be understood without sections, then the sections should be files. We don't need "subfiles".
E           
E             .../mapping/relocalization/relocalize.py:42: # ---- Tuning knobs ----------------------------------------------------------

lineno     = 42
path       = '.../mapping/relocalization/relocalize.py'
report_lines = ['Found 1 section marker(s). If a file is too complicated to be understood without sections, then the sections should ...pping/relocalization/relocalize.py:42: # ---- Tuning knobs ----------------------------------------------------------']
text       = '# ---- Tuning knobs ----------------------------------------------------------'
violations = [('.../mapping/relocalization/relocalize.py', 42, '# ---- Tuning knobs ----------------------------------------------------------')]

dimos/project/test_no_sections.py:145: AssertionError
dimos.protocol.rpc.test_spec::test_basic_sync_call[lcm_rpc_context-lcm]
Stack Traces | 5.06s run time
rpc_context = <function lcm_rpc_context at 0x7f205951ba60>, impl_name = 'lcm'

    @pytest.mark.parametrize("rpc_context, impl_name", testdata)
    def test_basic_sync_call(rpc_context, impl_name: str) -> None:
        """Test basic synchronous RPC calls."""
        with rpc_context() as (server, client):
            # Serve the function
            unsub = server.serve_rpc(add_function, "add")
    
            try:
                # Make sync call
>               result, _ = client.call_sync("add", ([5, 3], {}), rpc_timeout=5.0)

client     = <dimos.protocol.rpc.pubsubrpc.LCMRPC object at 0x7f2057762d20>
impl_name  = 'lcm'
rpc_context = <function lcm_rpc_context at 0x7f205951ba60>
server     = <dimos.protocol.rpc.pubsubrpc.LCMRPC object at 0x7f20578e9010>
unsub      = <function LCMPubSubBase.subscribe.<locals>.unsubscribe at 0x7f2057612020>

.../protocol/rpc/test_spec.py:139: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dimos.protocol.rpc.pubsubrpc.LCMRPC object at 0x7f2057762d20>
name = 'add', arguments = ([5, 3], {}), rpc_timeout = 5.0

    def call_sync(
        self, name: str, arguments: Args, rpc_timeout: float | None = None
    ) -> tuple[Any, Callable[[], None]]:
        if rpc_timeout is None:
            method = name.rsplit("/", 1)[-1]
            rpc_timeout = self.rpc_timeouts.get(name) or self.rpc_timeouts.get(
                method, self.default_rpc_timeout
            )
        event = threading.Event()
    
        def receive_value(val) -> None:  # type: ignore[no-untyped-def]
            event.result = val  # type: ignore[attr-defined]  # attach to event
            event.set()
    
        unsub_fn = self.call(name, arguments, receive_value)
        if not event.wait(rpc_timeout):
>           raise TimeoutError(f"RPC call to '{name}' timed out after {rpc_timeout} seconds")
E           TimeoutError: RPC call to 'add' timed out after 5.0 seconds

arguments  = ([5, 3], {})
event      = <threading.Event at 0x7f2057762870: unset>
name       = 'add'
receive_value = <function RPCClient.call_sync.<locals>.receive_value at 0x7f2057611940>
rpc_timeout = 5.0
self       = <dimos.protocol.rpc.pubsubrpc.LCMRPC object at 0x7f2057762d20>
unsub_fn   = <function PubSubRPCMixin.call_cb.<locals>.unsubscribe_callback at 0x7f20575056c0>

.../protocol/rpc/spec.py:80: TimeoutError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@arkluc arkluc mentioned this pull request May 18, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants