in ROS

ROS环境变量的设置

问题

ROS在运行或者启动过程中出现找不到包的问题,具体如下:
ImportError : No module named xxxx.msg
或者
roscd/roslaunch cannot find the package that be built recently

原因是环境变量没设置好。

解决

设置环境变量:

#source /opt/ros/noetic/setup.bash
#source ~/catkin_ws/devel/setup.bash

或者一般是添加到~/.bashrc文件中。

参考

ROS中的roslaunch命令和launch文件(ROS入门学习笔记四)
ImportError : No module named xxxx.msg
roscd/roslaunch cannot find the package that be built recently

Write a Comment

Comment