subscribe to a topic without specifying type
Hi,
is is possible to subscribe to a specific topic, without specifying the message type?
I need to pass the message to a Lua interpreter, and I want to avoid having one C++ function for each type I want to subscribe (which would be every message in actionlib_msgs, control_msgs, diagnostic_msgs, geometry_msgs, map_msgs, nav_msgs, pcl_msgs, sensor_msgs, shape_msgs, std_msgs, tf2_geometry_msgs, tf2_msgs, tf2_sensor_msgs, trajectory_msgs, visualization_msgs)
Have you seen wiki/roslua? It's a bit old (although the lua-5.2 branch is pretty recent), but it could provide you with some idea of how to tackle this.