Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Filter dropping message: frame '' at time 0.000 for reason 'the frame id of the message is empty' #102

Open
ming0071 opened this issue Nov 27, 2024 · 3 comments

Comments

@ming0071
Copy link

ming0071 commented Nov 27, 2024

Required Info:

Operating System:
Ubuntu 22.04.4 LTS
ROS2 Version:
ROS_DISTRO=humble

Hello, I encountered an issue while running my lidarslam setup. In the terminal, I see the following error:

[rviz]: Message Filter dropping message: frame '' at time 0.000 for reason 'the frame id of the message is empty'

Below is the detailed context:

my rqt_graph

image

tf tree

image

lidarslam.launch.py

import os

import launch
import launch_ros.actions

from ament_index_python.packages import get_package_share_directory


def generate_launch_description():

    main_param_dir = launch.substitutions.LaunchConfiguration(
        "main_param_dir",
        default=os.path.join(
            get_package_share_directory("lidarslam"), "param", "lidarslam.yaml"
        ),
    )

    rviz_param_dir = launch.substitutions.LaunchConfiguration(
        "rviz_param_dir",
        default=os.path.join(
            get_package_share_directory("lidarslam"), "rviz", "mapping.rviz"
        ),
    )

    mapping = launch_ros.actions.Node(
        package="scanmatcher",
        executable="scanmatcher_node",
        parameters=[main_param_dir],
        remappings=[("/input_cloud", "/velodyne_points")],
        output="screen",
    )

    tf = launch_ros.actions.Node(
        package="tf2_ros",
        executable="static_transform_publisher",
        arguments=["0", "0", "0", "0", "0", "0", "1", "base_link", "VLP16_link"],
    )

    graphbasedslam = launch_ros.actions.Node(
        package="graph_based_slam",
        executable="graph_based_slam_node",
        parameters=[main_param_dir],
        output="screen",
    )

    rviz = launch_ros.actions.Node(
        package="rviz2", executable="rviz2", arguments=["-d", rviz_param_dir]
    )

    return launch.LaunchDescription(
        [
            launch.actions.DeclareLaunchArgument(
                "main_param_dir",
                default_value=main_param_dir,
                description="Full path to main parameter file to load",
            ),
            mapping,
            tf,
            graphbasedslam,
            rviz,
        ]
    )

terminal log

[INFO] [launch]: All log files can be found below /home/scl/.ros/log/2024-11-27-20-57-51-725323-ROG-47113
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [scanmatcher_node-1]: process started with pid [47114]
[INFO] [static_transform_publisher-2]: process started with pid [47116]
[INFO] [graph_based_slam_node-3]: process started with pid [47118]
[INFO] [rviz2-4]: process started with pid [47120]
[static_transform_publisher-2] [WARN] [1732712271.766055027] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-2] [INFO] [1732712271.780805895] [static_transform_publisher_UbBqBZhgn6EKDQ22]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.000000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'VLP16_link'
[scanmatcher_node-1] registration_method:NDT
[scanmatcher_node-1] ndt_resolution[m]:2
[scanmatcher_node-1] ndt_num_threads:2
[scanmatcher_node-1] gicp_corr_dist_threshold[m]:5
[scanmatcher_node-1] trans_for_mapupdate[m]:1.5
[scanmatcher_node-1] vg_size_for_input[m]:0.5
[scanmatcher_node-1] vg_size_for_map[m]:0.1
[scanmatcher_node-1] use_min_max_filter:true
[scanmatcher_node-1] scan_min_range[m]:1
[scanmatcher_node-1] scan_max_range[m]:200
[scanmatcher_node-1] set_initial_pose:true
[scanmatcher_node-1] publish_tf:true
[scanmatcher_node-1] use_odom:false
[scanmatcher_node-1] use_imu:false
[scanmatcher_node-1] scan_period[sec]:0.2
[scanmatcher_node-1] debug_flag:false
[scanmatcher_node-1] map_publish_period[sec]:15
[scanmatcher_node-1] num_targeted_cloud:20
[scanmatcher_node-1] ------------------
[scanmatcher_node-1] [INFO] [1732712271.793065089] [scan_matcher]: initialize Publishers and Subscribers
[scanmatcher_node-1] [INFO] [1732712271.796165658] [scan_matcher]: initialization end
[graph_based_slam_node-3] [INFO] [1732712271.810400435] [graph_based_slam]: initialization start
[graph_based_slam_node-3] registration_method:NDT
[graph_based_slam_node-3] voxel_leaf_size[m]:0.1
[graph_based_slam_node-3] ndt_resolution[m]:1
[graph_based_slam_node-3] ndt_num_threads:2
[graph_based_slam_node-3] loop_detection_period[Hz]:3000
[graph_based_slam_node-3] threshold_loop_closure_score:0.7
[graph_based_slam_node-3] distance_loop_closure[m]:100
[graph_based_slam_node-3] range_of_searching_loop_closure[m]:20
[graph_based_slam_node-3] search_submap_num:2
[graph_based_slam_node-3] num_adjacent_pose_cnstraints:5
[graph_based_slam_node-3] use_save_map_in_loop:true
[graph_based_slam_node-3] debug_flag:true
[graph_based_slam_node-3] ------------------
[graph_based_slam_node-3] [INFO] [1732712271.810796157] [graph_based_slam]: initialize Publishers and Subscribers
[graph_based_slam_node-3] [INFO] [1732712271.813243896] [graph_based_slam]: initialization end
[rviz2-4] [INFO] [1732712271.979748395] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-4] [INFO] [1732712271.979793577] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-4] [INFO] [1732712271.992394338] [rviz2]: Stereo is NOT SUPPORTED
[scanmatcher_node-1] [INFO] [1732712272.049361438] [scan_matcher]: create a first map
[rviz2-4] [INFO] [1732712272.090679859] [rviz]: Message Filter dropping message: frame '' at time 0.000 for reason 'the frame id of the message is empty'

Additionally, the /scan_matcher node shows the following parameter:

ros2 param get /scan_matcher global_frame_id
String value is: map
@ShameerMasroor
Copy link

Hello,

I am having much of the same issue.
How did you get map frame to be published? RVIZ does not see the map frame.

image

@rsasaki0109
Copy link
Owner

It seems that ming0071's issue is puzzling since the map appears to be created. Could it be related to the timestamp or frame ID of the scan point cloud topic? This might be more of a ROS2-related issue than a problem specific to this package, so posting a question on Robotics Stack Exchange could be a good idea.

As for ShameerMasroor, the first step would be to check the terminal output to confirm whether the map is being generated.

@ShameerMasroor
Copy link

ShameerMasroor commented Dec 4, 2024

As for ShameerMasroor, the first step would be to check the terminal output to confirm whether the map is being generated.

I checked the map on the terminal. Echoing the map topic produces no output on the terminal.

I printed the transform tree which is as follows:
image

It seems as if the map frame is not being published.
In short, I wish to understand what changes are required to the code shared on your github to get it to work on my machine. I am working on using your work for forest mapping using a drone. My lidar scan topic is /simple_drone/scan, and I simply used the launch file to remap this scan topic to the /input_cloud parameter taken in by the scan matcher. However, it seems that some more transform frames are required.

I shall make another post in issues for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants