roscore启动不完全问题
阅读原文时间:2023年07月09日阅读:2

运行roscore,得到如下日志,且一直卡着无法继续执行

… logging to /home/xbit/.ros/log/79f2952c-589c-11ea-8213-d0abd5e7d222/roslaunch-x-11085.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

原因:ROS_IP和ROS_HOSTNAME错误

解决办法:将如下脚本加入~/.bashrc中即可

export ROS_HOSTNAME=127.0.0.1 export ROS_IP=127.0.0.1
if [ -f /opt/ros/melodic/setup.bash ]; then
source /opt/ros/melodic/setup.bash
elif [ -f /opt/ros/kinetic/setup.bash ]; then
source /opt/ros/kinetic/setup.bash
else
echo "No ros distro found!"
fi

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器