#include <ros/ros.h>
#include <geometry_msgs/Point.h>

void positionCallback(const geometry_msgs::Point::ConstPtr& msg) {
    ROS_INFO("Received position: x=%.2f, y=%.2f", msg->x, msg->y);
}

int main(int argc, char **argv) {
    ros::init(argc, argv, "nodeB");
    ros::NodeHandle nh;
    ros::Subscriber sub = nh.subscribe("position_topic", 10, positionCallback);
    ros::spin();
    return 0;
}