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


Python pybullet.TORQUE_CONTROL屬性代碼示例

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


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

示例1: set_torque

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def set_torque(self, torque):
		self._p.setJointMotorControl2(bodyIndex=self.bodies[self.bodyIndex], jointIndex=self.jointIndex, controlMode=pybullet.TORQUE_CONTROL, force=torque) #, positionGain=0.1, velocityGain=0.1) 
開發者ID:utra-robosoccer,項目名稱:soccer-matlab,代碼行數:4,代碼來源:robot_bases.py

示例2: control_joint_torque

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def control_joint_torque(body, joint, torque):
        p.setJointMotorControl2(
                bodyIndex=body,
                jointIndex=joint,
                controlMode=p.TORQUE_CONTROL,
                force=torque) 
開發者ID:StanfordVL,項目名稱:NTP-vat-release,代碼行數:8,代碼來源:bullet_physics_engine.py

示例3: gripper

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def gripper(self, cmd, mode=pb.POSITION_CONTROL):
        '''
        Gripper commands need to be mirrored to simulate behavior of the actual
        UR5. Converts one command input to 6 joint positions, used for the
        robotiq gripper. This is a rough simulation of the way the robotiq
        gripper works in practice, in the absence of a plugin like the one we
        use in Gazebo.

        Parameters:
        -----------
        cmd: 1x1 array of floating point position commands in [-0.8, 0]
        mode: PyBullet control mode
        '''

        cmd = cmd[0]
        # This is actually only a 1-DOF gripper
        if cmd < -0.1:
            cmd_array = [-cmd + 0.1, -cmd + 0.1, cmd + 0.15,
                    -cmd + 0.1, -cmd + 0.1, cmd + 0.15]
        else:
            cmd_array = [-cmd , -cmd, cmd, -cmd, -cmd, cmd]
        forces = [25., 25., 25., 25., 25., 25.]
        gains = [0.1, 0.1, 0.15, 0.1, 0.1, 0.15]
        #if abs(cmd) < -0.01:
        #    mode = pb.TORQUE_CONTROL
        #    forces = [0.] * len(cmd_array)
        #else:

        #gripper_indices = [left_knuckle, left_inner_knuckle,
        #               left_fingertip, right_knuckle, right_inner_knuckle,
        #               right_fingertip]

        pb.setJointMotorControlArray(self.handle, self.gripper_indices, mode,
                                     cmd_array,
                                     forces=forces,
                                     positionGains=gains) 
開發者ID:jhu-lcsr,項目名稱:costar_plan,代碼行數:38,代碼來源:ur5_robotiq.py

示例4: set_torque

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def set_torque(self, torque):
        p.setJointMotorControl2(bodyIndex=self.bodies[self.bodyIndex], jointIndex=self.jointIndex, controlMode=p.TORQUE_CONTROL, force=torque) #, positionGain=0.1, velocityGain=0.1) 
開發者ID:gkahn13,項目名稱:GtS,代碼行數:4,代碼來源:robot_bases.py

示例5: _SetMotorTorqueById

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def _SetMotorTorqueById(self, motor_id, torque):
        p.setJointMotorControl2(bodyIndex=self.minitaur,
                                jointIndex=motor_id,
                                controlMode=p.TORQUE_CONTROL,
                                force=torque) 
開發者ID:alexsax,項目名稱:midlevel-reps,代碼行數:7,代碼來源:minitaur.py

示例6: set_torque

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def set_torque(self, torque):
		p.setJointMotorControl2(bodyIndex=self.bodies[self.bodyIndex], jointIndex=self.jointIndex, controlMode=p.TORQUE_CONTROL, force=torque) #, positionGain=0.1, velocityGain=0.1) 
開發者ID:benelot,項目名稱:bullet-gym,代碼行數:4,代碼來源:gym_mujoco_xml_env.py

示例7: set_torque

# 需要導入模塊: import pybullet [as 別名]
# 或者: from pybullet import TORQUE_CONTROL [as 別名]
def set_torque(self, torque):
        p.setJointMotorControl2(self.bodies[self.bodyIndex],self.jointIndex,p.TORQUE_CONTROL, force=torque) 
開發者ID:benelot,項目名稱:bullet-gym,代碼行數:4,代碼來源:MJCFCommon.py


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