ROS(10)- kinetic+ubuntu16.04使用ROS驱动UR3机械臂过程全纪录

版权声明:微信 kobesdu https://blog.csdn.net/kobesdu/article/details/85249060

1 下载驱动包

 git clone - b $ DISTRO - devel https://github.com/ros-industrial/universal_robot.git

2驱动包新版本修改
如果你的 UR软件版本> = 3.0,就需要把ur_driver替换成ur_modern_driver

下载ur_modern_driver git clone https://github.com/iron-ox/ur_modern_driver/tree/iron-kinetic-devel

下载后替换

3报错处理
此时 catkin_make会报错:

错误:'const struct hardware_interface :: ControllerInfo'没有名为'hardware_interface'的成员调用“make -j8 -l8”失败

需要修改

将 SRC / ur_hardware_interface.cpp中的

controller_it-> hardware_interface全部改为controller_it->型

此时 catkin_make将不再报错

4 运行测试
启动凉亭同时导入UR5的模型信息:

roslaunch ur_gazebo ur5.launch limited:= true(测试的时候会死)

!启动moveit的节点,并导入UR5的moveit配置文件!:

Roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:= true limited:= true

打开可视化可交互的Rviz界面:

roslaunch ur5_moveit_config moveit_rviz.launch config:= true

roslaunch ur3_moveit_config demo.launch

可以打开rviz,点球运动

roslaunch ur3_moveit_config moveit_rviz.launch

可以打开rviz,修改坐标增加机器人模型(没什么卵用)

运行这步之前必须运行上一步,加载模型

启动moveit!的节点,并导入UR3的moveit!配置文件

roslaunch ur3_moveit_config ur3_moveit_planning_execution.launch sim:= true

5  添加自己的测试代码
Ur_modern_driver里面的那个testmove.py,里面有可以直接往一个动作发轨迹控制运动;
也可以按照
http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/pick_place/pick_place_tutorial.html
里面的例程,基于乌尔驱动包进行控制

猜你喜欢

转载自blog.csdn.net/kobesdu/article/details/85249060