rsasaki0109 / lidar_localization_ros2

3D LIDAR Localization using NDT/GICP and pointcloud map in ROS 2 (Not SLAM)
BSD 2-Clause "Simplified" License
281 stars 54 forks source link

error, rviz no map frame. and if give 2D pose, the node die. #47

Open Un1Lee opened 2 weeks ago

Un1Lee commented 2 weeks ago

I really need your help.... I use fastlio2 for mapping, then get pcd map. the fastlio publish tf: odom->base_link. when I run your code, I use odom: false, use imu: false. I run mid360, and fastlio2 will transform livox -> pointcloud2 form. it has 2 topic, one for frame_id odom, and one for frame_id base_link. I check both for your code, both are not work. In rviz, it show no map frame in global stats: fixed frame (it has map). I have deleted your remap, if I run rqt_tf_tree, it will see odom->base_ink->velody(I have change it to lidar_link). but no map. I am confused that your code would publish map->odom, but it dose not be saw. When I see rviz, it can see my map. but no lidar cloud. (what's more, this lidar cloud can be saw in new rviz). And if I give it initial pose, the it will report posereceived, cloudreceived, then node die. I use info to know maybe it is because pcl::fromROSmsg, but it really no reason to die for this.

Thank you for your help.

rsasaki0109 commented 2 weeks ago

Perhaps the map_path setting in yaml isn't correct? Can you check if the PCD map is correct by running 「head 」? If that looks fine, it might help if you could share the terminal output when you run it.