subcribing to 2 topics and publishing selected data in same node
hello everyone. i have two messages publishing on their message with their topic name. now i want to subscribe these two topics and publish a new topic which will take some selected data from one topic and selected data from other, then publish the new message. i can subscribe to a topics, assign some new values and publish the new message but i am unable to do the above problem.
Is it possible?
if yes, then let's take
geometry_msgs
.Topic1
givesPoint
andTopic2
givesPoint and Twist
. how can i create anew geometry_msg
that subscribe to both and produce a new message such thatPoint is from topic1
andTwist is from topic2
.