luigifreda / plvs

PLVS is a real-time SLAM system with points, lines, volumetric mapping and 3D unsupervised incremental segmentation.
GNU General Public License v3.0
453 stars 67 forks source link

mising protobuf #19

Closed rookierobot closed 8 months ago

rookierobot commented 8 months ago

Hi, My environment is Ubuntu20.04, gcc version 9.4. I followed the instructions in the README document. Executed _./installdepenies.sh and _./install_localopencv. An error was encountered while executing the third step ./build.sh.

Yesterday, I encountered an error when compiling "voxblox". It should be caused by the lack of the protobuf library. Then I deleted the "build" under the "voxblox" folder and the project compiled and passed, but the next project "voxblox server" failed. Encountered the same problem and reported the same error message. And deleting "build" under the project and recompiling cannot solve the problem.

Part of the error message is as follows: (You can see that protobuf can be found) -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

OPENCV_VERSION
OpenCV_DIR

-- Build files have been written to: /home/river/plvs/Thirdparty/voxblox_server/build Scanning dependencies of target voxblox_server [ 60%] Building CXX object CMakeFiles/voxblox_server.dir/src/transformer.cc.o [ 60%] Building CXX object CMakeFiles/voxblox_server.dir/src/esdf_server.cc.o [ 60%] Building CXX object CMakeFiles/voxblox_server.dir/src/simulation_server.cc.o [ 80%] Building CXX object CMakeFiles/voxblox_server.dir/src/tsdf_server.cc.o In file included from /home/river/plvs/Thirdparty/voxblox_server/../voxblox/include/voxblox/core/layer.h:11, from /home/river/plvs/Thirdparty/voxblox_server/../voxblox/include/voxblox/core/esdf_map.h:10, from /home/river/plvs/Thirdparty/voxblox_server/include/voxblox_ros/simulation_server.h:11, from /home/river/plvs/Thirdparty/voxblox_server/src/simulation_server.cc:1: /home/river/plvs/Thirdparty/voxblox_server/../voxblox/include/voxblox/core/block.h:35:24: error: ‘BlockProto’ does not name a type 35 | explicit Block(const BlockProto& proto); | ^~~~~~ /home/river/plvs/Thirdparty/voxblox_server/../voxblox/include/voxblox/core/block.h:185:17: error: ‘BlockProto’ has not been declared 185 | void getProto(BlockProto proto) const; | ^~~~~~ /home/river/plvs/Thirdparty/voxblox_server/../voxblox/include/voxblox/core/block.h:203:31: error: ‘BlockProto’ does not name a type 203 | void deserializeProto(const BlockProto& proto); | ^~~~~~ /home/river/plvs/Thirdparty/voxblox_server/../voxblox/include/voxblox/core/block.h:204:23: error: ‘BlockProto’ has not been declared 204 | void serializeProto(BlockProto proto) const; | ^~~~~~ ......

I really don't know how to solve it. I look forward to your reply. Thank you very much.

luigifreda commented 8 months ago

Hi, thanks again for your feedback. There is already an issue for this problem: #18 Let's continue the discussion in the related thread.

rookierobot commented 8 months ago

Hello. Sorry to bother you again. With your suggestions, I successfully compiled and successfully used the D435 camera for SLAM under ROS. I have to say that your work is very successful and meaningful. Now, I want to move the point cloud in the Mapviewer window to RVIZ for display. But in the RVIZ window, Fixed Frame ERROR, Unknown frame map is displayed. Should I change the fixed frame to the camera's coordinate system? Or what should be done? 2023-12-19 16-00-04 的屏幕截图

luigifreda commented 8 months ago

Hi, you can set here

#define USE_POINTCLOUD_MAPPING 1

and rebuild ROS code with ./build_ros_catkin.sh. Now, the map should be published via ros topic. That being said, this is not something I would recommend using.

rookierobot commented 8 months ago

Hi, you can set here

#define USE_POINTCLOUD_MAPPING 1

and rebuild ROS code with ./build_ros_catkin.sh. Now, the map should be published via ros topic. That being said, this is not something I would recommend using.

Hi, I modified ros_rgbd.cc according to your suggestion, and set Viewer.on in the d435.yaml file to 0. Pointcloud2 can be successfully output using ros topic echo. But an error occurred in map_pointcloud2 in rviz: Data size (1957056 bytes) does not match width (40772) times height (1) time Everything else is normal. Then I tried several options from PointCloudMapping.type in the yaml file, but couldn't solve it. May I ask what else I need to modify? Also, why don't you recommend using rviz to output the ros topic?

luigifreda commented 8 months ago

Hi, there was an old code there. I pushed a new update that solves the problem.

Also, why don't you recommend using rviz to output the ros topic?

Sending a big cloud over rostcp is not ideal.

You can use the launch file for the viz https://github.com/luigifreda/plvs/blob/master/Examples_old/ROS/PLVS/launch/rviz_plvs.launch

rookierobot commented 8 months ago

Hi, I want to ask you two more questions.

  1. I found that the color of the point cloud displayed in RVIZ is inconsistent with the actual color, but the color of the point cloud in the MapViewer window is normal. Is this caused by three RGB channels were mistaken during point cloud format conversion ?
  2. In addition, the raster ground in Rviz and the real ground of the point cloud do not coincide. And the tf module shows: There is no transform from 'camera_link_orbslam' to 'camera_link' . Should I solve the problem by adjusting the tf coordinate conversion relationship? 图片
luigifreda commented 8 months ago

Hi, you can pull the new changes.

  1. In general, this issue can be solved by just inverting Camera.RGB (in the YAML settings). With the new changes, this has been automatically managed.

  2. For the sake of clarity, there is no ground plane detection algorithm. With the new changes, the map has been rotated more comfortably. As for the transform to camera_link, yes, you need to add it by yourself according to your needs. In general, this transformation may depend on the device at hand.