mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-03 16:47:47 +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())
|
if(this->empty())
|
||||||
{
|
{
|
||||||
dest = LaserScan(scan.data().clone(), 0, 0, this->format());
|
dest = scan.clone();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6300,6 +6300,7 @@ void Rtabmap::createGlobalScanMap()
|
|||||||
data.uncompressDataConst(0, 0, &scan, 0, 0, 0, 0);
|
data.uncompressDataConst(0, 0, &scan, 0, 0, 0, 0);
|
||||||
if(!scan.empty())
|
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());
|
scan = util3d::transformLaserScan(scan, iter->second*scan.localTransform());
|
||||||
if(_globalScanMap.empty() || _globalScanMap.format() == scan.format())
|
if(_globalScanMap.empty() || _globalScanMap.format() == scan.format())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user