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

Error in local map building #1

Open
ziyou1987912 opened this issue Jul 4, 2020 · 6 comments
Open

Error in local map building #1

ziyou1987912 opened this issue Jul 4, 2020 · 6 comments

Comments

@ziyou1987912
Copy link

Start building local map...
Loaded 1182 frames from Base-LiDAR
mapping: /build/pcl-OilVEB/pcl-1.8.1+dfsg1/octree/include/pcl/octree/impl/octree_pointcloud.hpp:688: void pcl::octree::OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT>::genOctreeKeyforPoint(const PointT&, pcl::octree::OctreeKey&) const [with PointT = pcl::PointXYZ; LeafContainerT = pcl::octree::OctreeContainerPointIndices; BranchContainerT = pcl::octree::OctreeContainerEmpty; OctreeT = pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>]: Assertion `key_arg.x <= this->max_key_.x' failed.
Aborted (core dumped)

@Livox-SDK
Copy link
Owner

PointCloudMapper.cc
change

if (!map_octree_->isVoxelOccupiedAtPoint(p)) {

to:

double min_x, min_y, min_z, max_x, max_y, max_z;
map_octree_->getBoundingBox(min_x, min_y, min_z, max_x, max_y, max_z);
bool isInBox = (p.x >= min_x && p.x <= max_x) && (p.y >= min_y && p.y <= max_y) && (p.z >= min_z && p.z <= max_z);

if (!isInBox || !map_octree_->isVoxelOccupiedAtPoint(p)) {

@ziyou1987912
Copy link
Author

Start building local map...
Loaded 1182 frames from Base-LiDAR
100% [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
Saving submap...
Mapping done!
Start calibration...
Reading H-LiDAR map data...
Loaded 1084894 data points from H_LiDAR_Map.pcd
calibration: /build/pcl-OilVEB/pcl-1.8.1+dfsg1/octree/include/pcl/octree/impl/octree_pointcloud.hpp:688: void pcl::octree::OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT>::genOctreeKeyforPoint(const PointT&, pcl::octree::OctreeKey&) const [with PointT = pcl::PointXYZ; LeafContainerT = pcl::octree::OctreeContainerPointIndices; BranchContainerT = pcl::octree::OctreeContainerEmpty; OctreeT = pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>]: Assertion `key_arg.x <= this->max_key_.x' failed.
Aborted (core dumped)

@Livox-SDK
Copy link
Owner

There is another PointCloudMapper.cc in calibration file, please check

@757628
Copy link

757628 commented Jul 23, 2020

There is another PointCloudMapper.cc in calibration file, please check

I have modified the file in calibration and mapping,while I still get an error like that.Can you tell me how to solve this problem?Thanks.

Start building local map...
Loaded 1182 frames from Base-LiDAR
100% [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
Saving submap...
terminate called after throwing an instance of 'pcl::IOException'
what(): : [pcl::PCDWriter::writeASCII] Could not open file for writing!
Aborted (core dumped)
Start calibration...
Reading H-LiDAR map data...
[pcl::PCDReader::readHeader] Could not find file '../data/H-LiDAR-Map-data/H_LiDAR_Map.pcd'.
Couldn't read H_LiDAR_Map

@wxjiang
Copy link

wxjiang commented Jul 29, 2020

There is another PointCloudMapper.cc in calibration file, please check

I have modified the file in calibration and mapping,while I still get an error like that.Can you tell me how to solve this problem?Thanks.

Start building local map...
Loaded 1182 frames from Base-LiDAR
100% [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
Saving submap...
terminate called after throwing an instance of 'pcl::IOException'
what(): : [pcl::PCDWriter::writeASCII] Could not open file for writing!
Aborted (core dumped)
Start calibration...
Reading H-LiDAR map data...
[pcl::PCDReader::readHeader] Could not find file '../data/H-LiDAR-Map-data/H_LiDAR_Map.pcd'.
Couldn't read H_LiDAR_Map

create a dir named "H_LiDAR_Map"

@callmebylxh
Copy link

Start building local map...
Loaded 1182 frames from Base-LiDAR
100% [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
Saving submap...
Mapping done!
Start calibration...
Reading H-LiDAR map data...
Loaded 1084894 data points from H_LiDAR_Map.pcd
calibration: /build/pcl-OilVEB/pcl-1.8.1+dfsg1/octree/include/pcl/octree/impl/octree_pointcloud.hpp:688: void pcl::octree::OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT>::genOctreeKeyforPoint(const PointT&, pcl::octree::OctreeKey&) const [with PointT = pcl::PointXYZ; LeafContainerT = pcl::octree::OctreeContainerPointIndices; BranchContainerT = pcl::octree::OctreeContainerEmpty; OctreeT = pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>]: Assertion `key_arg.x <= this->max_key_.x' failed.
Aborted (core dumped)

this is a same problem , you can change the code in /calibration/PointCloudMapper.cpp in function bool PointCloudMapper::InsertPoints(const PointCloud::ConstPtr& points,
PointCloud* incremental_points)

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

5 participants