mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
LaserScan: fixed destination format when source is empty with operator+
This commit is contained in:
@@ -387,7 +387,7 @@ LaserScan LaserScan::operator+(const LaserScan & scan)
|
||||
{
|
||||
if(this->empty())
|
||||
{
|
||||
dest = LaserScan(scan.data().clone(), 0, 0, this->format());
|
||||
dest = scan.clone();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -6300,6 +6300,7 @@ void Rtabmap::createGlobalScanMap()
|
||||
data.uncompressDataConst(0, 0, &scan, 0, 0, 0, 0);
|
||||
if(!scan.empty())
|
||||
{
|
||||
UDEBUG("Adding scan %d (format=%s, points=%d)", iter->first, scan.formatName().c_str(), scan.size());
|
||||
scan = util3d::transformLaserScan(scan, iter->second*scan.localTransform());
|
||||
if(_globalScanMap.empty() || _globalScanMap.format() == scan.format())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user