repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/envs/locomotion/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/envs/locomotion/humanoid_env.py | from pybulletgym.envs.mujoco.envs.locomotion.walker_base_env import WalkerBaseMuJoCoEnv
from pybulletgym.envs.mujoco.robots.locomotors.humanoid import Humanoid
class HumanoidMuJoCoEnv(WalkerBaseMuJoCoEnv):
def __init__(self, robot=None):
self.robot = robot if robot is not None else Humanoid()
Walk... | 518 | 46.181818 | 87 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/envs/locomotion/walker2d_env.py | from pybulletgym.envs.mujoco.envs.locomotion.walker_base_env import WalkerBaseMuJoCoEnv
from pybulletgym.envs.mujoco.robots.locomotors.walker2d import Walker2D
import numpy as np
class Walker2DMuJoCoEnv(WalkerBaseMuJoCoEnv):
def __init__(self):
self.robot = Walker2D()
WalkerBaseMuJoCoEnv.__init__(... | 1,600 | 31.673469 | 170 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/envs/pendulum/inverted_double_pendulum_env.py | from pybulletgym.envs.mujoco.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.mujoco.robots.pendula.inverted_double_pendulum import InvertedDoublePendulum
from pybulletgym.envs.mujoco.scenes.scene_bases import SingleRobotEmptyScene
class InvertedDoublePendulumMuJoCoEnv(BaseBulletEnv):
def __init__(self):... | 1,735 | 41.341463 | 98 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/envs/pendulum/inverted_pendulum_env.py | from pybulletgym.envs.mujoco.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.mujoco.robots.pendula.inverted_pendulum import InvertedPendulum
from pybulletgym.envs.mujoco.scenes.scene_bases import SingleRobotEmptyScene
import numpy as np
class InvertedPendulumMuJoCoEnv(BaseBulletEnv):
def __init__(self):... | 1,476 | 36.871795 | 95 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/envs/pendulum/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/scenes/stadium.py | import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
os.sys.path.insert(0,parentdir)
from .scene_bases import Scene
import pybullet
class StadiumScene(Scene):
multiplayer = False
zero_at_running_strip_start_line = True ... | 1,603 | 40.128205 | 121 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/scenes/scene_bases.py | import os
import sys
sys.path.append(os.path.dirname(__file__))
import gym
class Scene:
"""A base class for single- and multiplayer scenes"""
def __init__(self, bullet_client, gravity, timestep, frame_skip):
self._p = bullet_client
self.np_random, seed = gym.utils.seeding.np_random(None)
... | 2,707 | 32.432099 | 161 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/scenes/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/robot_bases.py | import pybullet
import gym, gym.spaces, gym.utils
import numpy as np
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
os.sys.path.insert(0,parentdir)
class XmlBasedRobot:
"""
Base class for mujoco .xml based agents.
""... | 12,537 | 32.345745 | 195 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/walker_base.py | from pybulletgym.envs.mujoco.robots.robot_bases import XmlBasedRobot
import numpy as np
class WalkerBase(XmlBasedRobot):
def __init__(self, power):
self.power = power
self.camera_x = 0
self.start_pos_x, self.start_pos_y, self.start_pos_z = 0, 0, 0
self.walk_target_x = 1e3 # kilome... | 3,843 | 44.223529 | 154 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/humanoid.py | from pybulletgym.envs.mujoco.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Humanoid(WalkerBase, MJCFBasedRobot):
self_collision = True
foot_list = ["right_foot", "left_foot"] # "left_hand", "right_hand"
def ... | 3,911 | 47.9 | 157 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/ant.py | from pybulletgym.envs.mujoco.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Ant(WalkerBase, MJCFBasedRobot):
foot_list = ['front_left_foot', 'front_right_foot', 'left_back_foot', 'right_back_foot']
def __init__(se... | 1,334 | 43.5 | 126 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/walker2d.py | from pybulletgym.envs.mujoco.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Walker2D(WalkerBase, MJCFBasedRobot):
"""
Walker2D implementation based on MuJoCo.
"""
foot_list = ["foot", "foot_left"]
def ... | 1,918 | 38.979167 | 154 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/half_cheetah.py | from pybulletgym.envs.mujoco.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class HalfCheetah(WalkerBase, MJCFBasedRobot):
"""
Half Cheetah implementation based on MuJoCo.
"""
foot_list = ["ffoot", "fshin", "fthi... | 2,403 | 42.709091 | 154 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/locomotors/hopper.py | from pybulletgym.envs.mujoco.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Hopper(WalkerBase, MJCFBasedRobot):
"""
Hopper implementation based on MuJoCo.
"""
foot_list = ["foot"]
def __init__(self):
... | 1,722 | 39.069767 | 154 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/manipulators/pusher.py | from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Pusher(MJCFBasedRobot):
min_target_placement_radius = 0.5
max_target_placement_radius = 0.8
min_object_to_target_distance = 0.1
max_object_to_target_distance = 0.4
def __init__(self):
MJCFBasedR... | 4,955 | 53.461538 | 106 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/manipulators/reacher.py | from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Reacher(MJCFBasedRobot):
TARG_LIMIT = 0.27
def __init__(self):
MJCFBasedRobot.__init__(self, 'reacher.xml', 'body0', action_dim=2, obs_dim=9)
def robot_specific_reset(self, bullet_client):
self... | 2,176 | 45.319149 | 133 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/manipulators/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/manipulators/thrower.py | from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
class Thrower(MJCFBasedRobot):
min_target_placement_radius = 0.1
max_target_placement_radius = 0.8
min_object_placement_radius = 0.1
max_object_placement_radius = 0.8
def __init__(self):
MJCFBasedRobot.__init__(self, 't... | 4,977 | 51.4 | 110 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/manipulators/striker.py | from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
class Striker(MJCFBasedRobot):
min_target_placement_radius = 0.1
max_target_placement_radius = 0.8
min_object_placement_radius = 0.1
max_object_placement_radius = 0.8
def __init__(self):
MJCFBasedRobot.__init__(self, 's... | 5,308 | 52.626263 | 109 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/pendula/inverted_double_pendulum.py | from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class InvertedDoublePendulum(MJCFBasedRobot):
def __init__(self):
MJCFBasedRobot.__init__(self, 'inverted_double_pendulum.xml', 'cart', action_dim=1, obs_dim=11)
def robot_specific_reset(self, bullet_client):
... | 1,837 | 42.761905 | 104 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/pendula/inverted_pendulum.py | from pybulletgym.envs.mujoco.robots.robot_bases import MJCFBasedRobot
import numpy as np
class InvertedPendulum(MJCFBasedRobot):
def __init__(self):
MJCFBasedRobot.__init__(self, 'inverted_pendulum.xml', 'cart', action_dim=1, obs_dim=4)
def robot_specific_reset(self, bullet_client):
self._p ... | 1,584 | 28.90566 | 95 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/mujoco/robots/pendula/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/env_bases.py | import gym, gym.spaces, gym.utils, gym.utils.seeding
import numpy as np
import pybullet
from pybullet_utils import bullet_client
from pkg_resources import parse_version
class BaseBulletEnv(gym.Env):
"""
Base class for Bullet physics simulation environments in a Scene.
These environments create single-player scene... | 3,416 | 24.691729 | 91 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/manipulation/pusher_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.robots.manipulators.pusher import Pusher
from pybulletgym.envs.roboschool.scenes.scene_bases import SingleRobotEmptyScene
import numpy as np
class PusherBulletEnv(BaseBulletEnv):
def __init__(self):
self.... | 2,166 | 35.728814 | 112 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/manipulation/reacher_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.scenes.scene_bases import SingleRobotEmptyScene
import numpy as np
from pybulletgym.envs.roboschool.robots.manipulators.reacher import Reacher
class ReacherBulletEnv(BaseBulletEnv):
def __init__(self):
se... | 1,567 | 39.205128 | 131 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/manipulation/striker_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.robots.manipulators.striker import Striker
from pybulletgym.envs.roboschool.scenes.scene_bases import SingleRobotEmptyScene
import numpy as np
class StrikerBulletEnv(BaseBulletEnv):
def __init__(self):
se... | 3,271 | 39.395062 | 176 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/manipulation/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/manipulation/thrower_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.robots.manipulators.thrower import Thrower
from pybulletgym.envs.roboschool.scenes.scene_bases import SingleRobotEmptyScene
import numpy as np
class ThrowerBulletEnv(BaseBulletEnv):
def __init__(self):
se... | 2,858 | 39.267606 | 182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/atlas_env.py | from pybulletgym.envs.roboschool.envs.locomotion.walker_base_env import WalkerBaseBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import Atlas
from pybulletgym.envs.roboschool.scenes import StadiumScene
class AtlasBulletEnv(WalkerBaseBulletEnv):
def __init__(self):
self.robot = Atlas()
... | 667 | 38.294118 | 126 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/ant_env.py | from pybulletgym.envs.roboschool.envs.locomotion.walker_base_env import WalkerBaseBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import Ant
class AntBulletEnv(WalkerBaseBulletEnv):
def __init__(self):
self.robot = Ant()
WalkerBaseBulletEnv.__init__(self, self.robot)
| 303 | 32.777778 | 91 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/walker_base_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.scenes import StadiumScene
import pybullet
import numpy as np
class WalkerBaseBulletEnv(BaseBulletEnv):
def __init__(self, robot, render=False):
print("WalkerBase::__init__")
BaseBulletEnv.__init_... | 5,352 | 44.364407 | 176 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/half_cheetah_env.py | from pybulletgym.envs.roboschool.envs.locomotion.walker_base_env import WalkerBaseBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import HalfCheetah
class HalfCheetahBulletEnv(WalkerBaseBulletEnv):
def __init__(self):
self.robot = HalfCheetah()
WalkerBaseBulletEnv.__init__(self, self.... | 327 | 35.444444 | 91 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/humanoid_flagrun_env.py | from pybulletgym.envs.roboschool.envs.locomotion.humanoid_env import HumanoidBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import HumanoidFlagrun, HumanoidFlagrunHarder
class HumanoidFlagrunBulletEnv(HumanoidBulletEnv):
random_yaw = True
def __init__(self):
self.robot = HumanoidFlagrun... | 1,104 | 35.833333 | 96 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/hopper_env.py | from pybulletgym.envs.roboschool.envs.locomotion.walker_base_env import WalkerBaseBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import Hopper
class HopperBulletEnv(WalkerBaseBulletEnv):
def __init__(self):
self.robot = Hopper()
WalkerBaseBulletEnv.__init__(self, self.robot)
| 313 | 30.4 | 91 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/humanoid_env.py | from pybulletgym.envs.roboschool.envs.locomotion.walker_base_env import WalkerBaseBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import Humanoid
class HumanoidBulletEnv(WalkerBaseBulletEnv):
def __init__(self, robot=None):
self.robot = robot if robot is not None else Humanoid()
Walke... | 517 | 42.166667 | 91 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/locomotion/walker2d_env.py | from pybulletgym.envs.roboschool.envs.locomotion.walker_base_env import WalkerBaseBulletEnv
from pybulletgym.envs.roboschool.robots.locomotors import Walker2D
class Walker2DBulletEnv(WalkerBaseBulletEnv):
def __init__(self):
self.robot = Walker2D()
WalkerBaseBulletEnv.__init__(self, self.robot)
| 319 | 31 | 91 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/pendulum/inverted_double_pendulum_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.robots.pendula.inverted_double_pendulum import InvertedDoublePendulum
from pybulletgym.envs.roboschool.scenes.scene_bases import SingleRobotEmptyScene
class InvertedDoublePendulumBulletEnv(BaseBulletEnv):
def __i... | 1,807 | 43.097561 | 120 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/pendulum/inverted_pendulum_env.py | from pybulletgym.envs.roboschool.envs.env_bases import BaseBulletEnv
from pybulletgym.envs.roboschool.robots.pendula.interted_pendulum import InvertedPendulum, InvertedPendulumSwingup
from pybulletgym.envs.roboschool.scenes.scene_bases import SingleRobotEmptyScene
import numpy as np
class InvertedPendulumBulletEnv(Ba... | 1,828 | 35.58 | 114 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/envs/pendulum/__init__.py | from pybulletgym.envs.roboschool.envs.pendulum.inverted_pendulum_env import InvertedPendulumBulletEnv, InvertedPendulumSwingupBulletEnv
| 136 | 67.5 | 135 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/scenes/stadium.py | import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
os.sys.path.insert(0,parentdir)
from .scene_bases import Scene
import pybullet
class StadiumScene(Scene):
multiplayer = False
zero_at_running_strip_start_line = True ... | 1,609 | 40.282051 | 121 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/scenes/scene_bases.py | import sys, os
sys.path.append(os.path.dirname(__file__))
import pybullet as p
import gym
class Scene:
"A base class for single- and multiplayer scenes"
def __init__(self, bullet_client, gravity, timestep, frame_skip):
self._p = bullet_client
self.np_random, seed = gym.utils.seeding.np_rando... | 2,633 | 32.341772 | 155 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/scenes/__init__.py | from pybulletgym.envs.roboschool.scenes.stadium import StadiumScene
| 68 | 33.5 | 67 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/robot_bases.py | import pybullet
import gym, gym.spaces, gym.utils
import numpy as np
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
os.sys.path.insert(0, parentdir)
class XmlBasedRobot:
"""
Base class for mujoco .xml based agents.
"... | 12,317 | 31.587302 | 197 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/walker_base.py | from pybulletgym.envs.roboschool.robots.robot_bases import XmlBasedRobot
import numpy as np
class WalkerBase(XmlBasedRobot):
def __init__(self, power):
self.power = power
self.camera_x = 0
self.start_pos_x, self.start_pos_y, self.start_pos_z = 0, 0, 0
self.walk_target_x = 1e3 # ki... | 3,755 | 43.714286 | 154 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/humanoid.py | from pybulletgym.envs.roboschool.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Humanoid(WalkerBase, MJCFBasedRobot):
self_collision = True
foot_list = ["right_foot", "left_foot"] # "left_hand", "right_hand"
... | 2,832 | 47.844828 | 157 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/ant.py | from pybulletgym.envs.roboschool.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
class Ant(WalkerBase, MJCFBasedRobot):
foot_list = ['front_left_foot', 'front_right_foot', 'left_back_foot', 'right_back_foot']
def __init__(self):
... | 579 | 40.428571 | 97 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/humanoid_flagrun.py | from pybulletgym.envs.roboschool.robots.locomotors.humanoid import Humanoid
import numpy as np
from pybulletgym.envs import gym_utils as ObjectHelper
class HumanoidFlagrun(Humanoid):
def __init__(self):
Humanoid.__init__(self)
self.flag = None
def robot_specific_reset(self, bullet_client):
... | 5,496 | 47.219298 | 129 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/walker2d.py | from pybulletgym.envs.roboschool.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
class Walker2D(WalkerBase, MJCFBasedRobot):
foot_list = ["foot", "foot_left"]
def __init__(self):
WalkerBase.__init__(self, power=0.40)
MJ... | 705 | 34.3 | 88 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/__init__.py | from pybulletgym.envs.roboschool.robots.locomotors.ant import Ant
from pybulletgym.envs.roboschool.robots.locomotors.atlas import Atlas
from pybulletgym.envs.roboschool.robots.locomotors.half_cheetah import HalfCheetah
from pybulletgym.envs.roboschool.robots.locomotors.hopper import Hopper
from pybulletgym.envs.robosch... | 557 | 68.75 | 113 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/half_cheetah.py | from pybulletgym.envs.roboschool.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class HalfCheetah(WalkerBase, MJCFBasedRobot):
foot_list = ["ffoot", "fshin", "fthigh", "bfoot", "bshin", "bthigh"] # track these contacts... | 1,199 | 47 | 164 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/atlas.py | from pybulletgym.envs.roboschool.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.roboschool.robots.robot_bases import URDFBasedRobot
import numpy as np
import pybullet as p
class Atlas(WalkerBase, URDFBasedRobot):
random_yaw = False
foot_list = ["r_foot", "l_foot"]
def __init__(self... | 2,026 | 45.068182 | 145 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/locomotors/hopper.py | from pybulletgym.envs.roboschool.robots.locomotors.walker_base import WalkerBase
from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
class Hopper(WalkerBase, MJCFBasedRobot):
foot_list = ["foot"]
def __init__(self):
WalkerBase.__init__(self, power=0.75)
MJCFBasedRobot.__... | 478 | 33.214286 | 86 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/manipulators/pusher.py | from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Pusher(MJCFBasedRobot):
min_target_placement_radius = 0.5
max_target_placement_radius = 0.8
min_object_to_target_distance = 0.1
max_object_to_target_distance = 0.4
def __init__(self):
MJCFBa... | 4,685 | 52.862069 | 107 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/manipulators/reacher.py | from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Reacher(MJCFBasedRobot):
TARG_LIMIT = 0.27
def __init__(self):
MJCFBasedRobot.__init__(self, 'reacher.xml', 'body0', action_dim=2, obs_dim=9)
def robot_specific_reset(self, bullet_client):
... | 1,997 | 40.625 | 103 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/manipulators/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/manipulators/thrower.py | from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Thrower(MJCFBasedRobot):
min_target_placement_radius = 0.1
max_target_placement_radius = 0.8
min_object_placement_radius = 0.1
max_object_placement_radius = 0.8
def __init__(self):
MJCFBased... | 4,689 | 49.978261 | 107 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/manipulators/striker.py | from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class Striker(MJCFBasedRobot):
min_target_placement_radius = 0.1
max_target_placement_radius = 0.8
min_object_placement_radius = 0.1
max_object_placement_radius = 0.8
def __init__(self):
MJCFBased... | 5,030 | 51.957895 | 107 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/pendula/inverted_double_pendulum.py | from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class InvertedDoublePendulum(MJCFBasedRobot):
def __init__(self):
MJCFBasedRobot.__init__(self, 'inverted_double_pendulum.xml', 'cart', action_dim=1, obs_dim=9)
def robot_specific_reset(self, bullet_client):... | 1,358 | 35.72973 | 103 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/pendula/interted_pendulum.py | from pybulletgym.envs.roboschool.robots.robot_bases import MJCFBasedRobot
import numpy as np
class InvertedPendulum(MJCFBasedRobot):
swingup = False
def __init__(self):
MJCFBasedRobot.__init__(self, 'inverted_pendulum.xml', 'cart', action_dim=1, obs_dim=5)
def robot_specific_reset(self, bullet_c... | 1,607 | 27.714286 | 95 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/envs/roboschool/robots/pendula/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_HumanoidFlagrunPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 423,299 | 809.91954 | 2,334 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_HopperPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 97,859 | 320.907895 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_HumanoidFlagrunHarderPyBulletEnv_v1_2017jul.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 423,588 | 804.302281 | 2,334 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_Walker2DPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 107,650 | 345.144695 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_AtlasPyBulletEnv_v0_2017jul.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 176,992 | 492.016713 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_HumanoidPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 423,302 | 811.481766 | 2,334 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_InvertedPendulumPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 24,912 | 135.884615 | 606 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_InvertedDoublePendulumPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 27,234 | 145.424731 | 606 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_InvertedPendulumSwingupPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 24,919 | 135.923077 | 606 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_AntPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 115,600 | 365.987302 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_ReacherPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 89,726 | 317.180851 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_HumanoidFlagrunHarderPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 423,318 | 808.405354 | 2,334 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/roboschool-weights/enjoy_TF_HalfCheetahPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import gym
import numpy as ... | 112,334 | 354.490506 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/tensorforce/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/examples/tensorforce/openai_gym.py | # Copyright 2017 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 12,064 | 53.840909 | 194 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/agents/agent_register.py | import logging
import pkg_resources
import re
from gym import error
import warnings
logger = logging.getLogger(__name__)
# This format is true today, but it's *not* an official spec.
# [username/](agent-name)-v(version) env-name is group 1, version is group 2
#
# 2017-08-26: We're experimentally expanding the agent... | 3,878 | 33.633929 | 169 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/agents/agents_baselines.py | from baselines import deepq
def add_opts(parser):
pass
class BaselinesDQNAgent(object):
'''
classdocs
'''
def __init__(self, opts):
self.metadata = {
'discrete_actions': True,
}
self.opts = opts
self.agent = None
def configure(self, observation_space_shape, nb_actions):
pass
def train(self, ... | 1,147 | 19.872727 | 58 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/agents/agents_kerasrl.py | # with some extra arg parsing
from keras.models import Sequential, Model # The Sequential model is a sequential, feed-forward stack of layers.
from keras.layers import Dense, Activation, Flatten, Input, merge # Different types of layers
from keras.optimizers import Adam # A special type of optimizer
from rl.agents.ce... | 12,858 | 36.272464 | 194 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/agents/__init__.py | # ---- register agents ----------
import agent_register
# agent_register.register(
# id='BaselinesDQNAgent-v0',
# entry_point='agents_baselines:BaselinesDQNAgent'
# )
agent_register.register(
id='KerasCEMAgent-v0',
entry_point='pybullet_envs.agents.agents_kerasrl:KerasCEMAgent'
)
agent_register.register(
id='Ke... | 912 | 24.361111 | 102 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/test_pybulletgym_mujoco_sanity.py | import gym
import numpy as np
import traceback
import pybulletgym # required for the Bullet envs to be initialized
envs = [spec.id for spec in gym.envs.registry.all() if spec.id.find('MuJoCo') >= 0]
bugged_envs = []
for env_name in envs:
try:
print('[TESTING] ENV', env_name, '...')
env = gym.make(... | 675 | 31.190476 | 83 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/test_pybylletgym_roboschool_sanity.py | import gym
import numpy as np
import traceback
import pybulletgym # required for the Bullet envs to be initialized
envs = [spec.id for spec in gym.envs.registry.all() if spec.id.find('Bullet') >= 0]
bugged_envs = []
for env_name in envs:
try:
print('[TESTING] ENV', env_name, '...')
env = gym.make(... | 675 | 31.190476 | 83 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/test_pybulletgym_roboschool_performance.py | import gym
import pybulletgym # required to register the pybullet envs
import traceback
from pybulletgym.tests.roboschool.agents.policies import SmallReactivePolicy
import pybulletgym.tests.roboschool.agents.AntPyBulletEnv_v0_2017may as AntWeights
import pybulletgym.tests.roboschool.agents.AtlasPyBulletEnv_v0_2017jul... | 10,321 | 53.613757 | 122 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/__init__.py | 0 | 0 | 0 | py | |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/agents/AntPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import inspect
import os
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import numpy as np
... | 113,564 | 462.530612 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/agents/ReacherPyBulletEnv_v0_017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import inspect
import os
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import numpy as np
... | 88,109 | 388.867257 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/agents/HopperPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import inspect
import os
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import numpy as np
... | 95,624 | 411.176724 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/agents/HalfCheetahPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import inspect
import os
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import numpy as np
... | 110,084 | 452.024691 | 1,182 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/agents/HumanoidFlagrunHarderPyBulletEnv_v1_2017jul.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import inspect
import os
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import numpy as np
... | 421,278 | 926.927313 | 2,334 | py |
pybullet-gym | pybullet-gym-master/pybulletgym/tests/roboschool/agents/HumanoidPyBulletEnv_v0_2017may.py | #add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import inspect
import os
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import numpy as np
... | 421,277 | 928.97351 | 2,334 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.