rospy talker listener
I am trying ROS across two machines and started with the rospy talker/listener exercise. I checked ssh and netcat without problem. However, there are few problems with 'remote' behaviors that I hope to get some help here.
To clarify my problems, say I have two machines A and B.
PROBLEM 1:
- Started roscore on A, export ROS_MASTER_URI=A (using IP:port).
- From A, ssh to B without problem.
- On B (ssh) export ROS_MASTER_URI=A (using IP:port) and rosrun rospy_tutorials talker.py (also tried talker) and talker talked (series of Hello World strings).
- On A, rosrun rospy_tutorials listener.py and nothing happened. rostopic list on A showed /chatter on the list.
- Tried swap listener, talker and had same behavior.
- Tried started roscore on B (ssh), updated ROS_MASTER_URI and tested above. Received same behavior.
- Then physical on machine B, tried listener on it, listener can print the messages from talker (started on B through ssh).
It appears that topic from remote connection can be found on the list however the values are not accessible. This does not seem to be connection problem as both machines can see the same master and same set of topics (list). netcat could allow communicate in both ways.
PROBLEM 2:
I exported ROS_MASTER_URI on B through ssh. When physically on B and opened new terminal, the ROS_MASTER_URI need to be re-exported, i.e. every new terminal carry a default ROS_MASTER_URI=http://localhost:11311. Am I right that this is normal Ubuntu behavior?
Thanks for any help.