Ros之Stereo_camera學習記錄

Ros之Stereo_camera學習記錄

Stereo_camera
相當於一個雙目攝像頭,可以獲取左右視覺的圖像,這幾天碰巧遇到,並與其發生了一些關係,記錄下來,已備後面查閱。

具體內容如下:

	 <sensor type="multicamera" name="stereo_camera">
      <pose frame=''>0 0 -0.2 0 90 0</pose>
      <child>/multicamera_link</child>
      <parent>base_link</parent>
      <update_rate>30.0</update_rate>
      <camera name="right">
        <pose>0 0.12 0 0 0 0</pose>
        <horizontal_fov>1.5708</horizontal_fov>
        <image>
          <width>752</width>
          <height>480</height>
          <format>R8G8B8</format>
        </image>
        <clip>
          <near>0.02</near>
          <far>300</far>
        </clip>
        <noise>
          <type>gaussian</type>
          <mean>0.0</mean>
          <stddev>0.000</stddev>
        </noise>
      </camera>
      <camera name="left">
        <pose>0 0 0 0 0 0</pose>
        <horizontal_fov>1.5708</horizontal_fov>
        <image>
          <width>752</width>
          <height>480</height>
          <format>R8G8B8</format>
        </image>
        <clip>
          <near>0.02</near>
          <far>300</far>
        </clip>
        <noise>
          <type>gaussian</type>
          <mean>0.0</mean>
          <stddev>0.000</stddev>
        </noise>

其中,由於基礎沒學好,調整stereo_camera的攝像頭朝向位置搗鼓了半天,

pose設置x\y\z\r\p\y
攝像頭位置:x、y、z,即代表了當前攝像頭的安裝位置
在這裏插入圖片描述
旋轉角度:r、p、y,稱爲歐拉角
分別表示
rool:滾轉角,pitch:俯仰角,yaw:偏航角

攝像頭朝下,即
Pose 0,0,0,0,90,0
45度
Pose 0,0,0,0,45,0
後面的歐拉角應該是有範圍的,具體沒有搞明白

運行gazebo後,通過rviz查看圖像
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章