fixes in relative imports
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
import gym
|
||||||
@@ -4,6 +4,12 @@ The randomization include swing_offset, extension_offset of all legs that mimics
|
|||||||
bent legs, desired_pitch from user input, battery voltage and motor damping.
|
bent legs, desired_pitch from user input, battery voltage and motor damping.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os, inspect
|
||||||
|
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(parentdir))
|
||||||
|
os.sys.path.insert(0,parentdir)
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from pybullet_envs.minitaur.envs import env_randomizer_base
|
from pybullet_envs.minitaur.envs import env_randomizer_base
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
"""Randomize the minitaur_gym_env when reset() is called."""
|
"""Randomize the minitaur_gym_env when reset() is called."""
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
import os, inspect
|
||||||
|
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(parentdir))
|
||||||
|
os.sys.path.insert(0,parentdir)
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from pybullet_envs.minitaur.envs import env_randomizer_base
|
from pybullet_envs.minitaur.envs import env_randomizer_base
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ from __future__ import print_function
|
|||||||
import functools
|
import functools
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
import os, inspect
|
||||||
|
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(parentdir))
|
||||||
|
os.sys.path.insert(0,parentdir)
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from pybullet_envs.minitaur.envs import env_randomizer_base
|
from pybullet_envs.minitaur.envs import env_randomizer_base
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ from __future__ import absolute_import
|
|||||||
from __future__ import division
|
from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import os, inspect
|
||||||
|
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(parentdir))
|
||||||
|
os.sys.path.insert(0,parentdir)
|
||||||
|
|
||||||
import math
|
import math
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from pybullet_envs.minitaur.envs import env_randomizer_base
|
from pybullet_envs.minitaur.envs import env_randomizer_base
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ from __future__ import absolute_import
|
|||||||
from __future__ import division
|
from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import os, inspect
|
||||||
|
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||||
|
parentdir = os.path.dirname(os.path.dirname(parentdir))
|
||||||
|
os.sys.path.insert(0,parentdir)
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import math
|
import math
|
||||||
import enum
|
import enum
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
"""This file implements the functionalities of a minitaur using pybullet.
|
"""This file implements the functionalities of a minitaur using pybullet.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
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 collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
import math
|
import math
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import motor
|
from pybullet_envs.minitaur.envs import motor
|
||||||
|
|
||||||
INIT_POSITION = [0, 0, .2]
|
INIT_POSITION = [0, 0, .2]
|
||||||
INIT_RACK_POSITION = [0, 0, 1]
|
INIT_RACK_POSITION = [0, 0, 1]
|
||||||
|
|||||||
@@ -3,9 +3,14 @@
|
|||||||
"""
|
"""
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
from gym import spaces
|
from gym import spaces
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import minitaur_gym_env
|
from pybullet_envs.minitaur.envs import minitaur_gym_env
|
||||||
|
|
||||||
INIT_EXTENSION_POS = 2.6
|
INIT_EXTENSION_POS = 2.6
|
||||||
INIT_SWING_POS = 0.0
|
INIT_SWING_POS = 0.0
|
||||||
|
|||||||
@@ -3,12 +3,17 @@
|
|||||||
"""
|
"""
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
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 os
|
import os
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
import minitaur_alternating_legs_env
|
from pybullet_envs.minitaur.envs import minitaur_alternating_legs_env
|
||||||
import minitaur_gym_env
|
from pybullet_envs.minitaur.envs import minitaur_gym_env
|
||||||
from env_randomizers import minitaur_alternating_legs_env_randomizer as randomizer_lib
|
from pybullet_envs.minitaur.envs.env_randomizers import minitaur_alternating_legs_env_randomizer as randomizer_lib
|
||||||
|
|
||||||
#FLAGS = flags.FLAGS
|
#FLAGS = flags.FLAGS
|
||||||
#flags.DEFINE_string("log_path", None, "The directory to write the log file.")
|
#flags.DEFINE_string("log_path", None, "The directory to write the log file.")
|
||||||
|
|||||||
@@ -4,9 +4,14 @@
|
|||||||
import math
|
import math
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
from gym import spaces
|
from gym import spaces
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import minitaur_gym_env
|
from pybullet_envs.minitaur.envs import minitaur_gym_env
|
||||||
import pybullet_data
|
import pybullet_data
|
||||||
|
|
||||||
GOAL_DISTANCE_THRESHOLD = 0.8
|
GOAL_DISTANCE_THRESHOLD = 0.8
|
||||||
|
|||||||
@@ -6,8 +6,13 @@ It is the result of first pass system identification for the derpy robot. The
|
|||||||
"""
|
"""
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
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 numpy as np
|
import numpy as np
|
||||||
import minitaur
|
from pybullet_envs.minitaur.envs import minitaur
|
||||||
|
|
||||||
KNEE_CONSTRAINT_POINT_LONG = [0, 0.0055, 0.088]
|
KNEE_CONSTRAINT_POINT_LONG = [0, 0.0055, 0.088]
|
||||||
KNEE_CONSTRAINT_POINT_SHORT = [0, 0.0055, 0.100]
|
KNEE_CONSTRAINT_POINT_SHORT = [0, 0.0055, 0.100]
|
||||||
|
|||||||
@@ -4,19 +4,24 @@
|
|||||||
import math
|
import math
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
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 gym
|
||||||
from gym import spaces
|
from gym import spaces
|
||||||
from gym.utils import seeding
|
from gym.utils import seeding
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pybullet
|
import pybullet
|
||||||
import bullet_client
|
from pybullet_envs.minitaur.envs import bullet_client
|
||||||
import pybullet_data
|
import pybullet_data
|
||||||
import minitaur
|
from pybullet_envs.minitaur.envs import minitaur
|
||||||
import minitaur_derpy
|
from pybullet_envs.minitaur.envs import minitaur_derpy
|
||||||
import minitaur_logging
|
from pybullet_envs.minitaur.envs import minitaur_logging
|
||||||
import minitaur_logging_pb2
|
from pybullet_envs.minitaur.envs import minitaur_logging_pb2
|
||||||
import minitaur_rainbow_dash
|
from pybullet_envs.minitaur.envs import minitaur_rainbow_dash
|
||||||
import motor
|
from pybullet_envs.minitaur.envs import motor
|
||||||
from pkg_resources import parse_version
|
from pkg_resources import parse_version
|
||||||
|
|
||||||
NUM_MOTORS = 8
|
NUM_MOTORS = 8
|
||||||
|
|||||||
@@ -5,10 +5,15 @@
|
|||||||
import csv
|
import csv
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
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 argparse
|
import argparse
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
import minitaur_gym_env
|
from pybullet_envs.minitaur.envs import minitaur_gym_env
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,17 @@ from __future__ import absolute_import
|
|||||||
from __future__ import division
|
from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
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 datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
import minitaur_logging_pb2
|
from pybullet_envs.minitaur.envs import minitaur_logging_pb2
|
||||||
|
|
||||||
NUM_MOTORS = 8
|
NUM_MOTORS = 8
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
# source: minitaur_logging.proto
|
# source: minitaur_logging.proto
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||||
from google.protobuf import descriptor as _descriptor
|
from google.protobuf import descriptor as _descriptor
|
||||||
from google.protobuf import message as _message
|
from google.protobuf import message as _message
|
||||||
@@ -13,8 +19,8 @@ from google.protobuf import descriptor_pb2
|
|||||||
_sym_db = _symbol_database.Default()
|
_sym_db = _symbol_database.Default()
|
||||||
|
|
||||||
|
|
||||||
import timestamp_pb2 as timestamp__pb2
|
from pybullet_envs.minitaur.envs import timestamp_pb2 as timestamp__pb2
|
||||||
import vector_pb2 as vector__pb2
|
from pybullet_envs.minitaur.envs import vector_pb2 as vector__pb2
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||||
|
|||||||
@@ -3,10 +3,16 @@
|
|||||||
It is the result of first pass system identification for the rainbow dash robot.
|
It is the result of first pass system identification for the rainbow dash robot.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
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 math
|
import math
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import minitaur
|
from pybullet_envs.minitaur.envs import minitaur
|
||||||
|
|
||||||
KNEE_CONSTRAINT_POINT_LONG = [0, 0.0045, 0.088]
|
KNEE_CONSTRAINT_POINT_LONG = [0, 0.0045, 0.088]
|
||||||
KNEE_CONSTRAINT_POINT_SHORT = [0, 0.0045, 0.100]
|
KNEE_CONSTRAINT_POINT_SHORT = [0, 0.0045, 0.100]
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
"""This file implements the gym environment of minitaur alternating legs.
|
"""This file implements the gym environment of minitaur alternating legs.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
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 collections
|
import collections
|
||||||
import math
|
import math
|
||||||
from gym import spaces
|
from gym import spaces
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import minitaur_gym_env
|
from pybullet_envs.minitaur.envs import minitaur_gym_env
|
||||||
|
|
||||||
INIT_EXTENSION_POS = 2.0
|
INIT_EXTENSION_POS = 2.0
|
||||||
INIT_SWING_POS = 0.0
|
INIT_SWING_POS = 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user