ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Where can I set the endpoints for pub&sub in rclpy lib so that my publisher on windows can send data to the listener running on Linux VM.
I believe you're misunderstanding how publish-subscribe works. In contrast to approaches where there are clients and servers, pub-sub systems are (comparable to) peer-to-peer. DDS (the default middleware for ROS2) then adds auto-discovery of domain participants (ie: nodes (but really: publishers and subscribers)).
So to answer your question: you don't.
The only thing you need to do is make sure that all involved hosts are on the same network segment and things "should just work".