0
$\begingroup$

Rosanswers logo

I have been using ros serial for a weeks to communicate with my Arduino. However, today when I ran the command

 rosrun rosserial_arduino serial_node.py /dev/ttyACM0

I got this error

Traceback (most recent call last):
  File "/home/ryley/catkin_ws/devel/lib/rosserial_arduino/serial_node.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/ryley/catkin_ws/src/rosserial/rosserial_arduino/nodes/serial_node.py", line 37, in <module>
    from rosserial_arduino import SerialClient
  File "/home/ryley/catkin_ws/devel/lib/python3/dist-packages/rosserial_arduino/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'SerialClient'

I have source my workspace in both the roscore terminal and where I run the command. I just don't understand what could have affected rosserial since I used it yesterday.

I have had this error before when I first installed rosserial but a simple search gave me the fix of adding a "." in front, but this time its a different problem and i don't see any other solutions. the only thing I have changed is my usb cable but i know it works since i uploaded code to the Arduino with it. I tried filling the rosserial_python.py files with random characters to see if the error would change but its always the same error.


Originally posted by ryleymcc on ROS Answers with karma: 26 on 2021-01-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The solution was to use the proper command.

rosrun rosserial_python serial_node.py /dev/ttyACM0

Originally posted by ryleymcc with karma: 26 on 2021-01-21

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.