• 工程问题--关于在ROS_ANSWER编辑问题时的格式与使用技巧


     因为自己在使用openni时遇到了个问题,在google上找不到答案,所以就上ros_answer去提问了。

    一到那里对于怎么使用它的代码插入一直存在疑惑。所以就写了这篇随笔来记录一下。

    1. #可以实现加粗,比如#------,可以将------加粗。

    但最后好像并不能显示出来


    2. 工具栏上的插入代码只能插入一行代码,那对于多行代码,特别是很多行的报错,我们要怎么做呢?

      enter code here

    将其他的代码复制粘贴在这里,如下图PARAMETERS后面的多行代码

    我们只要将后面的代码行首和PARAMETERS的行首对齐就好。这样就能后面的显示成代码而不是文字了。

    这样就可以粘贴很多行代码了


    下面是我自己的一个模板:

    Hello, I got a problem when I tried to 
    
        roslaunch openni_launch openni.launch
    with kinect v1 on my ubuntu16.04
    
    #----------------------------------------------------------------------
    
    **1.** My computer environment:
    
    ubuntu 16.04 + kinetic 
    
    OpenNI-Bin-Dev-Linux-x64-v1.5.7.10
    
    Sensor-Bin-Linux-x64-v5.1.2.1
    
    NITE-Bin-Dev-Linux-x64-v1.5.2.23
    
    #----------------------------------------------------------------------
    
    **2.** When I tried to roslaunch openni, I got the message as following:
    
        ... logging to /home/neo/.ros/log/75389ba0-8c86-11e8-b414-00215ce868e5/roslaunch-nuc-16200.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.
         
        started roslaunch server http://nuc:46401/
        
        SUMMARY
        ========
         
        PARAMETERS
         * /camera/camera_nodelet_manager/num_worker_threads: 4
         * /camera/depth_rectify_depth/interpolation: 0
         * /camera/depth_registered_rectify_depth/interpolation: 0
         * /camera/disparity_depth/max_range: 4.0
         * /camera/disparity_depth/min_range: 0.5
         * /camera/disparity_registered_hw/max_range: 4.0
         * /camera/disparity_registered_hw/min_range: 0.5
         * /camera/disparity_registered_sw/max_range: 4.0
         * /camera/disparity_registered_sw/min_range: 0.5
         * /camera/driver/depth_camera_info_url:
         * /camera/driver/depth_frame_id: camera_depth_opti...
         * /camera/driver/depth_registration: False
         * /camera/driver/device_id: #1
         * /camera/driver/rgb_camera_info_url:
         * /camera/driver/rgb_frame_id: camera_rgb_optica...
         * /rosdistro: kinetic
         * /rosversion: 1.12.13
        
        NODES
          /camera/
            camera_nodelet_manager (nodelet/nodelet)
            depth_metric (nodelet/nodelet)
            depth_metric_rect (nodelet/nodelet)
            depth_points (nodelet/nodelet)
            depth_rectify_depth (nodelet/nodelet)
            depth_registered_hw_metric_rect (nodelet/nodelet)
            depth_registered_rectify_depth (nodelet/nodelet)
            depth_registered_sw_metric_rect (nodelet/nodelet)
            disparity_depth (nodelet/nodelet)
            disparity_registered_hw (nodelet/nodelet)
            disparity_registered_sw (nodelet/nodelet)
            driver (nodelet/nodelet)
            ir_rectify_ir (nodelet/nodelet)
            points_xyzrgb_hw_registered (nodelet/nodelet)
            points_xyzrgb_sw_registered (nodelet/nodelet)
            register_depth_rgb (nodelet/nodelet)
            rgb_debayer (nodelet/nodelet)
            rgb_rectify_color (nodelet/nodelet)
            rgb_rectify_mono (nodelet/nodelet)
          /
            camera_base_link (tf2_ros/static_transform_publisher)
            camera_base_link1 (tf2_ros/static_transform_publisher)
            camera_base_link2 (tf2_ros/static_transform_publisher)
            camera_base_link3 (tf2_ros/static_transform_publisher)
        
        ROS_MASTER_URI=http://localhost:11311
        
        process[camera/camera_nodelet_manager-1]: started with pid [16217]
        process[camera/driver-2]: started with pid [16218]
        process[camera/rgb_debayer-3]: started with pid [16219]
        process[camera/rgb_rectify_mono-4]: started with pid [16226]
        process[camera/rgb_rectify_color-5]: started with pid [16233]
        process[camera/ir_rectify_ir-6]: started with pid [16250]
        process[camera/depth_rectify_depth-7]: started with pid [16263]
        process[camera/depth_metric_rect-8]: started with pid [16279]
        [ INFO] [1532140195.705105283]: Initializing nodelet with 4 worker threads.
        process[camera/depth_metric-9]: started with pid [16289]
        process[camera/depth_points-10]: started with pid [16304]
        process[camera/register_depth_rgb-11]: started with pid [16321]
        process[camera/points_xyzrgb_sw_registered-12]: started with pid [16324]
        process[camera/depth_registered_sw_metric_rect-13]: started with pid [16331]
        process[camera/depth_registered_rectify_depth-14]: started with pid [16343]
        process[camera/points_xyzrgb_hw_registered-15]: started with pid [16353]
        process[camera/depth_registered_hw_metric_rect-16]: started with pid [16371]
        process[camera/depth_registered_metric-17]: started with pid [16389]
        process[camera/disparity_depth-18]: started with pid [16403]
        process[camera/disparity_registered_sw-19]: started with pid [16416]
        process[camera/disparity_registered_hw-20]: started with pid [16441]
        process[camera_base_link-21]: started with pid [16445]
        process[camera_base_link1-22]: started with pid [16455]
        process[camera_base_link2-23]: started with pid [16473]
        process[camera_base_link3-24]: started with pid [16477]
        Warning: USB events thread - failed to set priority. This might cause loss of data...
        [ INFO] [1532140197.987390606]: Number devices connected: 2  
        [ INFO] [1532140198.088715563]: 1. device on bus 002:08 is a SensorKinect (2ae) from PrimeSense (45e) with serial id '0'
        [ INFO] [1532140198.088884278]: 2. device on bus 002:08 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'A00366902406104A'
        [ INFO] [1532140198.091009069]: Searching for device with index = 1
        [camera/camera_nodelet_manager-1] process has died [pid 16217, exit code -11, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=camera_nodelet_manager __log:=/home/neo/.ros/log/75389ba0-8c86-11e8-b414-00215ce868e5/camera-camera_nodelet_manager-1.log].
        ...
        ...
        ...
    Here maybe the main problem
    
        Warning: USB events thread - failed to set priority. This might cause loss of data...
        [ INFO] [1532140197.987390606]: Number devices connected: 2  
        [ INFO] [1532140198.088715563]: 1. device on bus 002:08 is a SensorKinect (2ae) from PrimeSense (45e) with serial id '0'
        [ INFO] [1532140198.088884278]: 2. device on bus 002:08 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'A00366902406104A'
        [ INFO] [1532140198.091009069]: Searching for device with index = 1
    
    It showed the computer connected to two kinects. But I only had one kinect connected.
    
    #----------------------------------------------------------------------
    
    **3.** But when I run 
    
        roslaunch openni_launch openni.launch device_id:=#2
    
    **it works!!!**  But the problem still **exitst** .
    Here is the **main**  message information
    
        Warning: USB events thread - failed to set priority. This might cause loss of data...
        [ INFO] [1532144223.689084031]: Number devices connected: 2
        [ INFO] [1532144223.789816257]: 1. device on bus 002:08 is a SensorKinect (2ae) from PrimeSense (45e) with serial id '0'
        [ INFO] [1532144223.789871737]: 2. device on bus 002:08 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'A00366902406104A'
        [ INFO] [1532144223.790564154]: Searching for device with index = 2
        [ INFO] [1532144223.826063687]: Opened 'SensorV2' on bus 2:8 with serial number 'A00366902406104A'
        [ INFO] [1532144223.853133835]: rgb_frame_id = 'camera_rgb_optical_frame' 
        [ INFO] [1532144223.854356984]: depth_frame_id = 'camera_depth_optical_frame' 
        [ WARN] [1532144223.861493275]: Camera calibration file /home/neo/.ros/camera_info/rgb_A00366902406104A.yaml not found.
        [ WARN] [1532144223.861670175]: Using default parameters for RGB camera calibration.
        [ WARN] [1532144223.861811460]: Camera calibration file /home/neo/.ros/camera_info/depth_A00366902406104A.yaml not found.
        [ WARN] [1532144223.861931850]: Using default parameters for IR camera calibration.
    
    #----------------------------------------------------------------------
    
    **4.** When I run 
    
         lsusb
    
    I got the message as following:
    
        Bus 001 Device 002: ID 8087:8001 Intel Corp.
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
        Bus 002 Device 003: ID 8087:0a2a Intel Corp. 
        Bus 002 Device 002: ID 24ae:2010  
        Bus 002 Device 008: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
        Bus 002 Device 006: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
        Bus 002 Device 007: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
        Bus 002 Device 005: ID 0409:005a NEC Corp. HighSpeed Hub
        Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    
    #----------------------------------------------------------------------
    
    **5.** I guess  maybe because I had installed **Sensor-Bin-Linux-x64-v5.1.x.x**  **twice**  .
    
    When the first time I installed the Sensor driver for kinect v1, I chose a newer version:Sensor-Bin-Linux-x64-v5.1. **6.6** .  
    
    But this didn't match the **OpenNI-Bin-Dev-Linux-x64-v1.5.7.10** , which used with Sensor-Bin-Linux-x64-v5.1.6.6  may led to a message when run **./NiViewer**
    
        open failed : bad parameter sent to the device
    
    So I uninstall the version of Sensor-Bin-Linux-x64 to v5.1.6.6 and install **Sensor-Bin-Linux-x64 to v5.1.2.1** . 
    
    And the  "open failed : bad parameter sent to the device" was **disappeared** .
    
    But the first wrong message above appeared when I roslaunch the openni.
    
    So I guess  something  went wrong **when I changed the version of Sensor** .But how to solve it?
    
    #----------------------------------------------------------------------
    
    I hope someone would help me with the issue. Thank you so much.
    可能在现在看来,你与世界顶端有太大的差距,但是没关系。从你真真切切地去生活的那一刻起,你就知道自己要去做什么了。那接下来的日子就是勤勤恳恳,主动积极,任劳任怨地去奋斗了!!!
  • 相关阅读:
    现代软件工程 第一章 概论 第3题——韩婧
    现代软件工程 第一章 概论 第2题——韩婧
    小组成员邓琨、白文俊、张星星、韩婧
    UVa 10892 LCM的个数 (GCD和LCM 质因数分解)
    UVa 10780 幂和阶乘 求n!中某个因子的个数
    UVa 11859 除法游戏(Nim游戏,质因子)
    Codeforces 703C Chris and Road 二分、思考
    Codeforces 703D Mishka and Interesting sum 树状数组
    hdu 5795 A Simple Nim SG函数(多校)
    hdu 5793 A Boring Question 推公式(多校)
  • 原文地址:https://www.cnblogs.com/sincere-diligence/p/9347542.html
Copyright © 2020-2023  润新知