ROS相关问题汇总

  • Post author:
  • Post category:其他



目录


1.运行roscore等待很久,出现Unable to contact my own server at [http://192.168.0.106:35099/]


2.[ERROR] [1446531999.044935824]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying…


3.在终端显示bash:/home/xxx/catkin_ws/setup.bash


4.在roslaunch指令中将log重定向到文件,python输出存在延迟


1.运行roscore等待很久,出现Unable to contact my own server at [http://192.168.0.106:35099/]

解决办法:



  • ~/.bashrc添加环境变量ROS_HOSTNAME和ROS_MASTER
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
  • 更新环境变量
source ~/.bashrc

2.

[ERROR] [1446531999.044935824]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying...

解决办法:

  • 请检查 roscore 是否正常打开, 每次进行运行测试时都要首先运行 roscore。

3.在终端显示bash:/home/xxx/catkin_ws/setup.bash

解决办法:

gedit ~/.bashrc 

删除多余的环境变量

4.在roslaunch指令中将log重定向到文件,python输出存在延迟

roslaunch node node.launch  > /home/ubuntu/node.log 2>&1 &

问题原因:由于python输出会存在延迟缓存

解决办法:

  • 在python文件中的print函数中加上flush=True
print("xxxxxxx", flush=True)



版权声明:本文为He3he3he原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。