wh200720041 / floam

Fast LOAM: Fast and Optimized Lidar Odometry And Mapping for indoor/outdoor localization IROS 2021
Other
1.05k stars 274 forks source link

No transform between frames world and velodyne/base_link available #28

Closed WennPaper closed 8 months ago

WennPaper commented 3 years ago

FLOAM was working fine with the KITTI dataset for me. However, when I tested FLOAM with some of my VLP16 data (the data were first collected in pcap format and then converted to bag format) I received the following warnings:

[ WARN] [1615661815.747191914, 1615659482.642718329]: No transform between frames world and base_link available after 1615659482.642718 seconds of waiting. This warning only prints once. [ WARN] [1615661815.751760228, 1615659482.647800395]: No transform between frames world and velodyne available after 1615659482.647800 seconds of waiting. This warning only prints once.

Nothing was showing in RViz. I have no idea how to fix this so any help is greatly appreciated!

wh200720041 commented 3 years ago

Hi @WenTheProgrammer

The KITTI dataset uses world as the origin, however, the frame for the origin is "map". Hence there is a static transform publisher between world and map. The trajectory visualizer subscribe the world and base_link to show the trajectory,

If you want to use velodyne, you can simply subscribe the map and base_link to show the trajectory, to do this, add

    <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="trajectory_server_floam" ns="floam" >
        <param name="/target_frame_name" value="map" />
        <param name="/source_frame_name" value="base_link" />
        <param name="/trajectory_update_rate" value="10.0" />
        <param name="/trajectory_publish_rate" value="10.0" />
    </node>
WennPaper commented 3 years ago

Thank you for the quick reply! I first modified floam_mapping.launch by adding the node as you instructed. Unfortunately the issue persisted. I noticed that in the launch file this node already existed:

<node pkg="hector_trajectory_server" type="hector_trajectory_server" name="trajectory_server_loam" ns="base_link" >
    <param name="/target_frame_name" value="world" />
    <param name="/source_frame_name" value="base_link" />
    <param name="/trajectory_update_rate" value="10.0" />
    <param name="/trajectory_publish_rate" value="10.0" />
</node>

Since it looked rather similar to the one that you suggested, I replaced it with the new node. Again, I received the same warnings. Any other suggestions? Thanks.

wh200720041 commented 3 years ago

You can ignore the warnings, and in the rviz menu, change the trajectory(floam_result) to the topic with floam, then you should see the trajectory

WennPaper commented 3 years ago

If I understand you correctly, in RViz, under floam_result, Topic by default was /base_link/trajectory. The dropdown menu for Topic did not give me another option, so I just changed it to floam/trajectory, which returned me nothing. If possible I would like to view both trajectory and mapping results.

Aside from the viewing issue, how can I export the registered point clouds (mapping results) from FLOAM to a file (e.g. pcd/ply)? I did not find an apparent way of doing it in RViz. Thank you!

wh200720041 commented 3 years ago

You have to change to global frame to map in rviz

WennPaper commented 3 years ago

After setting Fixed Frame to map I still don't see anything. Here is the screenshot:

Screenshot from 2021-03-14 13-40-20

Here are the terminal outputs:

Screenshot from 2021-03-14 13-50-38

wh200720041 commented 3 years ago

can you provide a rosbag link so that I can have a quick test?

BamsaAhmed commented 1 year ago

@wh200720041 Hi thank you for effort, I used rosrun rqt_tf_tree to show the frame tree and it is as :

frames Is the relationship between the frames correct?