ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, thanks for your answers! But no significant progress yet... ros_lib builds when I run catkin_make, but I still have problems when I try to run the helloworld example. Compiling it and uploading to Arduino works, though. It works fine when I run it on my laptop with melodic...

I get the following errors:

>> rosrun rosserial_python serial_node.py /dev/ttyACM0
Traceback (most recent call last):
  File "/home/krister/catkin_ws/devel/lib/rosserial_python/serial_node.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/krister/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 39, in <module>
    from rosserial_python import SerialClient, RosSerialServer
  File "/home/krister/catkin_ws/devel/lib/python3/dist-packages/rosserial_python/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 1, in <module>
  File "/home/krister/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 48, in <module>
    from serial import Serial, SerialException, SerialTimeoutException
ModuleNotFoundError: No module named 'serial'

Trying from source was the right thing to do. Since you discovered it doesn't work, the next step would be to open a pull request that fixes the issue, or if there is already a PR then I'm sure the maintainers would find it helpful if you tested it and commented if it works.

To be honest, I don't understand what to do... :-)

I tried also with the gcc7-fixes suggested by hericles, but same result there. Given the above output on rosrun I get, I suppose something is missing or broken in my ROS installation!? I mean, catkin_make and catkin_make install seems to just build everything fine, with no errors. Could have something to do with Python compatibility errors, as mentioned here: https://github.com/ros-drivers/rosserial/issues/499 ?

Without more advice, I don't think I get any further with this at the moment I think. I only see two options:

1) Try and reinstall ROS from scratch and see if that helps, or 2) Install 18.04 LTS alongside my 20.04, with melodic. I consider option 1 as a potential fix, and 2 as a workaround (i.e. avoid the problem at the moment) :-).

I really need ROS working now, for an important project at work, and I've already spent too much time on this (why do always new problems arise when upgrading to a new ubuntu version...?)

Anyway, thanks and br!