Robotics StackExchange | Archived questions

rosserial packages not available in ros

Hi All,

I am working on ROS Melodic. On running the command: rosrun rosserialpython serialnode.py /dev/ttyACM0. I'm getting an error which says No module named 'SerialClient'

Error Output

Traceback (most recent call last): File "/opt/ros/melodic/lib/rosserialpython/serialnode.py", line 39, in from rosserialpython import SerialClient, RosSerialServer File "/opt/ros/melodic/lib/python2.7/dist-packages/rosserialpython/init.py", line 1, in from SerialClient import * ModuleNotFoundError: No module named 'SerialClient'

Asked by parthchhabra on 2019-03-11 07:40:55 UTC

Comments

Answers

Hi,

I also struggled with the same question. You hopefully have solved the problem but for other users who find themselves in the same struggle, I want to give the solution.

For me, the problem was both Python 2.7 and Python 3.6 on the same system and things got mixed up. Because of it, when I ran 'rosrun', there were many packages missing exactly like 'SerialClient'. What solved my problem is using a virtual environment using PyCharm. I have made my environment based on Python 2.7 and it works perfectly fine. And at last, I'm able to receive data from my sensor.

Took me quite a while to figure out the problem but hope it helps someone!

Asked by Shazam on 2020-02-25 05:45:52 UTC

Comments