ark-spy and ark-put

While you can interact with pipelines via connecting with websockets or making HTTP PUT requests (assuming the HttpServerStage is in your pipeline), it can be convenient to use CLI wrappers for these tools.

This page walks over reading and writing messages.

ark-spy

This tool allows you to dump messages from the pipeline onto the command line. Messages must be serializable to do so.

$ ./build/ark-spy -c /time/global_time --count 2
[
{
  "estimated_time": 1640803867126955637,
  "pipeline_time": 8478014087,
  "quality": "Ntp"
},
{
  "estimated_time": 1640803868128100042,
  "pipeline_time": 9479244904,
  "quality": "Ntp"
}
]

The above command reads messages from /time/global_time, for a total of two messages, and then exits. The JSON is formatted in an array, so you can post-process the results with tools like jq:

$ ./build/ark-spy -c /time/global_time --count 2 | jq '.[] | .estimated_time'
1640803867126955637
1640803868128100042

You can also connect to remote hosts with the --host method, useful for communicating with remote robots.

ark-put

This tool allows you to inject messages into the pipeline. For example, you can use this to start/stop logs from the command line, write annotations, etc.

$ echo '{"comment": "Hello there"}' | ./build/ark-put -c /annotations/add

This corresponds roughly to an rbuf that contains:

schema Annotation
{
    steady_time_point pipeline_time;
    system_time_point global_time;
    string comment;
}

As you can see, not all fields are necessary to be populated, those will simply have default values.