ROS中 ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
)
问题如下
ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/fulei/ares/src
ROS path [2]=/opt/ros/melodic/share
问题原因
原因是缺少依赖包robot_state_publisher
解决方法
我的是ubuntu18.04,ros版本为melodic
终端输入:
sudo apt-get install ros-melodic-robot-state-publisher
如果提示定位不到的话,建议检查一下ros的源,原因大部分是源不对,或者再添加一遍密钥就行了。
sudo sh -c 'echo "deb https://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
最后更新一下
sudo apt-get update