使用ROS-I接口通过MoveIt包安装和操作ABB机器人
使用ROS-I接口安装和操作ABB机器人
1.在RobotStudio中使用仿真机器人(用真实机器人的可以跳过这一步)
设置用于ROS-Industrial驱动程序的ABB RobotStudio模拟器。
http://wiki.ros.org/abb/Tutorials/RobotStudio
通过使用仿真机械臂替代真实机械臂,可以在ROS和ABB机械臂进行通信仿真。这种情况下,通常有两台PC,一台运行windows及ABB机械臂,winpc;另一台运行ubuntu和ROS,rospc。
2.安装ABB ROS服务器
在ABB机械手控制器上安装ROS服务器代码并配置所需的控制器设置。
http://wiki.ros.org/abb/Tutorials/InstallServer
ABB ROS服务器代码是用RAPID语言编写,使用了套接字接口和多个并行任务。
服务器代码文件
-
由所有任务共享
- ROS_common.sys -- 所有文件共享的全局变量和数据类型
- ROS_socket.sys -- 套接字处理和simple_message实现
- ROS_messages.sys -- 特定消息类型的实现
-
特定任务模块
- ROS_stateServer.mod -- 广播联合位置和状态数据
- ROS_motionServer.mod -- 接收机器人运动命令
- ROS_motion.mod -- 向机器人发出运动命令
3.运行ROS服务器
编译abb配置包,用ROS调用
运行ABB ROS服务器,因此机器人将执行从ROS客户端节点发送的运动命令
链接步骤:
1.更改RAPID文件:查看目前winpc的IP地址,并写入到ROS_socket.sys中对应处。
在ROS端编译完成abb和abb_experimental包。
2.确认ROSPC能ping通ROBOTPC (设置静态ip,设置虚拟机为桥接模式ROBOTPC得和ROSPC在同一个网段下)
3.在终端启动:
roslaunch abb_irb120_moveit_config moveit_planning_execution.launch sim:=false robot_ip:=192.168.1.100 //( IP of robot PC)
4.手动模式:程序指针 "PP to Main",Enable使得 "Motors On",点击运行按钮。即可在rospc端控制机械臂运动。
自动模式: "Motors On"并点击运行按钮。
附:
编译abb配置包
mkdir -p abb_experimental_ws/src
cd abb_experimental_ws/src
git clone -b kinetic-devel [email protected]:ros-industrial/abb_experimental.git
wstool init .
wstool merge abb_experimental/abb_experimental.rosinstall
sudo apt install ros-kinetic-industrial-core ros-kinetic-moveit
wstool init .
wstool merge abb_experimental/abb_experimental.rosinstall
wstool merge abb_experimental.rosinstall
wstool update
cd ..
catkin build
source devel/setup.bash
echo $ROS_PACKAGE_PATH
ROS端网络设置
ifconfig -a
sudo vi /etc/network/interfaces
sudo vi /etc/resolv.conf //编译DNS服务器
sudo /etc/init.d/networking restart
ping www.baidu.com //网络设置测试
ping 10.166.229.146 //ROBOTPC ip
cd ~/abb_experimental_ws/
source devel/setup.bash
roslaunch abb_irb120_moveit_config moveit_planning_execution.launch sim:=false robot_ip:=
RobotStudio机器人仿真设置
Running in MANUAL mode
- Display the ABB Production Window (or Program Editor) screen
-
Check to see that a Program Pointer is displayed
- press the "PP to Main" softkey if required
-
Hold the pendant Enable Switch
- the drives should power on, and the screen should show "Motors On"
- Press the PLAY button to run the program
- Issue the desired motion command from the ROS/PC application
Running in AUTO mode
-
Press the Drives On button on the controller
- the light should stay on, and the pendant should show "Motors On"
- Press the PLAY button to run the program
完成连接:)