zoukankan      html  css  js  c++  java
  • ROS实际问题解决方法

    1.建立软链接

      在路径cd /etc/udev/rules.d中,建立例如50-rfid.rules的文件,它会根据文件名之前的50 51等判断优先级,50的优先级就大于51

    如:  KERNEL=="ttyUSB*",SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="f1d95271",MODE:="0777", GROUP:="dialout", SYMLINK+="rfid"

    它是一个ttyUSB的设备,设备号可能是0 1 2 后面厂商号设备号,一般不同的厂商号设备号都不同,但很多的U转串的厂商号设备号一样,找软件该.后面序列号,随便改一个.它建立软链接后的名字是rfid.以上.

    解释如下:The files in this directory are read by udev(7) and used when events are performed by the kernel.  The udev daemon watches this directory  with inotify so that changes to these files are automatically picked up, for this reason they must be files and not symlinks to another location as in the case in Debian.
    PS:如何查看serial number?

    cd /dev
    dmesg |tail

    会显示如:

    /dev  dmesg |tail
    [29853.633958] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
    [29853.633969] cp210x 3-8:1.0: device disconnected
    [29853.903252] usb 3-8: new full-speed USB device number 13 using xhci_hcd
    [29853.921143] usb 3-8: New USB device found, idVendor=10c4, idProduct=ea60
    [29853.921153] usb 3-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [29853.921158] usb 3-8: Product: CP2102 USB to UART Bridge Controller
    [29853.921162] usb 3-8: Manufacturer: Silicon Labs
    [29853.921165] usb 3-8: SerialNumber: 9528f1d
    [29853.922558] cp210x 3-8:1.0: cp210x converter detected
    [29853.924222] usb 3-8: cp210x converter now attached to ttyUSB0

    看SerialNumber后面9528f1d即为ATTRS{serial}=="f1d95271"这里要替换的序列号.

    因为不规范的设备,厂商号设备号都写的一样没办法区分

    2.建立工作空间

      不论是第几个工作空间,只要名字不一样,都可以

    复制代码
    source /opt/ros/indigo/setup.sh 
    mkdir -p ~/angie/src
    cd ~/angie/src
    catkin_init_workspace 
    cd ~/angie
    catkin_make
    source ~/angie/devel/setup.bash
    复制代码

    angie可以随意替换,就是工作空间名字啦

    这样的两个工作空间是一个版本的,使用不同版本,参见ROSWIKI

    3.boost:foreach函数  作用是遍历每一个元素

    blog.csdn.net/jiangfriend/article/details/1713619 我当时参考的资料

    4.shell的find和grep使用的方法,请抽空笔记整理

    www.cnblogs.com/skynet/archive/2010/12/25/1916873.html

    5.C++继承与派生

    www.cnblogs.com/fzhe/archive/2012/12/25/2832250.html

  • 相关阅读:
    Windows 服务多语言化时读取配置文件失败的问题。
    从开始界面卸载Windows服务时,不小心点击了 取消,此后再次卸载会卸载不掉
    从数据库导出数据时,有的字段是时间,不同的时间向在窗口中去掉时用正则表达式匹配找到不同的时间
    C#使用ManagementObjectSearcher来获取系统信息时会有out of memory的异常
    C# TreeView设置SelectedNode设置无效的问题
    C#判断ListBox是否显示了水平滚动条/横向滚动条
    Jmeter运行不显示cmd对话框
    监控Linux系统所选的服务所占进程内存占用
    Linux的date用法
    shell的循环嵌套语法
  • 原文地址:https://www.cnblogs.com/feixiao5566/p/4932993.html
Copyright © 2011-2022 走看看