资源简介
baxter机器人抓取杯子Baxter_pick_cup_game-master.zip,进行抓取杯子的操作,自动识别,自动抓取,包括物体识别加运动规划
代码片段和文件信息
#!/usr/bin/env python
“““
Random select a cup. Approach to it. grab the cup. lift it a liite bit and then put it back
press ctrl-c to break the loop
input topic:
/cup_baxter_coordinates
cup center pose in Baxter coordinate
data structure: ros custom point array message
“““
import sys
import tf
import math
import rospy
import time
import struct
import numpy as np
import baxter_interface
import baxter_pykdl
import baxter_external_devices
import argparse
from dynamixel_msgs.msg import JointState
from std_msgs.msg import Float32
from std_msgs.msg import Float64
from std_msgs.msg import Header
from baxter_kdl.kdl_parser import kdl_tree_from_urdf_model
from urdf_parser_py.urdf import URDF
from moveit_commander import conversions
from baxter_core_msgs.srv import SolvePositionIK SolvePositionIKRequest
from geometry_msgs.msg import (PointPoseStampedPoseQuaternion)
from geometry_msgs.msg import Point
from position_calibration.msg import pointarray
from pynput.keyboard import Key Controller
from random import randint
cupCoordinates = np.array([[0.00.00.0][0.00.00.0][0.00.00.0]])
index = 0
# Robot arm move method. Grab from Baxter offical website
def IKMove(tranx trany tranz rotax rotay rotaz rotaw):
right_arm = baxter_interface.Limb(‘left‘)
ns = “ExternalTools/“ + ‘left‘ + “/PositionKinematicsNode/IKService“
iksvc = rospy.ServiceProxy(ns SolvePositionIK)
ikreq = SolvePositionIKRequest()
hdr = Header(stamp=rospy.Time.now() frame_id=‘base‘)
poses = {
‘left‘: PoseStamped(
header=hdr
pose=Pose(
position=Point(
x=tranx
y=trany
z=tranz
)
orientation=Quaternion(
x=rotax
y=rotay
z=rotaz
w=rotaw
)
)
)
}
ikreq.pose_stamp.append(poses[‘left‘])
try:
rospy.wait_for_service(ns 5.0)
resp = iksvc(ikreq)
except (rospy.ServiceException rospy.ROSException) e:
rospy.logerr(“Service call failed: %s“ % (e))
return 1
# Check if result valid and type of seed ultimately used to get solution
# convert rospy‘s string representation of uint8[]‘s to int‘s
resp_seeds = struct.unpack(‘<%dB‘ % len(resp.result_type)
resp.result_type)
if (resp_seeds[0] != resp.RESULT_INVALID):
seed_str = {
ikreq.SEED_USER: ‘User Provided Seed‘
ikreq.SEED_CURRENT: ‘Current Joint Angles‘
ikreq.SEED_NS_MAP: ‘Nullspace Setpoints‘
}.get(resp_seeds[0] ‘None‘)
print(“SUCCESS - Valid Joint Solution Found from Seed Type: %s“ %
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-10-15 20:04 Baxter_pick_cup_game-master\
文件 461 2018-10-15 20:04 Baxter_pick_cup_game-master\README.md
目录 0 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\
文件 6843 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\CMakeLists.txt
目录 0 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\launch\
文件 466 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\launch\controller_manager.launch
文件 7513 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\launch\kinect2_bridge.launch
文件 368 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\launch\start_tilt_controller.launch
目录 0 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\msg\
文件 41 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\msg\pointarray.msg
文件 3243 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\package.xm
文件 774 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\readme.txt
目录 0 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\src\
文件 6358 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\src\baxter_left_arm_move_new.py
文件 2296 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\src\cup_detector.py
文件 20237 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\src\cup_detector.xm
文件 4694 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\src\location_convertor_three_cups.py
文件 280 2018-10-15 20:04 Baxter_pick_cup_game-master\baxter_pickup_cup\tilt.yaml
文件 25868695 2018-10-15 20:04 Baxter_pick_cup_game-master\pick_cup.gif
- 上一篇:boson netsim6.0和 注册机
- 下一篇:蚁群算法论文合集
相关资源
- 中兴盒子不开启adb情况下抓取日志和
- Yang–Baxter变形,AdS / CFT和扭转非交
- WebZip抓取站点工具
- 小程序素材抓取.exe
- httptrack 整站抓取工具
- 基于PowerBuilder 的网页数据抓取
- 腾讯热力图数据腾讯全球移动定位数
- ROST WordParser206472
- DELPHI 抓取PDF内容
- Linux网络数据包抓取源码分析和包过滤
- 最新汽车之家车型数据以及抓取方法
- 基于机器视觉和深度学习的目标识别
- 淘宝评论工具 淘宝评论抓取工具
- WPE封包抓取
- usb调试软件(USBTrace)
- IMooc视频抓取器.rar
- 美科新闻抓取程序源码
- STM32F1控制六自由度机器人 程序源码,
- 百度地图抓取工具
- 屏幕取词源码-可二次开发
- 网站小说抓取超级工具
- 移动机械臂动力学控制与基于视觉的
- 正方教务系统数据抓取含验证码识别
- ROSTNewsAnalysis Tools
- 采集软件 网页数据抓取的得力工具
- (根据百度地图最新抓取)全国矢量
- Unity3D 室内小场景搭建(抓取、抛扔物
- MobaXterm正版安装包
- 2015rococup nimyrio开发程序备份
- 基于Winpcap实现抓取数据包
评论
共有 条评论