如何在 YARP 中获取 Bottle 大小(元素数量)?

How to get the Bottle size (number of elements) in YARP?

我想知道是否有办法在 YARP 中获取 Bottle 的大小(元素数量)。也许有一个 function/method 可以做到这一点。我在网上搜索了一个解决方案,但没有成功。

您可以使用 yarp::os::Bottle::size().