Giter VIP home page Giter VIP logo

gym-unrealcv's Introduction

Gym-UnrealCV: Realistic virtual worlds for visual reinforcement learning

Introduction

This project integrates Unreal Engine with OpenAI Gym for visual reinforcement learning based on UnrealCV. In this project, you can run (Multi-Agent) Reinforcement Learning algorithms in various realistic UE4 environments easily without any knowledge of Unreal Engine and UnrealCV.

A number of environments have been released for robotic vision tasks, including Active object tracking, Searching for objects, and Robot arm control.

Tracking in UrbanCity with distractors Tracking in Garden Tracking in SnowForest
Tracking in Garage with distractors Searching in RealisticRoom Robot Arm Control

The framework of this project is shown below: framework

  • UnrealCV is the basic bridge between Unreal Engine and OpenAI Gym.
  • OpenAI Gym is a toolkit for developing an RL algorithm, compatible with most numerical computation libraries, such as TensorFlow or PyTorch.

Installation

Dependencies

  • UnrealCV
  • Gym
  • CV2
  • Matplotlib
  • Numpy
  • Docker(Optional)
  • Nvidia-Docker(Optional)

We recommend you use anaconda to install and manage your Python environment. CV2 is used for image processing, like extracting object masks and bounding boxes. Matplotlib is used for visualization.

Install Gym-UnrealCV

It is easy to install gym-unrealcv, just run

git clone https://github.com/zfw1226/gym-unrealcv.git
cd gym-unrealcv
pip install -e . 

While installing gym-unrealcv, dependencies including OpenAI Gym, unrealcv, numpy and matplotlib are installed. Opencv should be installed additionally. If you use anaconda, you can run

conda update conda
conda install --channel menpo opencv

or

pip install opencv-python

Prepare Unreal Binary

Before running the environments, you need to prepare unreal binaries. You can load them from clouds by running load_env.py

python load_env.py -e {ENV_NAME}

ENV_NAME can be RealisticRoom, RandomRoom, Arm, etc. After that, it will automatically download a related env binary to the UnrealEnv directory.

Please refer the binary_list in load_env.py for more available example environments.

Usage

1. Run a Random Agent

Once gym-unrealcv is installed successfully, you will see that your agent is walking randomly in first-person view to find a door, after you run:

cd example/random
python random_agent.py -e UnrealSearch-RealisticRoomDoor-DiscreteColor-v0

After that, if all goes well, a pre-defined gym environment UnrealSearch-RealisticRoomDoor-DiscreteColor-v0 will be launched. And then you will see that your agent is moving around the room randomly.

We list the pre-defined environments in this page, for object searching and active object tracking.

2. Learning RL Agents

To demonstrate how to train an agent in gym-unrealcv, we provide DQN (Keras) and DDPG (Keras) codes in .example.

Moreover, you can also refer to some recent projects for more advanced usages, as follows:

  • craves_control provides an example for learning to control a robot arm via DDPG (PyTorch).
  • active_tracking_rl provides examples for learning active visual tracking via A3C (Pytorch). The training framework can be used for single-agent RL, adversarial RL, and multi-agent games.
  • pose-assisted-collaboration provides an example for learning multi-agent collaboration via A3C (Pytorch) in multiple PTZ cameras single target environments.

Customize an Environment

We provide a set of tutorials to help you get started with Gym-UnrealCV.

1. Modify the pre-defined environment

You can follow the modify_env_tutorial to modify the configuration of the pre-defined environment.

2. Add a new unreal environment

You can follow the add_new_env_tutorial to add a new unreal environment for your RL task.

Papers Using Gym-UnrealCV

🎉 Please feel free to pull requests or open an issue to add papers.

Cite

If you use Gym-UnrealCV in your academic research, we would be grateful if you could cite it as follow:

@misc{gymunrealcv2017,
    author = {Fangwei Zhong, Weichao Qiu, Tingyun Yan, Alan Yuille, Yizhou Wang},
    title = {Gym-UnrealCV: Realistic virtual worlds for visual reinforcement learning},
    howpublished={Web Page},
    url = {https://github.com/unrealcv/gym-unrealcv},
    year = {2017}
}

Contact

If you have any suggestions or are interested in using Gym-UnrealCV, get in touch at zfw1226 [at] gmail [dot] com.

gym-unrealcv's People

Contributors

kyridiculous2 avatar wukui-muc avatar zfw1226 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gym-unrealcv's Issues

env.reset( ) NotImplementedError

Hi,

I am trying to use unrealcv on my own research project, I got the demo random agent running, but once it connected to the server, there's an error that stops it from runnning anymore. Trace log as below:

Running docker-free env, pid:8020
Please wait for a while to launch env......
start /b  c:\users\tie\github\gym-unrealcv\gym_unrealcv\envs\UnrealEnv\RealisticRendering\RealisticRendering.exe
127.0.0.1
INFO:__init__:192:Got connection confirm: b'connected to RealisticRendering'
Traceback (most recent call last):
  File "random_agent.py", line 33, in <module>
    ob = env.reset()
  File "C:\Users\tie\anaconda3\envs\gym-unrealcv\lib\site-packages\gym\wrappers\time_limit.py", line 27, in reset
    return self.env.reset(**kwargs)
  File "C:\Users\tie\anaconda3\envs\gym-unrealcv\lib\site-packages\gym\core.py", line 74, in reset
    raise NotImplementedError
NotImplementedError

Does that mean I might need a different version of gym ?
I am using windows 10, with anaconda, but don't think that's related since the demo is already running.

Would be great if I could have some help here, appreciate the work.

error occurs when running random_agent.py

when i installed the environment and run random_agent.py for test, error occurs look like:
[2017-07-05 00:33:12,305] Making new env: Unrealcv-Simple-v0
Found images
access control disabled, clients can connect from any host
......
....../envs/run_docker.py", line 50, in get_ip
return self.container[0].attrs['NetworkSettings']['Networks']['bridge']['IPAddress']
IndexError: list index out of range

i tracked the error, and found that in the line of 45 in the run_docker.py:
self.container = self.docker_client.containers.list()
but self.contrainer is [ ] list with nothing.
what is wrong with my procedure?
Thank you!

关于unrealcv CTRL+C无法释放资源的问题

非常感谢作者的更新,我感觉新版的环境运行起来比之前快了很多,而且突然挂进程的情况也没有了。
但是在运行干扰物那个代码时,遇到了一个问题,使用ctrl+c无法释放资源。表现为代码已经停止运行了,但是显卡资源和cpu资源都没有释放。需要手动kill进程才行。之前老版的代码没有出现类似的问题。
微信图片_显卡

Possibility of running on windows

Is it possible to run on windows? I am working on a very similar project based on windows (I can't get UE running probably on ubuntu 16.04).

Exiting abnormally

when I run "UnrealTrack-City1StefaniPath1-DiscreteColor-v1", some error occurred:

[2019.10.29-03.34.23:452][ 90]LogModuleManager: Shutting down and abandoning module PakFile (2)
[2019.10.29-03.34.23:457][ 90]LogExit: Exiting.
[2019.10.29-03.34.23:457][ 90]LogInit: Tearing down SDL.
Exiting abnormally (error code: 143)

Errors with gym-unrealcv for active object tracking

when i run
python train.py --num-workers=1 --env-id=Active-Tracking-Discrete-v0 --env-val-id=Active-Tracking-Discrete-v0 --model-id=convx2lstm --lr=0.00005 --log-dir=save/tmp --max-global-steps=250000000 --val-model-secs=-1 --max-val-episodes=40
for active object tracking, but it outputs errors.

[2022-04-03 19:35:26,597] Writing logs to file: /tmp/universe-1497164.log
I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:197] Initialize GrpcChannelCache for job ps -> {0 -> 127.0.0.1:12222}
I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:197] Initialize GrpcChannelCache for job worker -> {0 -> localhost:12223}
I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:211] Started server with target: grpc://localhost:12223
[2022-04-03 19:35:26,608] Making new env: Active-Tracking-Discrete-v0
Traceback (most recent call last):
File "/data/user18302012/anaconda3/envs/tracker/lib/python3.6/site-packages/gym/envs/registration.py", line 137, in spec
return self.env_specs[id]
KeyError: 'Active-Tracking-Discrete-v0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "worker.py", line 268, in
tf.app.run()
File "/data/user18302012/anaconda3/envs/tracker/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "worker.py", line 257, in main
run_worker(args, server, cluster)
File "worker.py", line 36, in run_worker
env = create_env(args.env_id, client_id=str(args.task), remotes=args.remotes)
File "/data/user18302012/bishe/code/active_tracking_drl/envs.py", line 49, in create_env
return create_unrealcv_env(env_full_name)
File "/data/user18302012/bishe/code/active_tracking_drl/envs.py", line 120, in create_unrealcv_env
env = gym.make(env_full_name)
File "/data/user18302012/anaconda3/envs/tracker/lib/python3.6/site-packages/gym/envs/registration.py", line 161, in make
return registry.make(id)
File "/data/user18302012/anaconda3/envs/tracker/lib/python3.6/site-packages/gym/envs/registration.py", line 118, in make
spec = self.spec(id)
File "/data/user18302012/anaconda3/envs/tracker/lib/python3.6/site-packages/gym/envs/registration.py", line 147, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: Active-Tracking-Discrete-v0

I have prepared the enviroment binaries RandomRoom、SplineCharacterA and SplineCharacterF. What can i do to fix this error?

Environments:
Ubuntu18.04
Python 3.6
tensorflow 0.12.1

thanks for any responds!

The problem about the fine-tuning of meta strategy

Hello, the author, I want to ask a question about the training of the thesis of distractor. The second step of the meta strategy is to fine tune the teacher tracker. According to your tutorial, I put the “*. pth” file from the/log folder to a new folder, and then put the "nest. pth "file in another folder. Then use the command you give to train:
python main.py --model simple-pos-act-lstm --tracker none --env UnrealTrackMulti-FlexibleRoomAdv-DiscreteColor-v1 --env-base UnrealTrackMulti-FlexibleRoomAdv-DiscreteColor-v1 --rnn-out 128 --seed 4 --seed-test 2 --train-mode 0 --norm-reward --aux attack-reward --lr 0.0005 --gpu-id 1 --old ./old_oppent --load-model-dir ./new_model/new-201.pth
But it didn't produce any results. I don't know what's wrong.
158ed965cc36b97e2550b2dea8dbe2d
c3baee28b18d9d666a72b469e7dfe13
1b636cf1117a1ca4da9b1820b1c8d32

Windows Support

[Question] I am evaluating gym-unrealcv for an upcoming project. The project may have to run in a Windows environment. Is there any dependencies in this project that would prevent me from creating a windows port? Thanks

Can not connect to ('127.0.0.1', 9000)

python main.py --shared-optimizer --workers 6 --gpu-ids 0 --split --network tat-cnn-lstm --rnn-out 256 --entropy-target 0.05 --sleep-time 30 --env UnrealTrack-DuelingRoomPZR-DiscreteColor-v4 --env-base UnrealTrack-DuelingRoomNav-DiscreteColor-v4 --gray --rescale --lr 0.0001
Running docker-free env, pid:53780
Please wait for a while to launch env......
exec nohup /root/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/DuelingRoom/tracking/Binaries/Linux/tracking
nohup: ignoring input and appending output to 'nohup.out'
ERROR:init:205:Can not connect to ('127.0.0.1', 9000)
ERROR:init:206:Error [Errno 111] Connection refused
UnrealCV server is not running. Please try again
已经通过python load_env.py -e DuelingRoom安装过相关环境

textures path not found

work on branch v1.0 and windows 10
Python 3.11.6
Running setup.py develop for gym-unrealcv Successfully installed contourpy-1.2.0 cycler-0.12.1 fonttools-4.44.3 gym-0.10.9 gym-unrealcv-1.0.0 kiwisolver-1.4.5 matplotlib-3.8.1 opencv-python-4.8.1.78 pillow-10.1.0 pyglet-2.0.10 pyparsing-3.1.1 scipy-1.11.3 unrealcv-1.0.1 wget-3.2

 python .\random_agent.py -e UnrealTrack-GardenNav-DiscreteColor-v0
=> Info: Use inet client...
C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gym\envs\registration.py:14: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  result = entry_point.load(False)
Traceback (most recent call last):
  File "D:\Unreal Projects\gym-unrealcv\example\random\random_agent.py", line 23, in <module>
    env = gym.make(args.env_id)
          ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gym\envs\registration.py", line 167, in make
    return registry.make(id)
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gym\envs\registration.py", line 119, in make
    env = spec.make()
          ^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gym\envs\registration.py", line 86, in make
    env = cls(**self._kwargs)
          ^^^^^^^^^^^^^^^^^^^
  File "d:\unreal projects\gym-unrealcv\gym_unrealcv\envs\unrealcv_tracking_1v1.py", line 55, in __init__
    self.textures_list = misc.get_textures(setting['imgs_dir'], self.docker)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\unreal projects\gym-unrealcv\gym_unrealcv\envs\utils\misc.py", line 44, in get_textures
    textures_list = os.listdir(texture_dir)
                    ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'd:\\unreal projects\\gym-unrealcv\\gym_unrealcv\\envs\\UnrealEnv\\textures'

Error When running ddpg Example.

Hi,

I encountered an error when I tried to run

python run.py

in the ddpg folder. Here is the error I received.

Traceback (most recent call last): File "run.py", line 17, in <module> assert env.action_type == 'continuous' AttributeError: 'TimeLimit' object has no attribute 'action_type'

Could it be something wrong with the gym version?

Also in the constant.py file of ddpg, the ENV_NAME is 'Search-RrDoorDiscrete-v0' but in the run.py, there is an assertion assert env.action_type == 'continuous'. Maybe there is something wrong here?

Best,

error occurs when running random_agent.py

yangchengwu@robotvision-PowerEdge-T630:/home/dl/yangchengwu/Downloads/gym-unrealcv-0.2/example/random$ python random_agent.py -e 'Search-RrDoorDiscrete-v0'
Traceback (most recent call last):
File "random_agent.py", line 2, in
import gym_unrealcv
ImportError: No module named 'gym_unrealcv'
yangchengwu@robotvision-PowerEdge-T630:/home/dl/yangchengwu/Downloads/gym-unrealcv-0.2/example/random$

Which does tensorflow version match keras==1.2.0

hello! I'm reading 'Training a DQN Agent.'.
I am using pyhton 3.10.13 with anaconda. And I installed tensorflow by pip install tensorflow. Then it installed keras-2.15.0 tensorflow-2.15.0.
It conflicts with keras 1.2.0.

So which is the right version should I use?

Multi agent setting

I want to know does gym-unrealcv support multi agent setting? Is there any demo about it?

Could you provide a detailed description on making the robot arm UE environment?

Hello,

I have been struggling with how to make a robot environment that is similar to the robot arm example provided by gym-unrealcv. From the tutorial of either gym-unrealcv or unrealcv, it is not clear how to add robots with their meshes and kinematics/collision definitions into unreal engine so that a binary file can be compiled for gym-unrealcv. Usually we have urdf files to organize robot meshes and kinematics. Is there a way to import a robot by using their URDF files and linked meshes into unreal engine?

It would be great if a detailed description of how the robot arm was imported into unreal engine can be provided.

Thanks!

UnrealCV command

I found a command “vbp *** **** ***”in this repository,which is not in unrealcv.
Could u teach me anything about that?
thanks for any responds

UnrealCV server is not running

Hi,Thanks for your good job! Could you tell me how to deal this?

ERROR:init:205:Can not connect to ('127.0.0.1', 9005)
ERROR:init:206:Error [Errno 111] Connection refused
UnrealCV server is not running. Please try again

The gui is so small

Hi, I wanna ask why the gui is so small? Do I need to install UE4 from ubuntu20?
image

About environments of active tracking

I wonder if I want to run the training code of project "End-to-end Active Object Tracking via Reinforcement Learning", which unreal binaries should I download?

I downloaded all the binaries, but they didn't work. Is it because you modified the environment naming rules?

image

What will 2D environments output

Hi, Doctor Zhong!
I want to try AD-VAT in 2D environment for active object tracking, but I don't know what will it outputs. When i run it, i find that tensorboard is Ok, but the pictures i could not find. What can i find these pictures?

kindly regards

Errors on Towards Distraction-Robust Active Visual Tracking

Hi @zfw1226 ,when i run your code https://github.com/zfw1226/active_tracking_rl/tree/distractor, i met some errors:

python main.py --model simple-pos-act-lstm --tracker none --env UnrealTrackMulti-FlexibleRoomAdv-DiscreteColor-v1 --env-base UnrealTrackMulti-FlexibleRoomAdv-DiscreteColor-v1 --rnn-out 128 --seed 4 --seed-test 2 --train-mode -1 --test-eps 25 --norm-reward --aux reward --lr 0.001 --gpu-id 0
Running docker-free env, pid:1843381
Please wait for a while to launch env......
exec nohup /home/dell/tracker/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/FlexibleRoom/trackingroom2/Binaries/Linux/trackingroom2
nohup: ignoring input and appending output to 'nohup.out'
127.0.0.1
INFO:init:192:Got connection confirm: b'connected to trackingroom2'
build env
share memory
2022-04-24 21:24:25,504 : lr: 0.001
2022-04-24 21:24:25,506 : early_done: False
[Errno 98] Address already in use
Port=9013
Running docker-free env, pid:1843459
Please wait for a while to launch env......
exec nohup /home/dell/tracker/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/FlexibleRoom/trackingroom2/Binaries/Linux/trackingroom2
nohup: ignoring input and appending output to 'nohup.out'
127.0.0.1
INFO:init:192:Got connection confirm: b'connected to trackingroom2'
build env
[Errno 98] Address already in use
Port=9014
Running docker-free env, pid:1843533
Please wait for a while to launch env......
exec nohup /home/dell/tracker/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/FlexibleRoom/trackingroom2/Binaries/Linux/trackingroom2
nohup: ignoring input and appending output to 'nohup.out'
127.0.0.1
INFO:init:192:Got connection confirm: b'connected to trackingroom2'
build env
[Errno 98] Address already in use
Port=9015
Running docker-free env, pid:1843609
Please wait for a while to launch env......
exec nohup /home/dell/tracker/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/FlexibleRoom/trackingroom2/Binaries/Linux/trackingroom2
nohup: ignoring input and appending output to 'nohup.out'
127.0.0.1
INFO:init:192:Got connection confirm: b'connected to trackingroom2'
build env
[Errno 98] Address already in use
Port=9016
Running docker-free env, pid:1843689
Please wait for a while to launch env......
exec nohup /home/dell/tracker/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/FlexibleRoom/trackingroom2/Binaries/Linux/trackingroom2
nohup: ignoring input and appending output to 'nohup.out'
127.0.0.1
INFO:init:192:Got connection confirm: b'connected to trackingroom2'
build env
[Errno 98] Address already in use
Port=9017
Running docker-free env, pid:1843764
Please wait for a while to launch env......
exec nohup /home/dell/tracker/gym-unrealcv/gym_unrealcv/envs/UnrealEnv/FlexibleRoom/trackingroom2/Binaries/Linux/trackingroom2
nohup: ignoring input and appending output to 'nohup.out'
127.0.0.1
INFO:init:192:Got connection confirm: b'connected to trackingroom2'
build env
Process Process-7:
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/dell/Active_tracking_rl/train.py", line 56, in train
player.model = player.model.to(device)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 432, in to
return self._apply(convert)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 124, in _apply
self.flatten_parameters()
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 120, in flatten_parameters
self.batch_first, bool(self.bidirectional))
KeyboardInterrupt
Process Process-6:
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/dell/Active_tracking_rl/train.py", line 56, in train
player.model = player.model.to(device)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 432, in to
return self._apply(convert)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 124, in _apply
self.flatten_parameters()
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 120, in flatten_parameters
self.batch_first, bool(self.bidirectional))
KeyboardInterrupt
Process Process-5:
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/dell/Active_tracking_rl/train.py", line 56, in train
player.model = player.model.to(device)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 432, in to
return self._apply(convert)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 124, in _apply
self.flatten_parameters()
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 120, in flatten_parameters
self.batch_first, bool(self.bidirectional))
KeyboardInterrupt
Process Process-4:
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/dell/anaconda3/envs/act/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/dell/Active_tracking_rl/train.py", line 56, in train
player.model = player.model.to(device)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 432, in to
return self._apply(convert)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/module.py", line 208, in _apply
module._apply(fn)
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 124, in _apply
self.flatten_parameters()
File "/home/dell/anaconda3/envs/act/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 120, in flatten_parameters
self.batch_first, bool(self.bidirectional))
KeyboardInterrupt
2022-04-24 21:58:16,966 : Time 00h 33m 39s, ave eps reward [-1539.65 1534.09], ave eps length 500.0, reward step [-3.08 3.07], FPS 6.55
2022-04-24 22:32:15,107 : Time 01h 07m 38s, ave eps reward [-1464.43 1459.59], ave eps length 500.0, reward step [-2.93 2.92], FPS 6.58

At the same time, i find the agent in the screen doesn't move . Can you give me some advice?

Run errors with gym-unrealcv for active object tracking

partial errors output:
ERROR:init:205:Can not connect to ('127.0.0.1', 9000)
ERROR:init:206:Error [Errno 111] Connection refused

I wanna test the environment 'UnrealTrack-City1StefaniPath1-DiscreteColor-v1' for active object tracking, but it outputs errors. I have prepared the enviroment binaries by performing 'load_env.py', even all the binaries in 'load_env.py' have been downloaded. What can i do to fix this error?

kindly regards,
dong zhou

textures is not available to your platform

I tried to run SnowForest environment. But befroe that I need set up textures.
I ran "python3 load_env.py -e textures" but it says
textures is not available to your platform

UnrealCV server is not running.

ERROR:init:205:Can not connect to ('127.0.0.1', 9005)
ERROR:init:206:Error [Errno 111] Connection refused
UnrealCV server is not running. Please try again

tracking 1v1 can't works well with my own scene

when i use ddpg(gym-unrealcv/example/ddpg/run.py) to train "tracking_1v1"(gym-unrealcv/gym_unrealcv/envs/unrealcv_tracking_1v1.py) in the scene(Garage.json), everything goes well.
But when i train it in my own scene, the agent can just turn around forever.
So any suggestion ? or can you show me you scene projection code in ue?

thanks for any responds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.