Sawyer协作机械臂环境配置与执行(Ubuntu18.04)

Sawyer环境配置与执行(Ubuntu18.04)

Sawyer协作机械臂环境配置与执行(Ubuntu18.04)_第1张图片

Sawyer机械臂环境配置与执行

  • Sawyer环境配置与执行(Ubuntu18.04)
    • 1.生成工作区间
    • 2.安装SDK依赖包
    • 3.安装SDK
    • 4.配置本机信息
    • 5.连接机械臂
    • 6. 操作示例与代码模板

1.生成工作区间

mkdir -p ~/ros_ws/src
source /opt/ros/melodic/setup.bash
cd ~/ros_ws
catkin_make

2.安装SDK依赖包

sudo apt-get update
sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-melodic-control-msgs ros-melodic-joystick-drivers ros-melodic-xacro ros-melodic-tf2-ros ros-melodic-rviz ros-melodic-cv-bridge ros-melodic-actionlib ros-melodic-actionlib-msgs ros-melodic-dynamic-reconfigure ros-melodic-trajectory-msgs ros-melodic-rospy-message-converter

3.安装SDK

cd ~/ros_ws/src
wstool init .
git clone https://github.com/RethinkRobotics/sawyer_robot.git
wstool merge sawyer_robot/sawyer_robot.rosinstall
wstool update

source /opt/ros/melodic/setup.bash
cd ~/ros_ws
catkin_make

4.配置本机信息

在SDK的路径下找到intera.sh文件,根据本机和机器信息对前几行的配置参数进行修改

#!/bin/bash
# Copyright (c) 2013-2016, Rethink Robotics
# All rights reserved.

# This file is to be used in the *root* of your Catkin workspace.

# This is a convenient script which will set up your ROS environment and
# should be executed with every new instance of a shell in which you plan on
# working with Intera.

# Clear any previously set your_ip/your_hostname
unset your_ip
unset your_hostname
#-----------------------------------------------------------------------------#
#                 USER CONFIGURABLE ROS ENVIRONMENT VARIABLES                 #
#-----------------------------------------------------------------------------#
# Note: If ROS_MASTER_URI, ROS_IP, or ROS_HOSTNAME environment variables were
# previously set (typically in your .bashrc or .bash_profile), those settings
# will be overwritten by any variables set here.

# Specify Robot's hostname
# 修改为"机器机箱SN码.locla"
robot_hostname="021606CP00014.local"

# Set *Either* your computers ip address or hostname. Please note if using
# your_hostname that this must be resolvable to the Robot.
# 修改为本机ip
your_ip="10.10.29.202"

# Specify ROS distribution (e.g. kinetic, indigo, hydro, etc.)
# 修改为本机使用的ROS版本
ros_version="melodic"
#-----------------------------------------------------------------------------#

此处注意:

​ robot_hostname格式可以选择 机械臂主机ip / 机箱SN码 / 机箱SN码.local三个格式,在开机时等待屏幕左上角出现红色提示"Preparing to boot intera…"时用键盘"Ctrl + F"进入机械臂配置界面
Sawyer协作机械臂环境配置与执行(Ubuntu18.04)_第2张图片

  • 在配置界面的首页下有"Next boot in"选择项

    –选择"itera"会进入机箱主机自带的协同操作系统,在其中可以编辑指定作业

    –选择"intera-SDK"后进入SDK模式,在该模式下进行自定义代码执行

Sawyer协作机械臂环境配置与执行(Ubuntu18.04)_第3张图片

  • 在configuration中进行ip网关配置,同时下面的ROS Naming Type可以定义robot_hostname的格式(机械臂主机ip / 机箱SN码 / 机箱SN码.local),在intera.sh中进行对应修改

Sawyer协作机械臂环境配置与执行(Ubuntu18.04)_第4张图片

  • 全部配置完成后重启即可

5.连接机械臂

进入工作空间,执行intera.sh脚本,完成与机器人的连接通信,连接成功后能够输出机械臂发出的rostopic

注意:之后对机械臂真机进行的操作都需要先执行intera.sh脚本先实现真机通信才能够继续进行

6. 操作示例与代码模板

可以参考如下链接:

Moveit真机配置

Gazebo仿真配置

代码执行模板

你可能感兴趣的:(Ros_Develop,1024程序员节,机器人,c++,ubuntu,机械臂)