This block samples the signal at its input and packs it into a ROS2 message of type eeros_msgs::msg::AnalogSignal
. Each time the block is run by its time domain, this message is published under a given topic name.
RosPublisherAnalogSignal<> pubAS(node, "myTopic"); // create publisher block
This block will publish a single signal together with its time stamp. Alternatively, you could publish a vector by instantiating a block with
RosPublisherAnalogSignal<Vector3> pubAS(node, "myTopic"); // create publisher block