The message_modification packages provides ros nodes that receive ROS messages, modify the content and republish them.
message_modification