problems with ROS

  1. [WARN] Detected jump back in time of 5.51266s. Clearing TF buffer.

    手动建图的时候,时不时的就跳出来这个,然后小车跳变到初始位置,而且还是根据TF buffer回溯回去的,真高级。。。

    排查原因发现竟然是忘记运行roscore了,mmp。

  2. [rosrun] Couldn't find executable named patrol.py below /home/carrol/catkin_ws/src/patrol

    原因如提示,python是脚本执行,要添加可执行权限。

  3. error: ‘array’ is not a member of ‘std’

    编译导航包时反复出现这个错误,因为cmake版本比较低(2.8),不会自动找c++11,解决办法在对应package的cmake文件中添加c++声明:add_definitions(-std=c++11)

  4. 同样的错误catkin_make时重复出现,我还以为问题没解决:

    删除build文件夹中对应包,再进行catkin_make。如果删除了某个包,还要删除devel文件夹再编译。

  5. cmake warning conflicts with Anaconda:

    编译到最后会卡死,错误具体啥意思我也没弄明白,粗暴解决了,将系统环境变量里面的anaconda path暂时屏蔽,首先查看环境变量:echo $PATH,然后返回结果:

    /home/[username]/anaconda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

    然后在当前命令行执行:export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

  6. c++: internal compiler error: Killed (program cc1plus)

    虚拟机内存不足。

  7. undefined error with CONSOLE_BRIDGE_logError/CONSOLE_BRIDGE_logWarn

    安装并编译console_bridge包,注意build instructions:

    1
    2
    3
    4
    5
    git clone git://github.com/ros/console_bridge.git
    cd console_bridge
    cmake .
    make
    sudo make install
  8. there are no arguments to ‘logDebug’ that depend on a template parameter, so a declaration of ‘logDebug’ must be available [-fpermissive]

    参考(Reference),还是上面的问题, console_bridge的API变了,将logDebug改成CONSOLE_BRIDGE_logDebug就行了。

  9. running environment相关包的缺失和安装:

    官网查找相关包和依赖,然后执行:

    1
    2
    3
    4
    5
    # install
    sudo dpkg -i 软件包名.deb

    # uninstall
    sudo apt-get remove 软件包名称