Does ROS have anything similar to a "global variable"?
I created a node that subscribes data from 3 other nodes (2 nodes publish data in 30Hz while 1 node publishes in about 10Hz). The node I created uses a transformation matrix(4x4) from the slower node (10Hz) to transform data from other 2 faster nodes (30Hz) and publishes them. The problem is that I don't need every single transformation matrix (but occasionally) from the data stream of the slower node and I also don't want this one becomes a bottleneck of this entire process by using message filter time_sync. So, I wonder whether ROS has something similar to a global variable that sits in one place and can be read or modified so that the node I created doesn't have to wait until all data from 3 other nodes get subscribed.
I don't think there's a global variable concept in ROS1 for this purpose. Could you perhaps limit the publishing rate of the 10Hz node itself since you want to use it at a lower rate anyway? Or you could have a wrapper node around the 10Hz node that implements that rate reduction and/or potentially caches the transform matrix.
Thank you for the verification! The reason why I want to find something like global variable is to avoid the lower rate publishing.