def spawnPepper(self, physics_client, translation=[0, 0, 0], quaternion=[0, 0, 0, 1], spawn_ground_plane=False): """ Loads a Pepper model in the simulation Parameters: physics_client - The id of the simulated instance in which the robot is supposed to be spawned translation - List containing 3 elements, the spawning translation [x, y, z] in the WORLD frame quaternions - List containing 4 elements, the spawning rotation as a quaternion [x, y, z, w] in the WORLD frame spawn_ground_plane - If True, the pybullet_data ground plane will be spawned Returns: pepper_virtual - A PepperVirtual object, the Pepper simulated instance """ pepper_virtual = PepperVirtual() if spawn_ground_plane: self._spawnGroundPlane(physics_client) pepper_virtual.loadRobot(translation, quaternion, physicsClientId=physics_client) return pepper_virtual
def spawnPepper(self, physics_client, translation=[0, 0, 0], quaternion=[0, 0, 0, 1], spawn_ground_plane=False): """ Loads a Pepper model in the simulation Parameters: physics_client - The id of the simulated instance in which the robot is supposed to be spawned translation - List containing 3 elements, the spawning translation [x, y, z] in the WORLD frame quaternions - List containing 4 elements, the spawning rotation as a quaternion [x, y, z, w] in the WORLD frame spawn_ground_plane - If True, the pybullet_data ground plane will be spawned Returns: pepper - A PepperVirtual object, the Pepper simulated instance """ pepper = PepperVirtual() if spawn_ground_plane: pybullet.setAdditionalSearchPath(pybullet_data.getDataPath()) pybullet.loadMJCF("mjcf/ground_plane.xml", physicsClientId=physics_client) pepper.loadRobot(translation, quaternion, physicsClientId=physics_client) return pepper