在ROS主从机模式中,从机可以看到主机发布的话题,并且echo可以看到主机发布的消息,但是在从机运行roscore时,出现如下问题:
Command ‘roscore’ not found, but can be installed with:
sudo apt install python-roslaunch
安装这个包
The following packages have unmet dependencies:
python-roslaunch : Depends: python-roslib but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
没有初始化要先执行:
sudo rosdep init
rosdep update
载入环境到命令行窗口(bashrc):
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc