VoxelMap icon indicating copy to clipboard operation
VoxelMap copied to clipboard

**error**: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]

Open lidawenwenwen opened this issue 2 years ago • 4 comments

您好 ,感谢您的分享,这里有个问题想要请教,在我尝试编译的时候,出现了以下错误: ~/catkin_ws/src/VoxelMap-master/include/voxel_map_util.hpp: In function ‘void BuildResidualListOMP(const std::unordered_map<VOXEL_LOC, OctoTree*>&, double, double, int, const std::vector<pointWithCov>&, std::vector&, std::vector<Eigen::Matrix<double, 3, 1> >&)’: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive] 请问您知道这里是什么原因吗,谢谢!

lidawenwenwen avatar Jul 12 '22 01:07 lidawenwenwen

注释掉CMakeLists.txt

  # elseif(N GREATER 3)
  # math(EXPR PROC_NUM "${N} - 2") # sth wrong here
  # add_definitions(-DMP_EN)
  # add_definitions(-DMP_PROC_NUM="${PROC_NUM}")
  # message("core for MP:  ${PROC_NUM}")

HaisenbergPeng avatar Jul 12 '22 04:07 HaisenbergPeng

了解,以编译成功,谢谢! 我尝试运行kitti数据集,修改了

  1. LiDAR point cloud topic name: lid_topic
  2. If you want to show the voxel map, set pub_voxel_map to true
  3. If you want to show the accumulated point cloud map, set pub_point_cloud to true

运行roslaunch voxel_map mapping_velodyne.launch后播放bag数据,一些参数设置反馈如下:

... logging to /home/lw/.ros/log/ac46931e-01c0-11ed-9b01-c83dd4a673bf/roslaunch-lw-27173.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://lw:45685/

SUMMARY

PARAMETERS

  • /Result/result_path: /home/ycj/catkin_...
  • /Result/write_kitti_log: False
  • /common/imu_topic: /kitti/oxts/imu
  • /common/lid_topic: /kitti/velo/point...
  • /imu/extrinsic_R: [1, 0, 0, 0, 1, 0...
  • /imu/extrinsic_T: [0, 0, 0]
  • /imu/imu_en: False
  • /mapping/down_sample_size: 0.5
  • /mapping/layer_point_size: [5, 5, 5, 5, 5]
  • /mapping/max_cov_points_size: 1000
  • /mapping/max_iteration: 3
  • /mapping/max_layer: 4
  • /mapping/max_points_size: 1000
  • /mapping/plannar_threshold: 0.01
  • /mapping/voxel_size: 3.0
  • /noise_model/acc_cov_scale: 1.0
  • /noise_model/angle_cov: 0.1
  • /noise_model/gyr_cov_scale: 0.5
  • /noise_model/ranging_cov: 0.04
  • /preprocess/blind: 1
  • /preprocess/calib_laser: True
  • /preprocess/lidar_type: 2
  • /preprocess/point_filter_num: 1
  • /preprocess/scan_line: 64
  • /rosdistro: melodic
  • /rosversion: 1.14.12
  • /visualization/dense_map_enable: False
  • /visualization/pub_point_cloud: True
  • /visualization/pub_point_cloud_skip: 5
  • /visualization/pub_voxel_map: True
  • /visualization/publish_max_voxel_layer: 1

NODES / rviz (rviz/rviz) voxel_mapping_odom (voxel_map/voxel_mapping_odom)

auto-starting new master process[master]: started with pid [27189] ROS_MASTER_URI=http://localhost:11311

setting /run_id to ac46931e-01c0-11ed-9b01-c83dd4a673bf process[rosout-1]: started with pid [27217] started core service [/rosout] process[voxel_mapping_odom-2]: started with pid [27229] process[rviz-3]: started with pid [27233] p_pre->lidar_type 2 no imu Failed to find match for field 'time'. Failed to find match for field 'ring'. scanIdx:0 No IMU, use constant velocity model [voxel_mapping_odom-2] process has died [pid 27229, exit code -11, cmd /home/lw/Code_train/catkin_ws/devel/lib/voxel_map/voxel_mapping_odom __name:=voxel_mapping_odom __log:=/home/lw/.ros/log/ac46931e-01c0-11ed-9b01-c83dd4a673bf/voxel_mapping_odom-2.log]. log file: /home/lw/.ros/log/ac46931e-01c0-11ed-9b01-c83dd4a673bf/voxel_mapping_odom-2.log*

请问是还有什么参数需要配置吗

lidawenwenwen avatar Jul 12 '22 09:07 lidawenwenwen

请检查下报错是否发生在buildVoxelMap函数

ChongjianYUAN avatar Jul 13 '22 03:07 ChongjianYUAN

是的

lidawenwenwen avatar Jul 15 '22 05:07 lidawenwenwen