Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

rviz2 dropping odometry message for reason unknown

Discussion in 'Robotics' started by Nitsan448, Jan 18, 2022.

  1. Nitsan448

    Nitsan448

    Joined:
    Aug 22, 2019
    Posts:
    14
    Hello. I am trying to publish odometry, and I can see it being published using 'ros2 topic echo odom'. However for some reason when trying to see it in rviz2 it always drops the message.

    [INFO] [1642496643.373470893] [rviz]: Message Filter dropping message: frame 'odom' at time 1642496642.798 for reason 'Unknown'

    This is the part of my code that sets the odometry message.
    Code (CSharp):
    1.     private void SetOdometryHeader()
    2.     {
    3.         _odometryMsg.header = _odometryHeader;
    4.         _odometryMsg.header.frame_id = "odom";
    5.     }
    6.     private void PublishOdometry()
    7.     {
    8.         _movementController.UpdateOdometryMsg(_odometryMsg);
    9.         SetHeaderTime(_odometryHeader);
    10.         _rosConn.Publish("odom", _odometryMsg);
    11.     }
    Did anyone run into a similar problem or know what could be the issue?