本文整理汇总了Python中PyPR2.useJointVelocityControl方法的典型用法代码示例。如果您正苦于以下问题:Python PyPR2.useJointVelocityControl方法的具体用法?Python PyPR2.useJointVelocityControl怎么用?Python PyPR2.useJointVelocityControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyPR2
的用法示例。
在下文中一共展示了PyPR2.useJointVelocityControl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: deactivate_trajectory_input
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import useJointVelocityControl [as 别名]
def deactivate_trajectory_input():
global rt_cnt, rt_position, rt_velocity, rt_acceleration, rt_orientation
rt_cnt = 0
PyPR2.registerRawTrajectoryInput( None )
assert PyPR2.useJointVelocityControl(False)
rt_orientation = None
rt_position = numpy.zeros(3)
rt_velocity = numpy.zeros(3)
rt_acceleration = numpy.zeros(3)
示例2: activate_trajectory_input
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import useJointVelocityControl [as 别名]
def activate_trajectory_input():
'''
To start receiving raw trajectory input, you should send a ROS service request call:
rosservice call /rhyth_dmp/recall_dmp_traj <figure name> <amplitude> <frequency> <sampling frequency> <number of cycles>
For example:
rosservice call /rhyth_dmp/recall_dmp_traj fig8 0.05 0.2 20 3
generates 3 cycles of figure eight with frequency 1.0
'''
global rt_cnt
rt_cnt = 0
PyPR2.registerRawTrajectoryInput( on_trajectory_received )
assert PyPR2.useJointVelocityControl(True)