Hello, I have just started this C++ course, and despite not knowing what does the get_position method, as I would like to understand it, when called, it returns the coordinate value according to the argument you provide on the method: 1 for x coordinate, 2 for y coordinate, 3 for z coordinate.
But while doing the first exercise of the course I saw something strange that might need a fix.
The first exercise ask the user to check the position of the robot, move it and get the new position again.
The first time you run this program its perfect, if I prompt the values as logs in the ROS Network I can see:
`[INFO][<ROS_TIME>]: Initializing node.....`
`[INFO][<ROS_TIME>]: 0 and 0`
`[INFO][<ROS_TIME>]: 0.90301 and -0.0140998`
But the issue here is if I run again this node. If I donāt resent the robot position, it should print the last position we saw (0.93,-0.01), but when I run it I see the next prompt:
`[INFO][<ROS_TIME>]: Initializing node.....`
`[INFO][<ROS_TIME>]: 0 and 0`
`[INFO][<ROS_TIME>]: 1.9531 and -0.0144957`
I thought the method get_position would subscribe to the odom and check the position from it but seems it doesnāt work like that.
I just wanted to point this out just in case this behaviour wasnāt planned.
Thanks for advance and have a great day.
Ćngel