floam icon indicating copy to clipboard operation
floam copied to clipboard

No transform between frames world and velodyne/base_link available

Open WennPaper opened this issue 5 years ago • 7 comments

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!

WennPaper avatar Mar 13 '21 19:03 WennPaper

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>

wh200720041 avatar Mar 14 '21 00:03 wh200720041

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.

WennPaper avatar Mar 14 '21 01:03 WennPaper

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

wh200720041 avatar Mar 14 '21 02:03 wh200720041

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!

WennPaper avatar Mar 14 '21 05:03 WennPaper

You have to change to global frame to map in rviz

wh200720041 avatar Mar 14 '21 08:03 wh200720041

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

WennPaper avatar Mar 14 '21 18:03 WennPaper

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

wh200720041 avatar Mar 15 '21 01:03 wh200720041

@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?

BamsaAhmed avatar Oct 18 '22 07:10 BamsaAhmed