Author: User discussions Date: To: ros-users Subject: [ros-users] GenericPublisher using ShapeShifter and
SerializedMessage
Hi there,
I want to write a generic publisher that is able to publish ros-topics
where each instance of this class publishes topics of different message
types (e.g. pub_1 publishes std_msg::Int32, pub_2 publishes
sensor_msgs::PointCloud2,...).
After that I would like to publish the topic somehow:
m_genericRosTopic_publisher.publish(msg);
Publishing like this doesn't work. I guess there is still something
missing. But it seems that everything I need is already there (somewhere
in roscpp), but I am not able to put the puzzle together.
Can someone help me out here, by clarifying the correct usage of
topic_tools::ShapeShifter, ros::SerializedMessage and ros::Publisher?