Skip to content

Commit

Permalink
fixed an issue in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yun-long committed Sep 1, 2020
1 parent 6b1b08a commit adb07d9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Installing catkin tools
RUN apt-get update && apt-get install -y python3-setuptools && pip3 install catkin-tools

RUN /bin/bash cd /home && git clone https://github.com/uzh-rpg/flightmare.git \
&& echo "export FLIGHTMARE_PATH=/home/flightmare" >> ~/.bashrc
&& source ~/.bashrc

RUN /bin/bash cd /home/flightmare/flightlib && pip3 install . \
&& cd /home/flightmare/flightrl && pip3 install . \
&&
4 changes: 4 additions & 0 deletions flightlib/build/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
DisableFormat: true
SortIncludes: false
---
13 changes: 10 additions & 3 deletions flightrl/examples/run_drone_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@

#
from rpg_baselines.common.policies import MlpPolicy
from rpg_baselines.common.util import ConfigurationSaver, TensorboardLauncher, configure_random_seed
from rpg_baselines.ppo.ppo2 import PPO2
from rpg_baselines.ppo.ppo2_test import test_model
from rpg_baselines.envs import vec_env_wrapper as wrapper
import rpg_baselines.common.util as U
#
from flightgym import QuadrotorEnv_v1

#

def configure_random_seed(seed, env=None):
if env is not None:
env.seed(seed)
np.random.seed(seed)
tf.set_random_seed(seed)


def parser():
Expand Down Expand Up @@ -50,6 +55,8 @@ def main():

if args.render:
cfg["env"]["render"] = "yes"
else:
cfg["env"]["render"] = "no"

env = wrapper.FlightEnvVec(QuadrotorEnv_v1(
dump(cfg, Dumper=RoundTripDumper), False))
Expand All @@ -62,7 +69,7 @@ def main():
# save the configuration and other files
rsg_root = os.path.dirname(os.path.abspath(__file__))
log_dir = rsg_root + '/saved'
saver = ConfigurationSaver(log_dir=log_dir)
saver = U.ConfigurationSaver(log_dir=log_dir)
model = PPO2(
tensorboard_log=saver.data_dir,
policy=MlpPolicy, # check activation function
Expand Down
7 changes: 0 additions & 7 deletions flightrl/rpg_baselines/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,3 @@ def TensorboardLauncher(directory_path):
url = tb.launch()
print("[RAISIM_GYM] Tensorboard session created: "+url)
webbrowser.open_new(url)


def configure_random_seed(seed, env=None):
if env is not None:
env.seed(seed)
np.random.seed(seed)
tf.set_random_seed(seed)
8 changes: 4 additions & 4 deletions flightrl/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import platform
import subprocess

from setuptools import setup, Extension
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion

Expand All @@ -15,7 +15,7 @@
author_email='[email protected]',
description='Flightmare: A Quadrotor Simulator.',
long_description='',
install_requires=['gym==0.11', 'ruamel.yaml',
'numpy', 'stable_baselines==2.10.1'],
packages=['rpg_baselines'],
install_requires=[''],
packages=[package for package in find_packages()
if package.startswith('rpg_baselines')]
)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tensorflow == 1.8.0

0 comments on commit adb07d9

Please sign in to comment.