points-to-ros and points-from-ros are utilities for publishing and receiving PointCloud2 message on ROS.
To build them you need to set "snark_build_ros" to ON in snark cmake.
we use snark-graphics-test-pattern to generate some sample points in a cube:
Here is the output: cube.csv
To run ROS, you need to setup the environment and run roscore:
This utility subscribes to the specified topic and receives PointCloud2 messages, then it writes the point data as csv or binary to stdout.
Either --binary or --format option must be specified, which sets the output to be binary or ascii csv respectively.
The field names and message format are embedded in the message, the format is used for conversion.
You can use --output-fields or --output-format to get the field names and message format from message (the publisher must be running).
This utility reads binary or ascii csv data from stdin and publishes it as PointCloud2 message on ROS.
Either --binary or --format option must be specified, which indicates whether input is binary or ascii.
The --fields options specifies the field names for one point in the message.
If a field named block is present it will be used for breaking records into separate messages, records with the same block number will be grouped into one message. When no such field is present it will read the stdin until EOF and then send one message.
The --hang-on option delays the points-to-ros exit, so that the clients can receive all the data on the last message.
this utility can directly cat binary data from a ros bag file