0
$\begingroup$

Rosanswers logo

Hi, I am trying to communicate between a ROS2 machine(Linux VM) and a non ROS machine(Host Windows). I have configured the network connections. When I install ROS on the windows machine as well, and run a demo talker on Windows and a listener on Linux, they communicate. Now when I try to run the demo talker using rclpy, it doesnt.

In windows, from the terminal, I run the demo_nodes_py talker.py and I get the error : Traceback (most recent call last): File "listener.py", line 17, in <module> import rclpy ModuleNotFoundError: No module named 'rclpy'

Any idea how to use the rclpy API ? What am I doing wrong here ?


Originally posted by vishal_rawat on ROS Answers with karma: 5 on 2018-06-10

Post score: 0


Original comments

Comment by gvdhoorn on 2018-06-10:\

When I install ROS on the windows machine as well

I don't understand: how is something a "non-ROS machine" if you install ROS2 on it?

Comment by vishal_rawat on 2018-06-11:
Just to check if the communication works on 2 different ROS2 machines, i installed ROS2 also on Windows...so that works...but now I dont need to use ROS2 rather only its API (rclpy) @gvdhoorn

Comment by Geoff on 2018-08-12:
Not using ROS2 but only its API does not make sense. If you use rclpy, you are using ROS2.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Are you going through all the steps to enable ROS2 in your command shell before trying to run the rclpy demo? You especially must run call C:\dev\ros2\local_setup.bat first.


Originally posted by Geoff with karma: 4203 on 2018-08-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.