source ~/.bashrc
-bash: /opt/ros/eloquent/setup.bash: No such file or directory
卸载重装
sudo apt remove ros-foxy-* && sudo apt autoremove
apt install ros-eloquent-desktop
这下子终于恢复了我们应有的文件。
ros2 run demo_nodes_cpp talker
然后catkin_make平替colcon build
(base) root@DESKTOP-3JRQ3HI:~/catkin_ws# colcon build --symlink-install
colcon: command not found
sudo apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-pip \
python-rosdep \
python3-vcstool \
wget
# install some pip packages needed for testing
sudo -H python3 -m pip install -U \
argcomplete \
flake8 \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures
# [Ubuntu 16.04] install extra packages not available or recent enough on Xenial
python3 -m pip install -U \
pytest \
pytest-cov \
pytest-runner \
setuptools
# install Fast-RTPS dependencies
sudo apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev
colcon build --symlink-install
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "catkin", but
CMake did not find one.
Could not find a package configuration file provided by "catkin" with any
of the following names:
catkinConfig.cmake
catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
"catkin_DIR" to a directory containing one of the above files. If "catkin"
provides a separate development package or SDK, be sure it has been
installed.
我们来针对一下这个错误。实际上我们已经安装了colcon,不需要catkin
貌似可以安全忽略