1. 程式人生 > >SICK TiM561激光雷達的使用

SICK TiM561激光雷達的使用

frame hostname win libusb 修改 group targe param method

TIM系列激光掃描傳感器原理:

  激光發射器發出激光脈沖,當激光碰到物體後,部分激光反射回激光接收器。通過計算發射/接收脈沖時間差,可以計算出距離值。激光掃描器連續不停的發射激光脈沖,由旋轉的光學機構將激光脈沖按一定角度間隔(角度分辨率)發射至掃描角度內的各個方向而形成一個二維掃描面。

技術分享圖片

SICK激光傳感器按用途主要分兩種:

  • 檢測(Detection):在掃描器的掃描範圍內,設置不同形狀的檢測區域,當掃描器檢測到有物體進入該區域時,通過開關量信號輸出檢測結果。通常用於設備防撞、物體檢測、區域安防等。
  • 測量(Ranging):在掃描器的掃描範圍內,通過數據接口輸出每個激光脈沖測量點的距離及對應角度值,據此獲得二維輪廓值。通常用於測量物體的外型輪廓及體積。

技術分享圖片

  室外型迷你激光掃描器 TiM561(測量型)是西克(SICK)2014年下半年發布的TiM551產品的升級版本。檢測距離達到10米,防護等級為IP67。角度分辨率從1°提升到了0.33°,測量點更密,可檢測更細小的物體。可應用於自行小車/機器人等的防撞、導航及周邊環境檢測,以及安防領域用於區域監控等。IP67防護等級:防護灰塵吸入(整體防止接觸,防護灰塵滲透);防護短暫浸泡(防浸)。

  TiM系列產品命名規則:

  • 第一位數字表示工作模式分類 :3表示檢測型,5表示測量型
  • 第二位數字表示檢測距離分類 :1/2表示檢測距離4米,5/6表示檢測距離10米
  • 第三位數字表示應用環境分類 :0表示室內型, 1表示室外型

技術分享圖片

  TiM561的主要技術參數如下:

技術分享圖片

  The TiM5xx uses HDDM technology (High Definition Distance Measurement), a SICK own-development. Using this measurement method, a measured value is formed by the average value for several individual pulses. The measurement method forms an average value from several pulses to determine individual measured values. At an angle resolution of 1°(TiM55x) and 0.3°(TiM56x/TiM57x), a measuring point is formed from the average of 84 measurements.

TiM561使用SICK的HDDM專利技術,對每個角度對應輸出點周圍的84個子測量點求平均值作為該點的輸出值。相比於傳統單脈沖測量方式,HDDM技術的每個測量點由多次激光脈沖的測量值取均值組成。HDDM的優勢如下:

  • 激光測量點之間無間隙
  • 對低反射率物體的檢測能力更強
  • 抗環境粉塵及煙霧的幹擾能力更強
  • 抗環境光幹擾能力更強

技術分享圖片

  TiM561可以使用Ethernet或者USB 2.0(輔助)接口傳輸數據。After switching on the supply voltage, the TiM5xx initializes and the green LED will light up to indicate its readiness for operation. The TiM5xx begins its readiness to measure automatically. It continuously scans the surrounding contour in its field of vision at a frequency of 15 Hz. It continuously saves the values determined in each measuring process (scan) in its measured value memory by overwriting the previous values.

技術分享圖片

  傳感器的安裝對準:

  將TIM掃描角的90°軸對準需要監控的區域中心。設備光學外罩上的“?”標記指示了90°的位置。 (TIM掃描範圍: -45225度)

技術分享圖片

  在 TIM 外殼上紅圈的位置,有個菱形標記,表示掃描平面的水平位置:

技術分享圖片

SOPAS Engineering Tool

  SOPAS Engineering Tool V3 軟件可以用於配置傳感器參數,或者進行測試。在Windows上裝好軟件後通過USB接口連接TiM561,第一次會提示安裝對應的SOPAS驅動SDD (SOPAS device driver) 。下圖為裝好驅動後連上傳感器的新項目:

技術分享圖片

  在下拉菜單中選擇“打開設備窗口”,將會彈出TiM561設備的界面,可以在這個界面中對傳感器的參數進行一些配置,或是查看激光數據:

技術分享圖片

  當我們更改了某些參數後有兩種保存方式:點擊SOPAS工具欄上的“Download all parameters to device” ,將設置保存到設備RAM中(掉電丟失,用於調試時使用)。點擊“Save Permanently” (第二個畫圈的圖標), 將參數設置保存到設備中非易失性存儲器中,掉電不丟失。

技術分享圖片

   TIM561除了能輸出距離值,還可以將反射率數據輸出。In order to output remission values in the telegram, select the RSSI checkbox:

技術分享圖片

  To display the remission values in the scan as well, select the RSSI checkbox.

技術分享圖片

Output of measured values

  If the TiM receives one of the two following commands by telegram over the Ethernet or USB interface, it will start the output of measured values in real time over these data interfaces.

  • Single measured value output(單次數據輸出)

  If the data from a measuring process are required, the TiM5xx sends the measured values from the most recent scan.

技術分享圖片

  通過Ethernet或者USB發送的請求數據如下(以ASCII方式發送或顯示時數據之間以空格間隔):

技術分享圖片

  返回數據如下。Answer of TiM5xx:

<STX> sRA LMDscandata (contents) <ETX> 

  其中,contents代表的具體內容可以查看文檔:Technical information TiM561 Ranging Laser Scanner Chapter 5.3 Measured value output fomat, Page 24

  點擊設備頁面工具欄上的終端按鈕,可以在彈出的終端中輸入命令進行測試。按ASCII碼方式輸入單次數據請求命令,發出和收到的數據如下圖所示:

技術分享圖片

  • Continuous measured value output(連續數據輸出)

技術分享圖片

  連續數據請求指令的格式如下:技術分享圖片

  • 開始數據輸出:

  Request:

<STX>sEN LMDscandata 1<ETX>

  Answer of TiM5xx (acknowledgement of request):

<STX>sEA LMDscandata 1<ETX>

  Answer of TiM5xx (measured value output):

<STX>sSN LMDscandata (contents) <ETX>
  • 停止數據輸出:

  Request:

<STX>sEN LMDscandata 0<ETX>

  Answer of TiM5xx (acknowledgement of request):

<STX>sEA LMDscandata 0<ETX> 

  在終端中測試如下圖所示,發出連續數據請求後會先返回一條應答響應,然後才開始輸出測量數據:

技術分享圖片

ROS中使用sick Tim561

  ros indigo 上安裝sick_tim(Sick 公司TIM系列產品在ROS的接口實現)步驟:

  step1. 新建一個工作空間,或者用之前建立好的(比如catkin_ws)   step2. 進入src目錄
cd ~/catkin_ws/src
  step3. 下載源代碼(註意 -b indigo 可以換成你自己的ros 版本,比如-b kinetic)
git clone -b indigo https://github.com/uos/sick_tim.git 
  step4. 編譯代碼
cd ~/catkin_ws
catkin_make
  編譯成功後執行launch文件,發布激光掃描消息:
roslaunch sick_tim sick_tim551_2050001.launch

  這時會遇到錯誤,按照udev文件夾中的README文檔操作可以解決這個問題:

To give all members of the plugdev group write access to the Sick TiM devices, run the following commands:

  sudo cp 81-sick-tim3xx.rules /etc/udev/rules.d/
  sudo udevadm control --reload-rules

Now unplug your USB cable and plug it in again. This will allow you to communicate with the laser scanner without running the node as root and fix the following error:

  LIBUSB - Cannot open device; please read sick_tim/udev/README

  由於我在虛擬機中運行ROS,因此在插入USB後要在可移動設備中選擇將其連接到虛擬機:

技術分享圖片

   如果是使用Ethernet接口通過TCP協議進行通信就需要修改sick_tim551_2050001.launch文件:去掉最後幾行註釋,將IP地址改為自己傳感器的地址。

<?xml version="1.0"?>
<launch>
  <param name="robot_description" command="$(find xacro)/xacro.py ‘$(find sick_tim)/urdf/example.urdf.xacro‘" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

  <node name="sick_tim551_2050001" pkg="sick_tim" type="sick_tim551_2050001" respawn="false" output="screen">
    <!-- default values: -->
    <!--
      <param name="min_ang" type="double" value="-2.35619449019" />
      <param name="max_ang" type="double" value="2.35619449019" />
      <param name="intensity" type="bool" value="True" />
      <param name="skip" type="int" value="0" />
      <param name="frame_id" type="str" value="laser" />
      <param name="time_offset" type="double" value="-0.001" />
      <param name="publish_datagram" type="bool" value="False" />
      <param name="subscribe_datagram" type="bool" value="false" />
      <param name="device_number" type="int" value="0" />
      <param name="time_increment" type="double" value="0.000061722" />
      <param name="range_min" type="double" value="0.05" />
      <param name="range_max" type="double" value="10.0" />
    -->

    <!-- Uncomment this to enable TCP instead of USB connection; ‘hostname‘ is the host name or IP address of the laser scanner
    In cases where a race condition exists and the computer boots up before the TIM is ready, increase ‘timelimit.‘
         <param name="hostname" type="string" value="192.168.1.43" />
         <param name="port" type="string" value="2112" />
         <param name="timelimit" type="int" value="5" />
    -->
  </node>
</launch>

  launch文件執行成功後可以打開rviz查看激光數據,註意正確設置Topic名稱以及參考坐標系。註意只有在配置中勾選輸出反射率數據,才能在rviz中以不同顏色查看到:

技術分享圖片

  另外可以使用rostopic hz指令查看激光掃描數據發布的頻率,從下圖可以看出頻率確實為15Hz

技術分享圖片

參考:

sick_tim

ROS中發布激光掃描消息

ROS 使用sick tim561 雷達

2D LiDAR 傳感器 TiM561 / Outdoor

TIM系列迷你型激光掃描器操作手冊

Bus Hound 的使用方法

A ROS driver for the SICK TiM series of laser scanners

SICK TiM561激光雷達的使用