Subscriber node do not seems to register publisher on remote machine
The setup: Similar to the ROS tutorial on writing publisher and subscriber, I have a listener node, which listens to the topic "/chatter" and talker node which publishes to "/chatter".
The problem: Things works fine when both nodes are launched on same machine, which is just WSL. Things however get peculiar when I try to launch the talker node on RPi, a remote machine. The listener and the master are both still on WSL. The listener node will not subscribe to the topic the talker node is publishing on. rqt_graph confirmed no connection between two nodes.
I had tried using "rostopic echo chatter" command on WSL and it will subscribe to the topic and echo back what is published by the remote talker node. So I am pretty sure I had the network configuration done correctly. The problem seems to be due to issue with publisher update callback by rosmaster....
Is there anything I possibly overlooked? Any guidance is utmost appreciated.
Thanks.
BTW this is the output for when "rosnode info talker" command is used
There is no connections shown, I am not sure why is that the case.
Some new information: This problem seems to only affect subscriber initiated with roscpp, not rospy.
is the remote machine has been configured to connect the master ip ?
Yes. In fact, when I do "rostopic echo chatter" on WSL it will subscribe and echo whatever that is published by the remote publisher. The subscriber only fail to do so when the subscriber is invoked from roscpp version of the subscriber. It does kinda seems like a bug within source code of ros_comm package.