ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    timestamps for ros messages in voxl_mpa_to_ros_node

    Ask your questions right here!
    time ros voxl-mpa-tools
    2
    3
    327
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rapit
      last edited by

      Hey,
      I noticed that the timestamps in the ros message header are always relative to boot time. Even if I synchronized the system time with the internet time or via chrony and restarted the services (dfs-server, voxl-vision-px4). Can I somehow get the system timestamps in my message? This is essential when being part of a larger ros network.

      If it is intended like that, the best way would probably to replace the stamp with some rostime in the voxl node or is there some preferred way?

      Thanks

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        Hey @rapit,

        voxl-mpa-to-ros simply republishes our MPA messages over ROS, and it reuses the timestamp that the original server gives the message. As this behavior is intended, you could replace the stamp in any interface file you are using with a rostime call, such as here in the camera interface for example: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/blob/master/catkin_ws/src/src/interfaces/camera_interface.cpp#L102

        1 Reply Last reply Reply Quote 1
        • R
          rapit
          last edited by

          Thanks for the answer, yes I already looked into the code. I was just wondering why the servers timestamp differs from the system timestamp. But then I will change the node accordingly.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB | Contributors