how to deal with two topics' messages we subscribed in a code in ros ?
I created a node in a code,it subscribes two different topics,how can i do?For example,i want to subscribe the robot's pose and local map to make path planning,this two topics publish different frequencies,how can i do in a code?
ros::Subscriber getodomdata = local_planner_handle_getdata_.subscribe("vehiclePose",1000,getodomdatacallback);
ros::Subscriber getmapdata = local_planner_handle_getdata_.subscribe("local_map", 1000, OccupancyGridCallback);
How can i do the two callback functions? Thanks a lot
Your code looks ok, but you also show only a very small part of it. What happens?
yes,thank you,i just want to ask how to handle these two topics' messages because they are published in different frequencies,thank you