File: pymrpt_internals.cpp

package info (click to toggle)
mrpt 1%3A2.15.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 92,456 kB
  • sloc: cpp: 555,366; ansic: 36,840; xml: 3,872; python: 2,195; sh: 524; makefile: 232
file content (27 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* +------------------------------------------------------------------------+
   |                     Mobile Robot Programming Toolkit (MRPT)            |
   |                          https://www.mrpt.org/                         |
   |                                                                        |
   | Copyright (c) 2005-2024, Individual contributors, see AUTHORS file     |
   | See: https://www.mrpt.org/Authors - All rights reserved.               |
   | Released under BSD License. See: https://www.mrpt.org/License          |
   +------------------------------------------------------------------------+ */

#include <mrpt/maps/CMetricMap.h>
#include <mrpt/obs/CSensoryFrame.h>

bool mrpt::pymrpt_internal::insertObs(
	const mrpt::obs::CSensoryFrame& sf,
    mrpt::maps::CMetricMap* map,
	const mrpt::poses::CPose3D* robotPose)
{
    ASSERT_(map);
    bool any=false;
    for (const auto &obs : sf)
    {
        if (!obs) continue;
        bool done = map->insertObs(*obs,robotPose);
        any = any || done;
    }
    return any;
}