当前位置: 首页>>代码示例>>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;未经允许,请勿转载。