necessary tools for ros2
sudo apt install -y \
build-essential \
cmake \
git \
libbullet-dev \
python3-colcon-common-extensions \
python3-flake8 \
python3-pip \
python3-pytest-cov \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget
python3 -m pip install -U \
argcomplete \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures \
pytest
If you met error like
twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
flake8 5.0.4 has requirement importlib-metadata<4.3,>=1.1.0; python_version < "3.8", but you'll have importlib-metadata 4.13.0 which is incompatible.
flake8 5.0.4 has requirement pycodestyle<2.10.0,>=2.9.0, but you'll have pycodestyle 2.4.0 which is incompatible.
pip install importlib-metadata
and continue install packages
sudo apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev \
libcunit1-dev