1.连接机械臂
roslaunch ur_robot_driver ur5_bringup.launch limited:=true robot_ip:=10.9.55.135
2.运行示教器上的test.urp文件 并注意IP地址是否和机械臂一致 3.运行moveit
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true
4.打开可视化界面rviz
roslaunch ur5_moveit_config moveit_rviz.launch rviz_config:=$(rospack find ur5_moveit_config)/launch/moveit.rviz
5.连接爪子
roslaunch dh_hand_driver dh_hand_controller.launch
6.设置爪子
rosrun dh_hand_driver hand_controller_client [motorID][position][Force]
(2021 12 07更新)根据dh官方ros包提供的新的驱动,将开启夹爪步骤更新为 (
sudo chmod 666 /dev/ttyACM0
roslaunch dh_gripper_driver dh_gripper.launch
)
7.打开相机
k4aviewer
8.相机在rviz中的使用
roslaunch azure_kinect_ros_driver driver.launch
rviz(新开一个终端) 显示RGB图像:点击Add->Image->Image Topic->/rgb/image_raw 显示深度图像图像:点击Add->Image->Image Topic->/depth_to_rgb/image_raw 9.手眼标定
roslaunch easy_handeye ur5_k4a_calibration_setup.launch
roslaunch easy_handeye ur5_k4a_calibration.launch
rosrun image_view image_view image:=/aruco_tracker/result
(打开标定界面) #查看保存的标定文件
gedit ~/.ros/easy_handeye/ur5_k4a_handeyecalibration_eye_on_base.yaml
发布tf
roslaunch easy_handeye publish.launch eye_on_hand:=false
#查看TF
rosrun tf tf_echo /base /rgb_camera_link
10.在ur5与上位机进行通信后,获取ur5末端位姿的方法
rosrun moveit_commander moveit_commander_cmdline.py
use manipulator
current
|