python机械手标定_机械手姿态的获取,ros,臂,当前,位姿
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy, sys
import moveit_commander
from geometry_msgs.msg import Pose
class MoveItCartesianDemo:
def __init__(self):
# 初始化move_group的API
moveit_commander.roscpp_initialize(sys.argv)
# 初始化ROS節點
rospy.init_node('moveit_cartesian_demo', anonymous=True)
# 初始化需要使用move group控制的機械臂中的arm group
arm = moveit_commander.MoveGroupCommander('manipulator')
# 獲取終端link的名稱
end_effector_link = arm.get_end_effector_link()
# 獲取當前位姿數據做為機械臂運動的起始位姿
start_pose = arm.get_current_pose(end_effector_link).pose
rospy.loginfo(start_pose)
if __name__ == "__main__":
try:
MoveItCartesianDemo()
except rospy.ROSInterruptException:
pass
總結
以上是生活随笔為你收集整理的python机械手标定_机械手姿态的获取,ros,臂,当前,位姿的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 种族制度是印度的特产吗?
- 下一篇: nginx https 访问http_N