catkin init/build 遇到catkin:command not found 的解决办法。

背景:

安装ROS环境点击打开链接后,catkin_make可以跑,但是如果跑catkin init或者catkin build就会遇到catkin:command not found。


原因:

发文的此时,包含catkin init/build 的catkin_tool 包还没发布。单纯的安装ROS,是不会安装这个包的。我们需要手动装。


解决办法:

先试试:

$ sudo apt-get update

$ sudo apt-get install python-catkin-tools

(我这样就OK了)


如果不行试试:

$ sudo sh -c 'echo "deb http://package.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'

$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

$ sudo apt-get update

$ sudo apt-get install python-catkin-tools

(参考的是 点击打开链接


bash: /home/ros/catkin_ws/devel/setup.bash: 没有那个文件或目录 bash: /home/ros/catkin_ws/devel/setup.bash: 没有那个文件或目录 ros@ros-virtual-machine:~$ mkdir -p catkin_ws/src ros@ros-virtual-machine:~$ cd catkin_ws/src ros@ros-virtual-machine:~/catkin_ws/src$ catkin_create_pkg learn_topic std_msgs rospy roscpp Created file learn_topic/package.xml Created file learn_topic/CMakeLists.txt Created folder learn_topic/include/learn_topic Created folder learn_topic/src Successfully created files in /home/ros/catkin_ws/src/learn_topic. Please adjust the values in package.xml. ros@ros-virtual-machine:~/catkin_ws/src$ cd .. ros@ros-virtual-machine:~/catkin_ws$ catkin_make Base path: /home/ros/catkin_ws Source space: /home/ros/catkin_ws/src Build space: /home/ros/catkin_ws/build Devel space: /home/ros/catkin_ws/devel Install space: /home/ros/catkin_ws/install Creating symlink "/home/ros/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake" #### #### Running command: "cmake /home/ros/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/ros/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/ros/catkin_ws/install -G Unix Makefiles" in "/home/ros/catkin_ws/build" #### -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: /home/ros/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/noetic -- This workspace overlays: /opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum re
最新发布
03-26
(base) straw@straw-ASUS-TUF-Gaming-F15-FX507VV-FX507VV:~/catkin_ws$ catkin_make Base path: /home/straw/catkin_ws Source space: /home/straw/catkin_ws/src Build space: /home/straw/catkin_ws/build Devel space: /home/straw/catkin_ws/devel Install space: /home/straw/catkin_ws/install #### #### Running command: "cmake /home/straw/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/straw/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/straw/catkin_ws/install -G Unix Makefiles" in "/home/straw/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/straw/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/melodic -- This workspace overlays: /opt/ros/melodic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/straw/catkin_ws/build/test_results -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.6.9") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.29 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 13 packages in topological order: -- ~~ - jsk_recognition (metapackage) -- ~~ - sound_classification -- ~~ - audio_to_spectrogram -- ~~ - jsk_recognition_msgs -- ~~ - my_package -- ~~ - checkerboard_detector -- ~~ - jsk_recognition_utils -- ~~ - imagesift -- ~~ - jsk_perception -- ~~ - jsk_pcl_ros_utils -- ~~ - jsk_pcl_ros -- ~~ - resized_image_transport -- ~~ - yolo_ros -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin metapackage: 'jsk_recognition' -- ==> add_subdirectory(jsk_recognition-master/jsk_recognition) -- +++ processing catkin package: 'sound_cla
03-22
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值