码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-07-22 00:30:28      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:parameter   min   分享图片   粘贴   prime   pid   soft   false   number   

 因为自己在使用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 didnt 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.

 

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

标签:parameter   min   分享图片   粘贴   prime   pid   soft   false   number   

原文地址:https://www.cnblogs.com/sincere-diligence/p/9347542.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!