koide3 / hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
BSD 2-Clause "Simplified" License
777 stars 309 forks source link

Guidance needed on solving stucked aligned pointcloud in RVIZ - Please #16

Open HappySamuel opened 5 years ago

HappySamuel commented 5 years ago

Hi @koide3

I have been trying to use hdl_localization along with my Gazebo simulation. I have pointcloud map recorded and able to be loaded onto the RVIZ. However, when i moved my vehicle around, RVIZ showed that my vehicle was moving around. But the aligned pointcloud, doesn't move with the vehicle. Here's the picture:

Screenshot from 2019-03-21 10-51-17

I go through the codes. And i found the below might be the reason why the aligned pointcloud doesn't move with vehicle. I guess it's due to aligned pointcloud is published on "map" frame. Here i attached the picture of my guess:

Screenshot from 2019-03-21 10-55-36

By the way, I modified the original code, in order to match my usage, i change the frame_id from "velodyne" to "3d_laser". Here's the picture of modified area.

Screenshot from 2019-03-21 10-55-52

Besides, i also attached the Nodegraph and TF tree that is used here.

hdl_localization_nodegraph

hdl_localization_tf

As you can see, for the "odom" -> "base_link", i use robot_localization pkg to publish this transform. While I use the static_transform_publisher from tf2_ros pkg to publish "map"->"odom" transform. It's located in the launch file as below:

Screenshot from 2019-03-21 11-11-17

Please guide me on how to get the aligned pointcloud to work normally, as it should be moved together with the vehicle frame (base_link) or lidar frame (3d_laser).

Best. Samuel