Accessing data members in ROS subscriber call back class?

#1

Hi All. I am writing a simple subscriber that subscribes to “/mavros/mission/waypoints” topic. I created a class called “CallBack” where I have a callback member function. This prints the waypoint coordinates to my terminal successfully. However, I can not access the coordinates from my main function. I created a public data member called “lat_lon” and filled it with values. How can I access these values from my main() function? Having a lot of trouble and any help would be appreciated :slightly_smiling_face: