Ask Your Question
1

rosserial and arduino

asked 2020-06-02 05:31:55 -0500

Saul gravatar image

Hi folks,

I have just upgraded to Ubuntu 20.04 LTS, and ROS Noetic. Following the instructions in the ROS tutorials, using ROS Noetic, everything worked fine except for the tutorial about installing Arduino IDE Setup: http://wiki.ros.org/rosserial_arduino... I do the 2.1.1 (RECOMMENDED) Installing Binaries on the ROS workstation:

sudo apt-get install ros-noetic-rosserial-arduino
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-noetic-rosserial-arduino

I suspect that the rosserial Arduino package is not yet provided for noetic. Am I right? Does anyone know when/if it will be? Or can I install this package in another way? I tried the build from source option too, but no success there... it simply does not work when I try to run the simple helloworld example in the next tutorial. Before I upgraded to Ubuntu 20.04, I ran 18.04 and melodic. It worked fine! Any help/advice much appreciated! All the best, Krister

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2020-06-03 01:21:28 -0500

hericles gravatar image

Hi, I was having the same problem. I upgraded to Ubuntu 20.04 and and the rosserial-arduino was not yet available for noetic. I was able to install using the 2.1.2, but using a specific branch in the git clone, which is gcc7-fixes, and it worked.

cd ws/src

git clone -b gcc7-fixes https://github.com/ros-drivers/rosser...

cd ~/ws

catkin_make

The catkin_make install was not necessary for me. My english is rusty, but I hope I've helped!

edit flag offensive delete link more
0

answered 2020-06-02 11:58:31 -0500

sloretz gravatar image

I suspect that the rosserial Arduino package is not yet provided for noetic.

You're correct. The index.ros.org page for rosserial_arduino says it is UNRELEASED.

Does anyone know when/if it will be?

When something will be released is a question only the maintainers would know. Good news is it looks like someone asked about a Noetic release here: https://github.com/ros-drivers/rosser...

Or can I install this package in another way? I tried the build from source option too, but no success there... it simply does not work when I try to run the simple helloworld example in the next tutorial

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.

edit flag offensive delete link more
-1

answered 2020-06-08 03:54:20 -0500

Saul gravatar image

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!

edit flag offensive delete link more

Comments

Hello, it might be interesting to consider using an image of the docker with melodic, or another version of ROS while noetic is not updated. If you know how to use the docker, it can be a quick solution, but if you think you will waste a lot of time on it, I think that installing Ubuntu 18.04 alongside Ubuntu 20.04 may be more reliable.

hericles gravatar image hericles  ( 2020-06-09 00:52:55 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-06-02 05:31:55 -0500

Seen: 91 times

Last updated: Jun 08