当前位置:   article > 正文

realsense+aucro_ros位姿识别测试

位姿识别

1 准备工作

cd ~/your_workspace/src
git clone -b melodic-devel https://github.com/pal-robotics/aruco_ros.git
cd ..
catkin_make

  • 1
  • 2
  • 3
  • 4
  • 5

2.修改launch文件

<launch>
 
    <arg name="markerId"        default="582"/>
    <arg name="markerSize"      default="0.034"/>    <!-- in m -->
    <arg name="eye"             default="left"/>
    <arg name="marker_frame"    default="aruco_marker_frame"/>
    <arg name="ref_frame"       default=""/>  <!-- leave empty and the pose will be published wrt param parent_name -->
    <arg name="corner_refinement" default="LINES" /> <!-- NONE, HARRIS, LINES, SUBPIX -->
 
 
    <node pkg="aruco_ros" type="single" name="aruco_single">
<!--        <remap from="/camera_info" to="/stereo/$(arg eye)/camera_info" />-->
<!--        <remap from="/image" to="/stereo/$(arg eye)/image_rect_color" />-->
        <remap from="/camera_info" to="/camera/color/camera_info" />
        <remap from="/image" to="/camera/color/image_raw" />
        <param name="image_is_rectified" value="True"/>
        <param name="marker_size"        value="$(arg markerSize)"/>
        <param name="marker_id"          value="$(arg markerId)"/>
        <param name="reference_frame"    value="$(arg ref_frame)"/>   <!-- frame in which the marker pose will be refered -->
<!--        <param name="camera_frame"       value="stereo_gazebo_$(arg eye)_camera_optical_frame"/>-->
        <param name="camera_frame"       value="/camera_link"/>
        <param name="marker_frame"       value="$(arg marker_frame)" />
        <param name="corner_refinement"  value="$(arg corner_refinement)" />
    </node>
 
</launch>
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27

修改的位置有三个地方

<remap from="/camera_info"  to="/stereo/$(arg eye)/camera_info" />        
<remap from="/image" to="/stereo/$(arg eye)/image_rect_color"  />
 
<param name="camera_frame"   value="stereo_gazebo_$(arg eye)_camera_optical_frame"/>

  • 1
  • 2
  • 3
  • 4
  • 5

3 运行

roslaunch realsense2_camera rs_camera.launch  //启动realsense
roslaunch aruco_ros single.launch 
# 观察识别效果
$ rosrun image_view image_view image:=/aruco_single/result
# 查看位姿
$ rostopic echo /aruco_single/pose
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

4.aucro下载网站

地址

注意:aucro_ros识别的是
original aruco

5.识别效果

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/799881
推荐阅读
相关标签