Roboware远程传输编译时找不到命令catkin_init_workspace: command not found解决

本文详细介绍了在使用Roboware远程传输工程时遇到的RemoteDeploy错误:'/tmp/roswstmp.sh:line2:catkin_init_workspace:command not found'。作者通过调整/etc/profile文件,成功解决了这一问题,为遇到类似错误的ROS用户提供了宝贵的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Roboware远程传输工程Remote Deploy错误提示如下:

/tmp/roswstmp.sh: line 2: catkin_init_workspace: command not found 
Deploy Finished!

ROS小白遇到这个问题就懵逼了,国内很多人都说是因为没有安装catkin_tools包,所以他们是说的解决方法就是各种安装或者重装这个包,可能有部分人是这个原因吧,但至少我不是,到处找资料最后google到gitgub上有位国外的大佬撂下一句Finally, the problem was that user profile for ROS was not updated.,虽然我能看懂这句英文,但是对于一个刚接触Linux不久而且才上手ROS的我来说两脸懵逼。


最后找到解决办法:

sudo su
echo "source /opt/ros/kinetic/setup.bash" >>/etc/profile

我安装的ROS是kinetic版本的,这里根据你自己的版本来修改改路径,最开始我们都在.bashrc中配置过环境变量,不知道这里也要改。/etc/profile是配置所有用户的环境变量,可能catkin用到了其他用户的权限吧。

catkin_make Base path: /home/hhb/catkin_ws Source space: /home/hhb/catkin_ws/src Build space: /home/hhb/catkin_ws/build Devel space: /home/hhb/catkin_ws/devel Install space: /home/hhb/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/hhb/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/hhb/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/hhb/catkin_ws/devel;/opt/ros/noetic -- This workspace overlays: /home/hhb/catkin_ws/devel;/opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/hhb/catkin_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- 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.8.10") -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.10 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on WARNING: package "turtlebot3_gazebo" should not depend on metapackage "gazebo_ros_pkgs" but on its packages instead -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 22 packages in topological order: -- ~~ - turtlebot3_simulations (plain cmake) -- ~~ - wpb_home_bringup -- ~~ - wpb_home_remote -- ~~ - abc_swarm -- ~~ - map_pkg -- ~~ - slam_pkg -- ~~ - tianbot_mini -- ~~ - nav_pkg -- ~~ - lidar_pkg -- ~~ - multi_robot_slam -- ~~ - multirobot_map_merge -- ~~ - turtlebot3_fake_node (plain cmake) -- ~~ - tianbot_mini_description -- ~~ - turtlebot3_gazebo (plain cmake) -- ~~ - explore_lite -- ~~ - rrt_star_global_planner -- ~~ - wpb_home_behaviors -- ~~ - wpb_home_python -- ~~ - wpb_home_python3
03-08
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值