GetMotionLinkTimeInfo#

Gets the time synchronization state of the motion link, to check how well the global times of its client and server agree. The goal is empty.

Three timestamps of one request and its reply, all in global time, bracket when the server read its clock: the client writes the request’s first byte at client_request_tx_start_global_ns, the server finishes receiving it at server_request_rx_end_global_ns, and the client finishes receiving the reply at client_reply_rx_end_global_ns. With rtt = client_reply_rx_end - client_request_tx_start, the server’s global time minus the client’s at the same instant is server_request_rx_end - (client_request_tx_start + rtt / 2), give or take rtt / 2.

Kind:

Action

ROS type:

interfaces/action/GetMotionLinkTimeInfo

Python:

from interfaces.action import GetMotionLinkTimeInfo

C++:

#include "interfaces/action/get_motion_link_time_info.hpp"

Goal#

No fields.

Result#

Field

Type

Description

status_code

int8

0 if the reply arrived; otherwise, the P2P status code of the failure, and the other fields are 0.

client_local_to_global_offset_ns

uint64

Offsets that each end adds to its local time to get its global time, in nanoseconds. Each end’s local time counts from when it started.

server_local_to_global_offset_ns

uint64

Same as client_local_to_global_offset_ns.

client_request_tx_start_global_ns

uint64

Timestamps of the request and its reply, in global nanoseconds. The client’s are converted with its offset when the reply arrived, and the server’s with its offset when the request arrived.

server_request_rx_end_global_ns

uint64

Same as client_request_tx_start_global_ns.

client_reply_rx_end_global_ns

uint64

Same as client_request_tx_start_global_ns.

server_request_rx_end_ros_ns

uint64

server_request_rx_end_global_ns converted to ROS time, in nanoseconds since the Unix epoch, as the client’s node converts the server’s stamps before publishing them. A ROS node that calls the action can check it against its own clock to see whether both nodes stamp in the same time base.

Feedback#

No fields.

Used on#

Definition
# Request
# Gets the time synchronization state of the motion link, to check how well the global times of its
# client and server agree. The goal is empty.
#
# Three timestamps of one request and its reply, all in global time, bracket when the server read its
# clock: the client writes the request's first byte at client_request_tx_start_global_ns, the server
# finishes receiving it at server_request_rx_end_global_ns, and the client finishes receiving the
# reply at client_reply_rx_end_global_ns. With rtt = client_reply_rx_end - client_request_tx_start,
# the server's global time minus the client's at the same instant is
#   server_request_rx_end - (client_request_tx_start + rtt / 2), give or take rtt / 2.

---
# Result

# 0 if the reply arrived; otherwise, the P2P status code of the failure, and the other fields are 0.
int8 status_code

# Offsets that each end adds to its local time to get its global time, in nanoseconds. Each end's
# local time counts from when it started.
uint64 client_local_to_global_offset_ns
uint64 server_local_to_global_offset_ns

# Timestamps of the request and its reply, in global nanoseconds. The client's are converted with
# its offset when the reply arrived, and the server's with its offset when the request arrived.
uint64 client_request_tx_start_global_ns
uint64 server_request_rx_end_global_ns
uint64 client_reply_rx_end_global_ns

# server_request_rx_end_global_ns converted to ROS time, in nanoseconds since the Unix epoch, as the
# client's node converts the server's stamps before publishing them. A ROS node that calls the action
# can check it against its own clock to see whether both nodes stamp in the same time base.
uint64 server_request_rx_end_ros_ns

---
# Feedback