ubunturoscatkin

cannot run catkin build on ubuntu 20.04


I have Ubuntu 20.04 and I've just installed ROS noetic and catkin.

But each time I do catkin build and I have a list of errors and cannot proceed. Can you guys please help me solve this problem.

Traceback (most recent call last):
  File "/usr/local/bin/catkin", line 5, in <module>
    from catkin_tools.commands.catkin import main
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/commands/catkin.py", line 28, in <module>
    from catkin_tools.common import is_tty
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/common.py", line 23, in <module>
    import trollius as asyncio
  File "/usr/local/lib/python3.8/dist-packages/trollius/__init__.py", line 21, in <module>
    from .base_events import *
  File "/usr/local/lib/python3.8/dist-packages/trollius/base_events.py", line 42, in <module>
    from . import tasks
  File "/usr/local/lib/python3.8/dist-packages/trollius/tasks.py", line 565
    def async(coro_or_future, loop=None):
        ^
SyntaxError: invalid syntax

Solution

  • apt and pip3 versions of catkin_tools are broken for noetic. Workaround is to install like this:

    sudo pip3 install git+https://github.com/catkin/catkin_tools.git
    

    Refer to; https://github.com/Rayman/ros-get/issues/95