pointcloud_to_2dmap
pointcloud_to_2dmap copied to clipboard
how to build this repository?
I tried the following steps:
cd pointcloud_to_2d_map mkdir build cd build cmake .. make
the last step "make" gives me the error as below
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp: In member function ‘cv::Mat MapGenerater::generate(const pcl::PointCloudpcl::PointXYZ&) const’:
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:28:21: error: ISO C++ forbids declaration of ‘point’ with no type [-fpermissive]
for(const auto& point: cloud) {
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:28:28: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
for(const auto& point: cloud) {
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:29:16: error: request for member ‘z’ in ‘point’, which is of non-class type ‘const int’
if(point.z < min_height || point.z > max_height) {
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:29:40: error: request for member ‘z’ in ‘point’, which is of non-class type ‘const int’
if(point.z < min_height || point.z > max_height) {
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:33:21: error: request for member ‘x’ in ‘point’, which is of non-class type ‘const int’
int x = point.x * m2pix + map_width / 2;
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:34:22: error: request for member ‘y’ in ‘point’, which is of non-class type ‘const int’
int y = -point.y * m2pix + map_width / 2;
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp: In function ‘int main(int, char**)’:
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:97:8: error: ‘cloud’ does not name a type
auto cloud = boost::make_shared<pcl::PointCloudpcl::PointXYZ>();
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:98:63: error: ‘cloud’ was not declared in this scope
if(pcl::io::loadPCDFile(vm["input_pcd"].asstd::string(), cloud)) {
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:104:37: error: ‘cloud’ was not declared in this scope
cv::Mat map = generater.generate(cloud);
^
pointcloud_to_2dmap/src/pointcloud_to_2dmap.cpp:113:46: error: no matching function for call to ‘std::basic_ofstream
Thank you
Clone the repo and cd pointcloud_to_2dmap
configure your build using CMake with,
cmake .
After that, you can run,
make
hello! sorry but i did what you said but i don't know where to locate my point cloud map from the lego loam algo and therefore see the results of the 2d map. after i launch the lego loam and i see the 3d map in Rviz, then what?