當前位置: 首頁>>代碼示例>>Python>>正文


Python Twist.points方法代碼示例

本文整理匯總了Python中geometry_msgs.msg.Twist.points方法的典型用法代碼示例。如果您正苦於以下問題:Python Twist.points方法的具體用法?Python Twist.points怎麽用?Python Twist.points使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在geometry_msgs.msg.Twist的用法示例。


在下文中一共展示了Twist.points方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: initial_arm

# 需要導入模塊: from geometry_msgs.msg import Twist [as 別名]
# 或者: from geometry_msgs.msg.Twist import points [as 別名]
>>>>>>> 04206a0d0c433a3c0ca22cced7672835d0b6a8a5
class VisualServoExecutionNode:
  def initial_arm(self, cs):
    rospy.loginfo('Setting to Initial msg...')
    cs.carefree_switch('l', '%s_arm', '$(find visual_servo)/params/rmc_joint_trajectory_params.yaml' )
    rospy.sleep(0.5)
    pub = rospy.Publisher('l_arm/command', JointTrajectory)
    msg = JointTrajectory()
    pts = JointTrajectoryPoint()
<<<<<<< HEAD
    pts.positions = array('d', [0.323, -0.6460, 0.00,
        -1.273, -10.512, 0.0570, 0.163])
 
    pts.time_from_start = rospy.Duration(3.0)
    msg.points = [pts]
   
    msg.joint_names = ['l_shoulder_pan_joint', 'l_shoulder_lift_joint', 'l_upper_arm_roll_joint','l_elbow_flex_joint', 'l_forearm_roll_joint','l_wrist_flex_joint','l_wrist_roll_joint']
    # msg.joint_names = ['r_shoulder_pan_joint', 'r_shoulder_lift_joint', 'r_upper_arm_roll_joint','r_elbow_flex_joint', 'r_forearm_roll_joint','r_wrist_flex_joint','r_wrist_roll_joint']
=======
    pts.positions = array('d', [-1.32734204881265387, -0.64601608409943324, -1.4620635485239604,
                                      -1.2729772622637399, -10.5123303230158518, 0.0570651396529178, 0.163787989862169])
    pts.time_from_start = rospy.Duration(3.0)
    msg.points = [pts]
    msg.joint_names = ['r_shoulder_pan_joint', 'r_shoulder_lift_joint', 'r_upper_arm_roll_joint',
                       'r_elbow_flex_joint', 'r_forearm_roll_joint','r_wrist_flex_joint','r_wrist_roll_joint']
>>>>>>> 04206a0d0c433a3c0ca22cced7672835d0b6a8a5
    # pub.publish(msg)
    rospy.sleep(0.5)
    # pub.publish(msg)
    rospy.sleep(3)
開發者ID:balakumar-s,項目名稱:cpl,代碼行數:32,代碼來源:vs_execute_node.py


注:本文中的geometry_msgs.msg.Twist.points方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。