byu-pccl / holodeck Goto Github PK
View Code? Open in Web Editor NEWHigh Fidelity Simulator for Reinforcement Learning and Robotics Research.
Home Page: https://holodeck.cs.byu.edu
License: MIT License
High Fidelity Simulator for Reinforcement Learning and Robotics Research.
Home Page: https://holodeck.cs.byu.edu
License: MIT License
I've noticed that by installing the worlds in /usr/local it can cause some issues with permissions as well as environment variables that are set. I think it would be easier if the worlds were just put inside the python binding folder.
There should also be an easy way to see what worlds are available and download them automatically through Python. Same vein as #34
I think the install.py script needs to be updated to v1.02, which has the config.json file for the worlds. Currently, my holodeck.py is looking for a json file that isn't there (in v1.01).
Also, the config.json file for linux has ".../Holodeck.exe" instead of ".../Holodeck"
After a quick test, it looks as though what the pixel camera is showing isn't from the same position and orientation of the android's head.
The v1.01 binary path has an extra "LinuxNoEditor" in the path, making it something like ".../Holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/LinuxNoEditor/..."
It would be nice to be able to select the start location and orientation.
I'm using Pycharm on Windows.
[HOLODECK_PATH] = C:/Users/ME/AppData/Local/Holodeck/HW7.py (replaced for readability)
"C:\Program Files (x86)\Python36-32\python.exe" [HOLODECK_PATH]
OpenCV Version 3.4.0
Traceback (most recent call last):
File "[HOLODECK_PATH]", line 403, in
main()
File "[HOLODECK_PATH]/main.py", line 52, in main
env = Holodeck.make("UrbanCity")
File "[HOLODECK_PATH]\Holodeck\Holodeck.py", line 52, in make
return HolodeckEnvironment(**param_dict)
File "[HOLODECK_PATH]\Holodeck\Environments.py", line 28, in init
self._client = ShmemClient(self._uuid)
File "[HOLODECK_PATH]\Holodeck\ShmemClient.py", line 24, in init
self.windows_init()
File "[HOLODECK_PATH]\Holodeck\ShmemClient.py", line 34, in windows_init
"Global\HOLODECK_SEMAPHORE_SERVER" + self._uuid)
pywintypes.error: (2, 'OpenSemaphore', 'The system cannot find the file specified.')
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "[HOLODECK_PATH]\Holodeck\Environments.py", line 75, in on_exit
self._client.unlink()
AttributeError: 'HolodeckEnvironment' object has no attribute '_client'
We are hoping to make ROS bindings. It seems that the best way of doing so is either make our python source code work in Python 2.7, or implement it all in c++, and then create the associated ROS bindings. Forking our repository and porting our code to Python 2.7 is probably the easiest/best option.
EuropeanForest drone doesn't react to any commands.
UrbanCity doesn't seem to have a reward signal (at least, I didn't find any reward)
While installing Cyberpunkcity, several things went wrong:
Some sort of unicode error? It only affected display; the world still downloaded in the background
Once downloaded, the world cannot be unzipped. Possibly a temporary file issue?
'''holodeck.install('CyberPunkCity')
Installing CyberPunkCity at /home/wingated/.local/share/holodeck
File size: 1.18 GB
| | 4%Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/holodeck/packagemanager.py", line 147, in file_writer_worker
sys.stdout.write("\r|" + blocks + spaces + "| %d%%" % int_percent)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2589' in position 2: ordinal not in range(128)
BadZipFile Traceback (most recent call last)
in ()
----> 1 holodeck.install('CyberPunkCity')
/usr/local/lib/python3.5/dist-packages/holodeck/packagemanager.py in install(package_name)
97 install_path = os.path.join(holodeck_path, "worlds")
98 binary_url = binary_website + util.get_os_key() + "_" + package_url
---> 99 _download_binary(binary_url, install_path)
100 if os.name == "posix":
101 _make_binary_excecutable(package_name, install_path)
/usr/local/lib/python3.5/dist-packages/holodeck/packagemanager.py in _download_binary(binary_location, worlds_path, block_size)
164 # Unzip the binary
165 print("Unpacking worlds...")
--> 166 with zipfile.ZipFile(tmp_fd, 'r') as zip_file:
167 zip_file.extractall(worlds_path)
168
/usr/lib/python3.5/zipfile.py in init(self, file, mode, compression, allowZip64)
1024 try:
1025 if mode == 'r':
-> 1026 self._RealGetContents()
1027 elif mode in ('w', 'x'):
1028 # set the modified flag so central directory gets written
/usr/lib/python3.5/zipfile.py in _RealGetContents(self)
1091 raise BadZipFile("File is not a zip file")
1092 if not endrec:
-> 1093 raise BadZipFile("File is not a zip file")
1094 if self.debug > 1:
1095 print(endrec)
BadZipFile: File is not a zip file
'''
It would be helpful to know the intrinsic parameters of the camera and also the angle field of view. These are needed for control algorithms involving the camera.
Right now, set_control_scheme
takes an integer argument. We should make them enums to make it easier.
The location sensor doesn't initialize to zero (which seems like it would be ideal) and the data seems to be given in centimeters while the altitude command is given in meters. Is this intentional?
It thinks I'm on windows.
Running Ubuntu 16.04 LTS
pip3 v 18.0, for python 3.5
Error log below:
wingated@coban:~$ sudo -H pip3 install holodeck
Collecting holodeck
Downloading https://files.pythonhosted.org/packages/28/b4/471bf45fe6f723f4753d50379f6b402b319a8c142aafb8f0700f33c78054/holodeck-0.0.21.tar.gz
Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment
Collecting posix_ipc>=1.0.0; platform_system == "Linux" (from holodeck)
Downloading https://files.pythonhosted.org/packages/c9/3e/54217da71aa26b488295d878df4d3132093253b4ae5798ac66fcb6921ef0/posix_ipc-1.0.4.tar.gz (78kB)
100% |████████████████████████████████| 81kB 2.8MB/s
Building wheels for collected packages: holodeck, posix-ipc
Running setup.py bdist_wheel for holodeck ... done
Stored in directory: /root/.cache/pip/wheels/c1/27/8b/2dbcb4c5343f796f32eb48f5e07d6b4612b7462d05cfb5b4fa
Running setup.py bdist_wheel for posix-ipc ... done
Stored in directory: /root/.cache/pip/wheels/5a/5c/17/d0e2d421abaf3b4097bf9db11108380d734195c6d15c24269d
Successfully built holodeck posix-ipc
**holodeck 0.0.21 requires pywin32>=1.0, which is not installed.**
Installing collected packages: posix-ipc, holodeck
Successfully installed holodeck-0.0.21 posix-ipc-1.0.4
I thought this bug had been solved, but it only works in some instances. There are on exit functions which attempt to clean up the semaphores and mmaps, so we should look in what circumstances they aren't cleaned up properly.
We need clear documentation for the following headings:
It would be really nice to create our own holodeck docker images that include cuda and opengl as well as holodeck.
For example, PID settings for UAV.
This should be fairly easy. Something like giving HolodeckAgent some "settings buffer", and have the child class define the size. Then, index into that buffer in C++ for each variable, setting the default values. Then connect to this buffer with Python and somewhere define what each index in the buffer corresponds to.
That's just an initial idea, if you can think of a better way, we can do it that way.
Some trees are missing textures in the Linux build of the RedwoodForest.
If I start a game, and change to third person camera mode with v, and then call reset, my camera setting is also reset back to follow. It would be better to keep the camera settings on reset.
I was running the maze world with 10k episodes of 600 timesteps.
On the 80th episode the game window shut down and my program hung.
More complete logging could help get to the bottom of this, and there was no error message.
Looks like too many files are opened and not closed. We shouldn't be opening files on each reset.
Error Message:
[2018.08.23-18.13.20:395][ 84]LogHolodeck: Subscribing sensor Terminal for agent sphere0
Signal 11 caught.
Malloc Size=131076 LargeMemoryPoolOffset=131092
CommonLinuxCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=196655
[2018.08.23-18.13.20:430][ 84]LogLinux: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to write memory at address 0x00000000ffffffff
[2018.08.23-18.13.20:430][ 84]LogLinux: Fatal error!
[Callstack] 00 0x000000000249ff8f FLinuxPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*)
[Callstack] 01 0x000000000236ec45 FGenericPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*)
[Callstack] 02 0x0000000002451e70 FLinuxCrashContext::CaptureStackTrace()
[Callstack] 03 0x00000000057b9e4b CommonLinuxCrashHandler(FGenericCrashContext const&)
[Callstack] 04 0x00000000024533f3 PlatformCrashHandler(int, siginfo_t*, void*)
[Callstack] 05 0x00007f6854847890 /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f6854847890]
[Callstack] 06 0x000000000231c418 AHolodeckAgent::InitializeController()
[Callstack] 07 0x00000000023165fb AHolodeckAgent::BeginPlay()
[Callstack] 08 0x00000000043677ad AActor::DispatchBeginPlay()
[Callstack] 09 0x000000000513ac9a AWorldSettings::NotifyBeginPlay()
[Callstack] 10 0x000000000488b03d AGameMode::HandleMatchHasStarted()
[Callstack] 11 0x000000000488b744 AGameMode::SetMatchState(FName)
[Callstack] 12 0x000000000231f194 AHolodeckGameMode::StartPlay()
[Callstack] 13 0x000000000512ab49 UWorld::BeginPlay()
[Callstack] 14 0x0000000005053c00 UEngine::LoadMap(FWorldContext&, FURL, UPendingNetGame*, FString&)
[Callstack] 15 0x000000000504fbf0 UEngine::Browse(FWorldContext&, FURL, FString&)
[Callstack] 16 0x0000000005050f9c UEngine::TickWorldTravel(FWorldContext&, float)
[Callstack] 17 0x000000000485c71d UGameEngine::Tick(float, bool)
[Callstack] 18 0x0000000002301ce4 FEngineLoop::Tick()
[Callstack] 19 0x000000000230599a GuardedMain(wchar_t const*)
[Callstack] 20 0x00000000057baac4 CommonLinuxMain(int, char**, int (*)(wchar_t const*))
[Callstack] 21 0x00007f685382bb97 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f685382bb97]
[Callstack] 22 0x00000000022f756e /home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Binaries/Linux/Holodeck() [0x22f756e]
[2018.08.23-18.13.20:440][ 84]LogExit: Executing StaticShutdownAfterError
[2018.08.23-18.13.20:442][ 84]LogLinuxPlatformFile: Warning: open('/home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Saved/Crashes/crashinfo-Holodeck-pid-11375-18D7626D14080C17000D01B9466A70EE/Diagnostics.txt', Flags=0x00080041) failed: errno=24 (Too many open files)
[2018.08.23-18.13.20:443][ 84]LogLinuxPlatformFile: Warning: open('/home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Saved/Crashes/crashinfo-Holodeck-pid-11375-18D7626D14080C17000D01B9466A70EE/wermeta.xml', Flags=0x00080041) failed: errno=24 (Too many open files)
[2018.08.23-18.13.20:443][ 84]LogLinuxPlatformFile: Warning: open('/home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Saved/Crashes/crashinfo-Holodeck-pid-11375-18D7626D14080C17000D01B9466A70EE/minidump.dmp', Flags=0x00080041) failed: errno=24 (Too many open files)
[2018.08.23-18.13.20:444][ 84]LogLinuxPlatformFile: Warning: open('/home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Saved/Logs/HolodeckLog.txt', O_RDONLY | O_CLOEXEC) failed: errno=24 (Too many open files)
[2018.08.23-18.13.20:444][ 84]LogLinuxPlatformFile: Warning: open('/home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Saved/Config/CrashReportClient/UE4CC-Linux-0002462D19080C17000C029B4326AA4E/CrashReportClient.ini', O_RDONLY | O_CLOEXEC) failed: errno=24 (Too many open files)
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Windows: When you run Holodeck it can't be closed by clicking the close button. Instead you have to do it from task manager. It also captures your mouse on startup.
One for each eye, could be useful for research around depth perception.
Should add ability to print output from:
On my machine installation using UrbanCity and UAVAgent, the following three sensors return only 0 vectors:
state[Sensors.VELOCITY_SENSOR]
state[Sensors.LOCATION_SENSOR]
state[Sensors.IMU_SENSOR]
Error message:
AttributeError: 'HolodeckEnvironment' object has no attribute '_agent_definitions'
We need some automated system for enforcing the style guide for both the Python code and C++ code.
After creating an environment with Holodeck.make, we should be able to get information such as:
Also, a helper function for listing all available environment names, maybe Holodeck.environments().
Any other useful information to give to the user.
Currently the coordinate system appears to be left-hand, which makes it difficult to work with for robotic vision/controls.
Also, the starting location of the quadrotor appears arbitrary (in the 400s), would make more sense if it were zero.
Changing:
UrbanCity UAVAgent uav0 512 512 PrimaryPlayerCamera OrientationSensor LocationSensor VelocitySensor IMUSensor
to
UrbanCity UAVAgent uav0 480 640 PrimaryPlayerCamera OrientationSensor LocationSensor VelocitySensor IMUSensor
results in a silent hang - looks like the holodeck subprocess has died.
Error Message:
Signal 11 caught.
Malloc Size=131076 LargeMemoryPoolOffset=131092
CommonLinuxCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=196655
[2018.09.03-18.56.50:112][820]LogLinux: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000278
[2018.09.03-18.56.50:112][820]LogLinux: Fatal error!
[Callstack] 00 0x00000000024a663f FLinuxPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Private\Linux/LinuxPlatformStackWalk.cpp, line 1029]
[Callstack] 01 0x0000000002375f85 FGenericPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Private\GenericPlatform/GenericPlatformStackWalk.cpp, line 159]
[Callstack] 02 0x0000000002458520 FLinuxCrashContext::CaptureStackTrace() [Runtime/Core/Public/Containers/ContainerAllocationPolicies.h, line 332]
[Callstack] 03 0x00000000057c115b CommonLinuxCrashHandler(FGenericCrashContext const&) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Linux\LinuxCommonStartup\Private/LinuxCommonStartup.cpp, line 37]
[Callstack] 04 0x0000000002459aa3 PlatformCrashHandler(int, siginfo_t*, void*) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Private\Linux/LinuxPlatformCrashContext.cpp, line 0]
[Callstack] 05 0x00007ff66de03390 /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7ff66de03390]
[Callstack] 06 0x0000000002323098 AHolodeckPawnController::Tick(float) [C:\Users\Max\Desktop\HolodeckDefaultWorlds\Source\Holodeck\HolodeckCore\Private/HolodeckPawnController.cpp, line 55]
[Callstack] 07 0x000000000435aaa5 FActorTickFunction::ExecuteTick(float, ELevelTick, ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) [Runtime/Core/Public\Containers/UnrealString.h, line 56]
[Callstack] 08 0x0000000004ff89d9 FTickFunctionTask::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Engine\Private/TickTaskManager.cpp, line 0]
[Callstack] 09 0x0000000004ff8520 TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) [Runtime/Core/Public\Async/TaskGraphInterfaces.h, line 0]
[Callstack] 10 0x000000000239b1d9 FNamedTaskThread::ProcessTasksNamedThread(int, bool) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Private\Async/TaskGraph.cpp, line 229]
[Callstack] 11 0x000000000239a73e FNamedTaskThread::ProcessTasksUntilQuit(int) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Private\Async/TaskGraph.cpp, line 559]
[Callstack] 12 0x0000000002398699 FTaskGraphImplementation::WaitUntilTasksComplete(TArray<TRefCountPtr<FGraphEvent>, TInlineAllocator<4u, FDefaultAllocator> > const&, ENamedThreads::Type) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Private\Async/TaskGraph.cpp, line 1325]
[Callstack] 13 0x0000000004ff3e83 FTickTaskSequencer::ReleaseTickGroup(ETickingGroup, bool) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Engine\Private/TickTaskManager.cpp, line 391]
[Callstack] 14 0x0000000004fee511 FTickTaskManager::RunTickGroup(ETickingGroup, bool) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Engine\Private/TickTaskManager.cpp, line 1450]
[Callstack] 15 0x00000000049f05c8 UWorld::RunTickGroup(ETickingGroup, bool) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Engine\Private/LevelTick.cpp, line 758]
[Callstack] 16 0x00000000049f67cc UWorld::Tick(ELevelTick, float) [Runtime/Core/Public\Misc/TimeGuard.h, line 58]
[Callstack] 17 0x0000000004863ba7 UGameEngine::Tick(float, bool) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Public\Linux/LinuxPlatformTime.h, line 28]
[Callstack] 18 0x0000000002307274 FEngineLoop::Tick() [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Core\Public\Stats/Stats2.h, line 1688]
[Callstack] 19 0x000000000230af2a GuardedMain(wchar_t const*) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Launch\Private/Launch.cpp, line 0]
[Callstack] 20 0x00000000057c1dd4 CommonLinuxMain(int, char**, int (*)(wchar_t const*)) [C:\Users\Max\Documents\UnrealEngine\Engine\Source\Runtime\Linux\LinuxCommonStartup\Private/LinuxCommonStartup.cpp, line 236]
[Callstack] 21 0x00007ff66cea3830 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ff66cea3830]
[Callstack] 22 0x00000000022fcafe /home/josh/.local/share/holodeck/worlds/LinuxDefaultWorlds/LinuxNoEditor/Holodeck/Binaries/Linux/Holodeck() [0x22fcafe]
[2018.09.03-18.56.50:122][820]LogExit: Executing StaticShutdownAfterError
Malloc Size=50585 LargeMemoryPoolOffset=247257
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
In order to produce a roll to the right, I need to give the simulation a negative roll command. Reading the state back from the orientation sensor gives a positive roll angle of equal magnitude, but opposite sign to the roll command. It seems as though there is a sign or direction error in the roll control code.
Dependencies:
-tqdm
-zmq
We should have permissions set correctly before the worlds are added to the tarball. We should add this to the workflow instructions for building worlds.
reset should give you the initial state, but instead it is generally all 0.
I installed the latest version of Holodeck, and I am no longer able to load any worlds. They simply are not found.
If you try to install at ~ it says the path doesn't exist.
It would be nice to implement the ability to draw debug lines in the world using the python client. This could be easily implemented using the client commands class.
I've successfully installed the latest version multiple times but keep getting an error message saying that 2 drivers were not found. The drivers are XAPOFX1_5.dll and X3DAudio1_7.dll. When I close the error message I get an exception that says it "timed out waiting for the binary to load." During class today one of the students mentioned that he believes there's a problem with the directories for the binary. I don't remember the exact details, but performing a reinstall does not fix the problem. I've tried this on each of the worlds and get the same issue.
Currently you can accelerate the Uav's rotation forever, there should be some resistance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.