admin管理员组文章数量:1567750
在给Jetson Xavior配环境的过程中,发现roscore会报错,报错如下:
robot@robot:~$ roscore
... logging to /home/robot/.ros/log/67bcd434-f455-11eb-b3b6-204ef6c5f181/roslaunch-robot-22150.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
RLException: Unable to contact my own server at [http://192.168.100.3:41153/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot connect to itself. Please check
for errors by running:
ping 192.168.100.3
For more tips, please see
http://wiki.ros/ROS/NetworkSetup
The traceback for the exception was written to the log file
这是由于在.bashrc
里设置了启动ros时的地址和名称,我这里是copy了别人的镜像文件,所以出现了这个问题,他们原来是开机就启动连接一个指定的ip地址。
但在我这里现在不需要这么做,所以要做些修改:
以下是原始的.bashrc
启动ros的部分,可见问题是由最后两行引起的
source /opt/ros/melodic/setup.bash
#source /home/robot/hku15_car_ws/devel/setup.bash
export LD_LIBRARY_PATH=/usr/local/cuda/lib
export PATH=$PATH:/usr/local/cuda-10.2/bin
export LD_LIBRARY_PATH=/opt/ros/melodic/lib
export ROS_MASTER_URI=http://192.168.100.3:11311
export ROS_HOSTNAME=192.168.100.3
所以,只要改一下这个地址和用户名就可以了
改成如下:
export ROS_MASTER_URI=http://robot.local:11311
export ROS_HOSTNAME=robot.local
修改后保存,然后在source一次.bashrc
就可以了。
然后再次启动roscore,成功
robot@robot:~$ roscore
... logging to /home/robot/.ros/log/a3782aa6-0575-11ec-b3b6-204ef6c5f181/roslaunch-robot-24896.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://robot.local:33981/
ros_comm version 1.14.11
SUMMARY
========
PARAMETERS
* /rosdistro: melodic
* /rosversion: 1.14.11
NODES
auto-starting new master
process[master]: started with pid [24915]
ROS_MASTER_URI=http://robot.local:11311/
setting /run_id to a3782aa6-0575-11ec-b3b6-204ef6c5f181
process[rosout-1]: started with pid [24928]
started core service [/rosout]
本文标签: 提示RLExceptionroscoreServerContact
版权声明:本文标题:roscore失败,提示RLException: Unable to contact my own server 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1726640564a1079591.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论