How do I make a rosserial_arduino-based subscriber read the newest message of a topic? (Edit: By "newest message" I mean the message that was published most recently.)
I tried to set the queue size of the subscriber to 1, but I couldn't find the string "queue" in the ros_lib Arduino files; and so I believe it's not a feature of rosserial_arduino.
Here's an example of a rosserial_arduino subscriber from [a rosserial_arduino tutorial](http://wiki.ros.org/rosserial_arduino/Tutorials/Blink):
ros::Subscriber sub("toggle_led", &messageCb );
void setup()
{
pinMode(13, OUTPUT);
nh.initNode();
nh.subscribe(sub);
}
↧