icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published
Closed this issue · 17 comments
icp_odometry mulfunction
After successfully launching Swarm-SLAM without error, I want to visualized the accmulated map but yield failure. The logs are shown below.
$ ros2 launch cslam_experiments graco_lidar.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2024-03-13-13-19-56-099846-focal-fossa-262787
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [262789]
[INFO] [static_transform_publisher-2]: process started with pid [262791]
[INFO] [loop_closure_detection_node.py-3]: process started with pid [262818]
[INFO] [lidar_handler_node.py-4]: process started with pid [262820]
[INFO] [pose_graph_manager-5]: process started with pid [262822]
[INFO] [icp_odometry-6]: process started with pid [262833]
[static_transform_publisher-1] [WARN] [1710335996.154640566] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-1] [INFO] [1710335996.163605911] [static_transform_publisher_FvfcaEfgmHYMnwbM]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('0.000000', '0.000000', '0.000000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'velodyne' to 'base_link'
[static_transform_publisher-2] [WARN] [1710335996.154633463] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-2] [INFO] [1710335996.163595221] [static_transform_publisher_MNqqK7qyUIdrRUAD]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('-0.011920', '-0.019700', '0.122600')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'velodyne' to 'gnss'
[pose_graph_manager-5] [INFO] [1710335996.205142222] [r0.cslam_pose_graph_manager]: Visualization enabled.
[pose_graph_manager-5] [INFO] [1710335996.215182722] [r0.cslam_pose_graph_manager]: Initialization done.
[icp_odometry-6] [INFO] [1710335996.561281704] [r0.icp_odometry]: Odometry: frame_id = velodyne
[icp_odometry-6] [INFO] [1710335996.561479637] [r0.icp_odometry]: Odometry: odom_frame_id = odom
[icp_odometry-6] [INFO] [1710335996.561491109] [r0.icp_odometry]: Odometry: publish_tf = true
[icp_odometry-6] [INFO] [1710335996.561498903] [r0.icp_odometry]: Odometry: wait_for_transform = 0.200000
[icp_odometry-6] [INFO] [1710335996.561522568] [r0.icp_odometry]: Odometry: log_to_rosout_level = 4
[icp_odometry-6] [INFO] [1710335996.561554899] [r0.icp_odometry]: Odometry: initial_pose = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[icp_odometry-6] [INFO] [1710335996.561563205] [r0.icp_odometry]: Odometry: ground_truth_frame_id =
[icp_odometry-6] [INFO] [1710335996.561570989] [r0.icp_odometry]: Odometry: ground_truth_base_frame_id =
[icp_odometry-6] [INFO] [1710335996.561578213] [r0.icp_odometry]: Odometry: config_path =
[icp_odometry-6] [INFO] [1710335996.561585126] [r0.icp_odometry]: Odometry: publish_null_when_lost = true
[icp_odometry-6] [INFO] [1710335996.561595836] [r0.icp_odometry]: Odometry: publish_compressed_sensor_data = false
[icp_odometry-6] [INFO] [1710335996.561603360] [r0.icp_odometry]: Odometry: guess_frame_id =
[icp_odometry-6] [INFO] [1710335996.561610343] [r0.icp_odometry]: Odometry: guess_min_translation = 0.000000
[icp_odometry-6] [INFO] [1710335996.561618368] [r0.icp_odometry]: Odometry: guess_min_rotation = 0.000000
[icp_odometry-6] [INFO] [1710335996.561626303] [r0.icp_odometry]: Odometry: guess_min_time = 0.000000
[icp_odometry-6] [INFO] [1710335996.561634048] [r0.icp_odometry]: Odometry: expected_update_rate = 0.000000 Hz
[icp_odometry-6] [INFO] [1710335996.561642023] [r0.icp_odometry]: Odometry: max_update_rate = 0.000000 Hz
[icp_odometry-6] [INFO] [1710335996.561649978] [r0.icp_odometry]: Odometry: min_update_rate = 0.000000 Hz
[icp_odometry-6] [INFO] [1710335996.561657793] [r0.icp_odometry]: Odometry: wait_imu_to_init = true
[icp_odometry-6] [INFO] [1710335996.561664906] [r0.icp_odometry]: Odometry: sensor_data_compression_format = .jpg
[icp_odometry-6] [INFO] [1710335996.561672010] [r0.icp_odometry]: Odometry: sensor_data_parallel_compression = true
[icp_odometry-6] [INFO] [1710335996.561682339] [r0.icp_odometry]: Odometry: stereoParams_=0 visParams_=0 icpParams_=1
[icp_odometry-6] [INFO] [1710335996.562425880] [r0.icp_odometry]: Setting odometry parameter "Icp/MaxCorrespondenceDistance"="4.0"
[icp_odometry-6] [INFO] [1710335996.562482607] [r0.icp_odometry]: Setting odometry parameter "Icp/MaxTranslation"="5"
[icp_odometry-6] [INFO] [1710335996.562659671] [r0.icp_odometry]: Setting odometry parameter "Icp/PointToPlaneK"="20"
[icp_odometry-6] [INFO] [1710335996.562843307] [r0.icp_odometry]: Setting odometry parameter "Icp/VoxelSize"="0.4"
[icp_odometry-6] [INFO] [1710335996.563534028] [r0.icp_odometry]: Setting odometry parameter "OdomF2M/ScanSubtractRadius"="0.4"
[icp_odometry-6] [INFO] [1710335996.565368956] [r0.icp_odometry]: Setting odometry parameter "OdomLOAM/Resolution"="0.4"
[icp_odometry-6] [INFO] [1710335996.565487901] [r0.icp_odometry]: Setting odometry parameter "OdomLOAM/Sensor"="0"
[icp_odometry-6] [WARN] [1710335996.569546759] [r0.icp_odometry]: IcpOdometry: Transferring value 0.4 of "Icp/VoxelSize" to ros parameter "scan_voxel_size" for convenience. "Icp/VoxelSize" is set to 0.
[icp_odometry-6] [WARN] [1710335996.569568039] [r0.icp_odometry]: IcpOdometry: Transferring value 20 of "Icp/PointToPlaneK" to ros parameter "scan_normal_k" for convenience.
[icp_odometry-6] [INFO] [1710335996.572102455] [r0.icp_odometry]: odometry: Subscribing to IMU topic /r0/imu/data
[icp_odometry-6] [INFO] [1710335996.572118304] [r0.icp_odometry]: odometry: qos_imu = 1
[icp_odometry-6] [INFO] [1710335996.572362334] [r0.icp_odometry]: IcpOdometry: qos = 1
[icp_odometry-6] [INFO] [1710335996.572373345] [r0.icp_odometry]: IcpOdometry: scan_cloud_max_points = -1
[icp_odometry-6] [INFO] [1710335996.572378064] [r0.icp_odometry]: IcpOdometry: scan_cloud_is_2d = false
[icp_odometry-6] [INFO] [1710335996.572382492] [r0.icp_odometry]: IcpOdometry: scan_downsampling_step = 1
[icp_odometry-6] [INFO] [1710335996.572386790] [r0.icp_odometry]: IcpOdometry: scan_range_min = 0.000000 m
[icp_odometry-6] [INFO] [1710335996.572393523] [r0.icp_odometry]: IcpOdometry: scan_range_max = 0.000000 m
[icp_odometry-6] [INFO] [1710335996.572398082] [r0.icp_odometry]: IcpOdometry: scan_voxel_size = 0.400000 m
[icp_odometry-6] [INFO] [1710335996.572403231] [r0.icp_odometry]: IcpOdometry: scan_normal_k = 20
[icp_odometry-6] [INFO] [1710335996.572407209] [r0.icp_odometry]: IcpOdometry: scan_normal_radius = 0.000000 m
[icp_odometry-6] [INFO] [1710335996.572428709] [r0.icp_odometry]: IcpOdometry: scan_normal_ground_up = 0.000000
[icp_odometry-6] [INFO] [1710335996.572434400] [r0.icp_odometry]: IcpOdometry: deskewing = false
[icp_odometry-6] [INFO] [1710335996.572438378] [r0.icp_odometry]: IcpOdometry: deskewing_slerp = false
[icp_odometry-6] [INFO] [1710335996.573129129] [r0.icp_odometry]:
[icp_odometry-6] icp_odometry subscribed to /scan and /r0/pointcloud (make sure only one of this topic is published, otherwise remap one to a dummy topic name).
[lidar_handler_node.py-4] [INFO] [1710335997.813727681] [r0.cslam_map_manager]: Initialization done.
[loop_closure_detection_node.py-3] [INFO] [1710335997.963310512] [r0.cslam_loop_closure_detection]: Using ScanContext.
[loop_closure_detection_node.py-3] [INFO] [1710335998.115740215] [r0.cslam_loop_closure_detection]: Initialization done.
[icp_odometry-6] [WARN] [1710336000.574888504] [r0.icp_odometry]: icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set.
[icp_odometry-6] icp_odometry subscribed to /scan and /r0/pointcloud (make sure only one of this topic is published, otherwise remap one to a dummy topic name).
[icp_odometry-6] [WARN] [1710336006.574545355] [r0.icp_odometry]: icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set.
[icp_odometry-6] icp_odometry subscribed to /scan and /r0/pointcloud (make sure only one of this topic is published, otherwise remap one to a dummy topic name).
[INFO] [bag-7]: process started with pid [263221]
[icp_odometry-6] [WARN] [1710336011.574626259] [r0.icp_odometry]: icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set.
[icp_odometry-6] icp_odometry subscribed to /scan and /r0/pointcloud (make sure only one of this topic is published, otherwise remap one to a dummy topic name).
[icp_odometry-6] [WARN] [1710336016.574705742] [r0.icp_odometry]: icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set.
[icp_odometry-6] icp_odometry subscribed to /scan and /r0/pointcloud (make sure only one of this topic is published, otherwise remap one to a dummy topic name).
[bag-7] stdin is not a terminal device. Keyboard handling disabled.[INFO] [1710336017.255913768] [rosbag2_storage]: Opened database '/Swarm-SLAM/install/cslam_experiments/share/cslam_experiments/data/Graco_Ground/Graco-0/ground-01_0.db3' for READ_ONLY.
[bag-7] [INFO] [1710336017.255985262] [rosbag2_player]: Set rate to 1
[bag-7] [INFO] [1710336017.263783694] [rosbag2_player]: Adding keyboard callbacks.
[bag-7] [INFO] [1710336017.263812207] [rosbag2_player]: Press SPACE for Pause/Resume
[bag-7] [INFO] [1710336017.263817728] [rosbag2_player]: Press CURSOR_RIGHT for Play Next Message
[bag-7] [INFO] [1710336017.263822376] [rosbag2_player]: Press CURSOR_UP for Increase Rate 10%
[bag-7] [INFO] [1710336017.263825993] [rosbag2_player]: Press CURSOR_DOWN for Decrease Rate 10%
[bag-7] [INFO] [1710336017.264404092] [rosbag2_storage]: Opened database '/Swarm-SLAM/install/cslam_experiments/share/cslam_experiments/data/Graco_Ground/Graco-0/ground-01_0.db3' for READ_ONLY.
[icp_odometry-6] [INFO] [1710336018.488852439] [r0.icp_odometry]: Odom: ratio=0.000000, std dev=99.995000m|99.995000rad, update time=0.001150s
[icp_odometry-6] [INFO] [1710336018.559851799] [r0.icp_odometry]: Odom: ratio=0.699264, std dev=0.025627m|0.008104rad, update time=0.062073s
[icp_odometry-6] [INFO] [1710336018.617380263] [r0.icp_odometry]: Odom: ratio=0.795177, std dev=0.033445m|0.010576rad, update time=0.052382s
[icp_odometry-6] [INFO] [1710336018.680608093] [r0.icp_odometry]: Odom: ratio=0.791799, std dev=0.021824m|0.006901rad, update time=0.058524s
[icp_odometry-6] [INFO] [1710336018.791930485] [r0.icp_odometry]: Odom: ratio=0.807606, std dev=0.017648m|0.005581rad, update time=0.067784s
[icp_odometry-6] [INFO] [1710336018.872271504] [r0.icp_odometry]: Odom: ratio=0.772258, std dev=0.021314m|0.006740rad, update time=0.060396s
[icp_odometry-6] [INFO] [1710336018.970672894] [r0.icp_odometry]: Odom: ratio=0.823363, std dev=0.031432m|0.009940rad, update time=0.052969s
[icp_odometry-6] [INFO] [1710336019.071591996] [r0.icp_odometry]: Odom: ratio=0.813398, std dev=0.020097m|0.006355rad, update time=0.054515s
[icp_odometry-6] [INFO] [1710336019.200115369] [r0.icp_odometry]: Odom: ratio=0.855062, std dev=0.010218m|0.003231rad, update time=0.086890s
[icp_odometry-6] [INFO] [1710336019.275027799] [r0.icp_odometry]: Odom: ratio=0.865267, std dev=0.008463m|0.002676rad, update time=0.058157s
[icp_odometry-6] [INFO] [1710336019.380890743] [r0.icp_odometry]: Odom: ratio=0.804389, std dev=0.018245m|0.005770rad, update time=0.063889s
[icp_odometry-6] [INFO] [1710336019.466511546] [r0.icp_odometry]: Odom: ratio=0.810726, std dev=0.015757m|0.004983rad, update time=0.055170s
[icp_odometry-6] [INFO] [1710336019.576079360] [r0.icp_odometry]: Odom: ratio=0.788371, std dev=0.025794m|0.008157rad, update time=0.056330s
[icp_odometry-6] [INFO] [1710336019.682900640] [r0.icp_odometry]: Odom: ratio=0.763047, std dev=0.025384m|0.008027rad, update time=0.060754s
[icp_odometry-6] [INFO] [1710336019.774238672] [r0.icp_odometry]: Odom: ratio=0.775353, std dev=0.027019m|0.008544rad, update time=0.061923s
[icp_odometry-6] [INFO] [1710336019.878271119] [r0.icp_odometry]: Odom: ratio=0.785862, std dev=0.028542m|0.009026rad, update time=0.059873s
[icp_odometry-6] [INFO] [1710336019.975120703] [r0.icp_odometry]: Odom: ratio=0.793994, std dev=0.030266m|0.009571rad, update time=0.056719s
[icp_odometry-6] [INFO] [1710336020.070610546] [r0.icp_odometry]: Odom: ratio=0.810036, std dev=0.017166m|0.005428rad, update time=0.059316s
[icp_odometry-6] [INFO] [1710336020.173797397] [r0.icp_odometry]: Odom: ratio=0.787018, std dev=0.022822m|0.007217rad, update time=0.056972s
[icp_odometry-6] [INFO] [1710336020.284733045] [r0.icp_odometry]: Odom: ratio=0.785529, std dev=0.025158m|0.007956rad, update time=0.067529s
[icp_odometry-6] [INFO] [1710336020.379027744] [r0.icp_odometry]: Odom: ratio=0.829617, std dev=0.013219m|0.004180rad, update time=0.067102s
[icp_odometry-6] [INFO] [1710336020.475179823] [r0.icp_odometry]: Odom: ratio=0.798157, std dev=0.017382m|0.005497rad, update time=0.055789s
[icp_odometry-6] [INFO] [1710336020.580614468] [r0.icp_odometry]: Odom: ratio=0.819435, std dev=0.013082m|0.004137rad, update time=0.059699s
[icp_odometry-6] [INFO] [1710336020.668392923] [r0.icp_odometry]: Odom: ratio=0.780584, std dev=0.020217m|0.006393rad, update time=0.056505s
[icp_odometry-6] [INFO] [1710336020.776239131] [r0.icp_odometry]: Odom: ratio=0.715491, std dev=0.028406m|0.008983rad, update time=0.058578s
[icp_odometry-6] [INFO] [1710336020.884658288] [r0.icp_odometry]: Odom: ratio=0.665277, std dev=0.041809m|0.013221rad, update time=0.056958s
[icp_odometry-6] [INFO] [1710336020.990652176] [r0.icp_odometry]: Odom: ratio=0.695016, std dev=0.045566m|0.014409rad, update time=0.078434s
[icp_odometry-6] [INFO] [1710336021.217013093] [r0.icp_odometry]: Odom: ratio=0.656774, std dev=0.044618m|0.014109rad, update time=0.191364s
[icp_odometry-6] [INFO] [1710336021.282141678] [r0.icp_odometry]: Odom: ratio=0.619318, std dev=0.046023m|0.014554rad, update time=0.058816s
[icp_odometry-6] [INFO] [1710336021.373228884] [r0.icp_odometry]: Odom: ratio=0.693878, std dev=0.041640m|0.013168rad, update time=0.055270s
[icp_odometry-6] [INFO] [1710336021.475833546] [r0.icp_odometry]: Odom: ratio=0.702339, std dev=0.039409m|0.012462rad, update time=0.057281s
[icp_odometry-6] [INFO] [1710336021.570721821] [r0.icp_odometry]: Odom: ratio=0.677972, std dev=0.045095m|0.014260rad, update time=0.056651s
[icp_odometry-6] [WARN] [1710336021.574774375] [r0.icp_odometry]: icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set.
[icp_odometry-6] icp_odometry subscribed to /scan and /r0/pointcloud (make sure only one of this topic is published, otherwise remap one to a dummy topic name).
[icp_odometry-6] [INFO] [1710336021.675071500] [r0.icp_odometry]: Odom: ratio=0.622542, std dev=0.051862m|0.016400rad, update time=0.055870s
[icp_odometry-6] [INFO] [1710336021.779550692] [r0.icp_odometry]: Odom: ratio=0.670471, std dev=0.044309m|0.014012rad, update time=0.061832s
[icp_odometry-6] [INFO] [1710336021.890915856] [r0.icp_odometry]: Odom: ratio=0.684743, std dev=0.046803m|0.014800rad, update time=0.077257s
[icp_odometry-6] [INFO] [1710336021.976210219] [r0.icp_odometry]: Odom: ratio=0.667277, std dev=0.046096m|0.014577rad, update time=0.058014s
[icp_odometry-6] [INFO] [1710336022.076359082] [r0.icp_odometry]: Odom: ratio=0.685892, std dev=0.043775m|0.013843rad, update time=0.057239s
[icp_odometry-6] [INFO] [1710336022.175891374] [r0.icp_odometry]: Odom: ratio=0.687365, std dev=0.043142m|0.013643rad, update time=0.064732s
[icp_odometry-6] [INFO] [1710336022.274836398] [r0.icp_odometry]: Odom: ratio=0.661222, std dev=0.045502m|0.014389rad, update time=0.057747s
[icp_odometry-6] [INFO] [1710336022.381702324] [r0.icp_odometry]: Odom: ratio=0.629953, std dev=0.049380m|0.015615rad, update time=0.065285s
[icp_odometry-6] [INFO] [1710336022.468387605] [r0.icp_odometry]: Odom: ratio=0.626943, std dev=0.048521m|0.015344rad, update time=0.056395s
The warning icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set
seems indicate rtabmap
doesn't receive the lidar data.
However, the lidar data's topic pulishes pointclouds just fine.
$ ros2 topic hz /r0/pointcloud
average rate: 7.498
min: 0.091s max: 0.409s std dev: 0.09778s window: 9
average rate: 8.603
min: 0.090s max: 0.409s std dev: 0.06945s window: 19
average rate: 9.092
min: 0.086s max: 0.409s std dev: 0.05611s window: 30
average rate: 8.889
min: 0.086s max: 0.409s std dev: 0.05733s window: 40
Then I use rqt_graph
to check the ROS graph, where I find the pose_graph_manager
will publish the topic /r0/cslam/keyframe_odom
and map_manager
will subscribe to it.
However, the topic /r0/cslam/keyframe_odom
doesn't publish any data, which confirmed that the rtabmap
doesn't run correctly.
$ ros2 topic echo /r0/cslam/keyframe_odom
I have no idea why rtabmap doesn't receive the lidar data when it's published correctly.
rtabmap can't activate visualization
In rtabmap_s3e_lidar_odometry.launch.py
, rtabmapviz
is set to true
. But when I launch this launch file, rviz doesn't show up.
Intead, using rtabmap source launch file with ros2 launch rtabmap_launch rtabmap.launch.py
can activate the rviz.
I don't know why the rtabmap_s3e_lidar_odometry.launch.py
doesn't activate rviz.
@lajoiepy Any help will be appreciated! Thank you!
Odometry works fine but no visualization
First, I have to correct my wrong judgement above. According the link, actually the above warning icp_odometry: Did not receive data since 5 seconds! Make sure the input topics are published
doesn't mean the odometry mulfunctions. Setting use_sim_time
to true
in rtabmap_s3e_lidar_odometry.launch.py
can mute these warnings.
The odom topic is published normally.
$ ros2 topic echo /r0/odom | grep position -A3
position:
x: 60.38409423828125
y: -96.45026397705078
z: 22.329843521118164
--
position:
x: 60.287715911865234
y: -96.53614044189453
z: 22.338281631469727
--
position:
x: 60.1495246887207
y: -96.63011932373047
z: 22.352752685546875
--
position:
x: 60.008033752441406
y: -96.71749877929688
z: 22.359445571899414
--
position:
x: 59.893531799316406
y: -96.8121109008789
z: 22.371158599853516
So I want to check the map built by the odometry. But ros2 topic hz /r0/odom_local_map
shows nothing. Using cslam_visualization
yields nothing as well. Logs and rviz are shown below.
$ ros2 launch cslam_visualization visualization_lidar.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2024-03-14-07-44-38-357204-focal-fossa-382468
[INFO] [launch]: Default logging verbosity is set to INFO
/Swarm-SLAM/install/cslam_visualization/share/cslam_visualization/config/lidar.rviz
[INFO] [visualization_node.py-1]: process started with pid [382469]
[INFO] [rviz2-2]: process started with pid [382471]
[rviz2-2] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[rviz2-2] amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
[rviz2-2] If they do, bad things may happen!
[rviz2-2] amdgpu: drmGetDevice2 failed.
[rviz2-2] [INFO] [1710402278.786154731] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-2] [INFO] [1710402278.786377196] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-2] [INFO] [1710402278.824423561] [rviz2]: Stereo is NOT SUPPORTED
[visualization_node.py-1] [INFO] [1710402280.481047464] [cslam_visualization]: rotation_to_sensor_frame: [0.5, -0.5, 0.5, -0.5]
[visualization_node.py-1] [INFO] [1710402280.481894046] [cslam_visualization]: Initialization done.
[visualization_node.py-1] [INFO] [1710402285.365301625] [cslam_visualization]: Publishing 0 pointclouds.
[visualization_node.py-1] [INFO] [1710402290.364881388] [cslam_visualization]: Publishing 0 pointclouds.
[visualization_node.py-1] [INFO] [1710402295.364725938] [cslam_visualization]: Publishing 0 pointclouds.
[visualization_node.py-1] [INFO] [1710402300.364767124] [cslam_visualization]: Publishing 0 pointclouds.
[visualization_node.py-1] [INFO] [1710402305.364765231] [cslam_visualization]: Publishing 0 pointclouds.
[visualization_node.py-1] [INFO] [1710402310.365180516] [cslam_visualization]: Publishing 0 pointclouds.
Can you post your Swarm-SLAM config file? Check if you enabled visualization
@lajoiepy The config file graco_lidar.yaml
is shown below. visualization.enable
is set to true by default.
/**:
ros__parameters:
frontend:
odom_topic: "odom"
sensor_type: "lidar"
pointcloud_topic: "pointcloud"
voxel_size: 0.5
registration_min_inliers: 60
inter_robot_loop_closure_budget: 1
inter_robot_detection_period_sec: 5
enable_sparsification: true
max_queue_size: 10
similarity_threshold: 0.8
global_descriptors_topic: "global_descriptors"
intra_loop_min_inbetween_keyframes: 20
detection_publication_period_sec: 0.5
detection_publication_max_elems_per_msg: 100
enable_intra_robot_loop_closures: true
keyframe_generation_ratio_distance: 0.5
pointcloud_odom_approx_time_sync_s: 0.1
use_vertex_cover_selection: true
map_manager_process_period_ms: 100
global_descriptor_technique: "scancontext"
neighbor_management:
enable_neighbor_monitoring: true
max_heartbeat_delay_sec: 5.0
init_delay_sec: 5.0
heartbeat_period_sec: 1.0
backend:
pose_graph_optimization_start_period_ms: 10000
pose_graph_optimization_loop_period_ms: 100
max_waiting_time_sec: 3600
enable_broadcast_tf_frames: true
evaluation:
enable_logs: true
log_folder: "results"
enable_gps_recording: false
gps_topic: "gps/fix"
enable_sparsification_comparison: false
visualization:
enable: true
publishing_period_ms: 1000
Do you have any errors when you launch the visualization package? https://github.com/lajoiepy/cslam_visualization
When I type ros2 launch cslam_visualization visualization_lidar.launch.py
, the cslam_visualization package doesn't report any error. But rviz seems to complain about my gpu. Yet rviz interface pops out normally. The logs and rviz interface is shown below.
root@focal-fossa:/# ros2 launch cslam_visualization visualization_lidar.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2024-03-23-03-37-54-376452-focal-fossa-10518
[INFO] [launch]: Default logging verbosity is set to INFO
/Swarm-SLAM/install/cslam_visualization/share/cslam_visualization/config/lidar.rviz
[INFO] [visualization_node.py-1]: process started with pid [10519]
[INFO] [rviz2-2]: process started with pid [10521]
[rviz2-2] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[rviz2-2] amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
[rviz2-2] If they do, bad things may happen!
[rviz2-2] amdgpu: drmGetDevice2 failed.
[rviz2-2] [INFO] [1711165074.825419596] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-2] [INFO] [1711165074.825701006] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-2] [INFO] [1711165074.860264893] [rviz2]: Stereo is NOT SUPPORTED
[visualization_node.py-1] [INFO] [1711165076.345212321] [cslam_visualization]: rotation_to_sensor_frame: [0.5, -0.5, 0.5, -0.5]
[visualization_node.py-1] [INFO] [1711165076.345676968] [cslam_visualization]: Initialization done.
[visualization_node.py-1] [INFO] [1711165081.248205032] [cslam_visualization]: Publishing 0 pointclouds.
I finally found the reason why cslam_visualization didn't display any information.
In cslam_lidar.launch.py
line 38, it remaps /r0/pointcloud
to /points
. However, in lidar_handler_node.py
line 29, the ApproximateTimeSynchronizer
still subscribes to the topic /r0/pointcloud
, which has been remapped to /points
. So the lidar_callback
function in lidar_handler_node.py
is never called.
The following wrong rqt_graph shows node /r0/cslam_map_manager
doesn't even subscribe to any lidar topic.
When I remove the remappings, things seem to be back on track. The new rqt_graph shows that /r0/cslam_map_manager
can subscribe to lidar topic correctly now.
Here is the final trajectory visualized by cslam_visualization
after all three graco bags ran over and all the loop closures were done.
Yet, the trajectories should be wrong, since they are actually not in the same plane. Maybe it's because the odometry is not real-time on my computer. It can be seen that the odometry can only run at a rate of around 2~3Hz even no loop have been detected.
[icp_odometry-6] [INFO] [1711546109.177350137] [r0.icp_odometry]: Odom: ratio=0.433020, std dev=0.057857m|0.018296rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546109.641444070] [r0.icp_odometry]: Odom: ratio=0.516837, std dev=0.050595m|0.016000rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546110.126337347] [r0.icp_odometry]: Odom: ratio=0.484840, std dev=0.053708m|0.016984rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546110.597401408] [r0.icp_odometry]: Odom: ratio=0.472437, std dev=0.057664m|0.018235rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546110.815501746] [r0.icp_odometry]: Odom: ratio=0.517016, std dev=0.049948m|0.015795rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546111.172892491] [r0.icp_odometry]: Odom: ratio=0.576974, std dev=0.046333m|0.014652rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546111.712104702] [r0.icp_odometry]: Odom: ratio=0.543582, std dev=0.048948m|0.015479rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546112.078467445] [r0.icp_odometry]: Odom: ratio=0.465846, std dev=0.052607m|0.016636rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546112.534179020] [r0.icp_odometry]: Odom: ratio=0.574168, std dev=0.040468m|0.012797rad, update time=0.000000s
[icp_odometry-6] [INFO] [1711546112.930852585] [r0.icp_odometry]: Odom: ratio=0.506273, std dev=0.054459m|0.017221rad, update time=0.000000s
I'll try to run the algorithm on a more advanced computer later.
I met the visualization problem as well, could you list the order and command as well?
Thanks
@HaynesLi Actually for my case it's quite easy to fix the visualization problem.
- Remove
cslam_lidar.launch.py
line 38-40. - Rebuild:
colcon build
Then cslam_visualization
works fine.
Hope it'll help you.
@HaynesLi Actually for my case it's quite easy to fix the visualization problem.
1. Remove [`cslam_lidar.launch.py` line 38-40](https://github.com/lajoiepy/cslam_experiments/blob/6a576a6ad040036b6b71691e1fa01b7b79e5d828/launch/cslam/cslam_lidar.launch.py#L38). 2. Rebuild: `colcon build`
Then
cslam_visualization
works fine.Hope it'll help you.
It seems that you don't use the Graco ros2bag to run, right?
These following processes are what I have done.
Configuration:
I created the three folders named Graco-0, Graco-1 and Graco-2 under the /src/cslam_experiments/data/Graco_Ground/ , where I put my symlinks to the first three ROS2bags datasets that I downloaded from the GRACO datasets website (Ground-01, Ground-02 and Ground-03).
I also had to do the same in the /install/cslam_experiments/share/cslam_experiments/data/Graco_Ground/ folder to be able to run the experiment without errors of missing data.
Execution:
I launch the simulation executing ros2 launch cslam_experiments graco_lidar.launch.py .
I launch the visualization with ros2 launch cslam_visualization visualization.laun
@HaynesLi I also used the graco dataset and launched the same launch file as you did.
@HaynesLi If you still have the visualization problem after following the above instruction, I suggest you check your rqt_graph to make sure the message flow is normal.
The code of this project is different from what I cloned before 5 months. In my codes, there is no remappings function just like you mentioned. It still can not be visualized. Can this project really be processed?
I installed Swarm-SLAM on docker and ran the graco example with visualization successfully, except for the bad real-time performance. If you want to try, maybe you could refer to my previous experience on issue #30.
I installed Swarm-SLAM on docker and ran the graco example with visualization successfully, except for the bad real-time performance. If you want to try, maybe you could refer to my previous experience on issue #30.
I run in docker as well. Now I found the problem. The data might not transport between 2 terminal windows even if these two windows exec the same docker container.
But the new problem to me is I don't know how to run the launch command in backend so that the running process will not be interrupted. Do you have any ideas?
If I do not run it in the backend, I can not run the visualization command in the same terminal.
I launch graco_lidar.launch.py
and cslam_visualization
in two separate terminals. I think there's no data transport problem.
I launch
graco_lidar.launch.py
andcslam_visualization
in two separate terminals. I think there's no data transport problem.
I tried 2 times with different visualization command in i) and ii)
i)
Step 1: ros2 launch cslam_experiments graco_lidar.launch.py
step2: ros2 launch cslam_visualization visualization_lidar.launch.py
ii)
Step 1: ros2 launch cslam_experiments graco_lidar.launch.py
Step2: ros2 launch cslam_visualization visualization_lidar.launch.py
ii)
It seems your cslam_visualization
package can't find rclpy module. Maybe you should try to fix that first.