baxter 机器人easyhandeye乐视astra pro手眼标定

链接:

        直接参考链接:
                baxter realsense435i easy_hand 手眼标定 - 知乎 (zhihu.com)

                Hymwgk/baxter_hand_eye_calibrate: 基于easy_handeye开源项目,对baxter双臂协作机器人进行手眼标定(Kinect v2眼在手外) (github.com)

        间接参考:

                UR+RealSense手眼标定(eye-to-hand) (xjx100.cn)

      机械臂与RealSense相机手眼标定-CSDN博客

 【手眼标定】ros / easy_handeye + ur5 + realsense d435i - 知乎 (zhihu.com)

使用环境为ubuntu16.04,ros kinetic 

1、astra pro相机内参标定

2021-04-28_安徽大学奥比中光_安徽大学人机共融系统与智能装备工程实验室的博客-CSDN博客

 标定前请在 ./ros 文件夹下新建一个camera_info的文件夹,用于存放生成得yaml文件

标定后修改asrtapro.launch文件中的camera_info url路径为yaml文件路径

rostopic echo /camera/rgb/camera_info

查看相机内参是否成功

1、安装依赖

安装aruco_ros

cd ~/catkin_ws/src
git clone -b kinetic-devel https://gitcode.net/mirrors/pal-robotics/aruco_ros.git
cd ..
catkin_make

 安装vision_visp / visp_hand2eye_calibration

cd ~/catkin_ws/src
git clone -b kinetic-devel https://github.com/lagadic/vision_visp.git
cd ..
catkin_make --pkg visp_hand2eye_calibration

安装 easy_handeye

cd ~/catkin_ws/src
git clone https://github.com/IFL-CAMP/easy_handeye
cd ..
catkin_make

rosdep install -iyr --from-paths src出错提示rosdep update,则按照这篇文章:发烫的椰子:sudo rosdep init重置,如果20-default.list已存在则先删除。再次运行安装其他库后,发现在尝试安装最后一个库transforms3d时出错,则

pip install --upgrade setuptools && python -m pip install --upgrade pip

更新pip和setuptools运行rosdep install -iyr --from-paths src,如果继续出错则直接安装transforms3d

如果无法在原有的baxter工作空间进行编译(报错),那就新建一个工作空间

2、修改launch文件

在easyhandeye功能包中的launch文件夹夹下新建一个launch文件

<launch>
    <arg name="namespace_prefix" default="baxter_realsense_handeyecalibration" />

    <arg name="marker_size" doc="Size of the ArUco marker used, in meters" default="0.1" />
    <arg name="marker_id" doc="The ID of the ArUco marker used" default="582" />

    <!-- Start rqt_image_view node -->
    <node pkg="rqt_image_view" type="rqt_image_view" name="rqt_image_view">
        <remap from="/camera/rgb/image_raw" to="/aruco_tracker/result" /> <!-- Replace with your image topic -->
    </node>

    <!-- start the Realsense435i -->
    <include file="$(find astra_camera)/launch/astrapro.launch" />

    <!-- start ArUco -->
    <node name="aruco_tracker" pkg="aruco_ros" type="single">
        <remap from="/camera_info" to="/camera/rgb/camera_info" />
        <remap from="/image" to="/camera/rgb/image_raw" />
        <param name="image_is_rectified" value="true"/>
        <param name="marker_size"        value="$(arg marker_size)"/>
        <param name="marker_id"          value="$(arg marker_id)"/>
        <param name="reference_frame"    value="camera_link"/>
        <param name="camera_frame"       value="camera_link"/>
        <param name="marker_frame"       value="camera_marker" />
    </node>

   

    <!-- start easy_handeye -->
    <include file="$(find easy_handeye)/launch/calibrate.launch" >
        <arg name="namespace_prefix" value="$(arg namespace_prefix)" />
        <arg name="eye_on_hand" value="false" />
        <arg name="move_group" default="left_arm"  doc="the name of move_group for the automatic robot motion with MoveIt!" />

	
        <arg name="tracking_base_frame" value="camera_link" />
        <arg name="tracking_marker_frame" value="camera_marker" />
        <arg name="robot_base_frame" value="base" />
        <arg name="robot_effector_frame" value="left_gripper" />

        <!--disable automatic robot movement-->
        <arg name="freehand_robot_movement" value="false" />
        <arg name="robot_velocity_scaling" value="0.5" />
        <arg name="robot_acceleration_scaling" value="0.2" />

	<arg name="start_rviz" value="false" />
	

    </include>

</launch>

3、开始进行标定

3.1启动机器人

./baxter.sh 

rosrun baxter_tools tuck_arms.py -u、

rosrun baxter_interface joint_trajectory_action_server.py

3.2另开一终端

此命令解决类似问题:

[ INFO] [1641973489.386597665, 43.241000000]: Didn't receive robot state (joint angles) with recent timestamp within 1 seconds.
Check clock synchronization if your are running ROS across multiple machines!
[ WARN] [1641973489.387272503, 43.241000000]: Failed to fetch current robot state.
 

rosrun topic_tools relay robot/joint_states joint_states

3.3打开moveit

roslaunch baxter_moveit_config baxter_grippers.launch

3.4执行标定launch文件

cv2问题:

kinova与intel realsense D435手眼标定-CSDN博客

 

’module’ object has no attribute 'CALIB_HAND_EYE_TSAI’
将 handeye_calibration_backend_opencv.py 文件中 import cv2 改为

import sys
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')

sys.path.insert(0,'/home/cothink/.local/lib/python2.7/site-packages')
import cv2
sys.path.append('/opt/ros/kinetic/lib/python2.7/dist-packages')

这个问题是由于 ros 安装的 python 和自己系统中安装的 python 调用时出问题,具体什么问题?我不知道。出处
如果还不行,卸载掉opencv相关包,重新安装opencv_contrib_python。如python版本也是2.7的话,将其版本指定 “==4.2.0.32”,具体支持见 opencv-python版本对应

解决后没有爆报错。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值