Closed laldev closed 3 years ago
It seems you have installed a fairly old version. I do have node 12.22.1 LTS with npm 6.14.12 installed.
Could you please try to update and see if it works:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
If that fixes the issue I will update the Readme accordingly.
Yes, it solved the issue. Installing through the curl command is a mess if you are behind a proxy. The easiest way is to install through binaries. I did the following: Downloaded nodejs v12.x binary file from https://nodejs.org/dist/latest-v12.x/ and
cd /usr/local
tar --strip-components 1 -xzf /path/node-v12.22.1-linux-x64.tar.gz
Few errors that I encountered:
Encoding error in python/sew.py line 18. similar to this StackOverflow issue
Solution: added the line to the top of the file: # -*- coding: utf-8 -*-
Python dependencies that had to be installed
pip3 install natsort
pip3 install scipy
Suggestion to edit readme:
Command for running python/run_gopro_calibration.py requires additional parameters --path_to_build
and --path_to_src
has to be specified otherwise they point to another default location.
Finally this
==================================================================
Estimating IMU biases.
==================================================================
Traceback (most recent call last):
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/get_imu_biases.py", line 5, in <module>
from sew import knot_spacing_and_variance
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/sew.py", line 145
def find_uniform_knot_spacing_spectrum(Xhat, times, quality, *, verbose=False, min_dt=None, max_dt=None):
^
SyntaxError: invalid syntax
==================================================================
IMU bias estimation took 0.05s.
==================================================================
==================================================================
Estimating camera poses for IMU - CAM calibration.
==================================================================
Could not open: /home/EU/USER/work/vendor/data/gopro/GoPro9/dataset3/cam/cam_calib_GH010162_ph_2.0.json
F0610 10:50:06.824108 20661 estimate_camera_poses_from_checkerboard.cc:52] Check failed: read_camera_calibration(FLAGS_camera_calibration_json, camera, fps) Could not read camera calibration: /home/EU/USER/work/vendor/data/gopro/GoPro9/dataset3/cam/cam_calib_GH010162_ph_2.0.json
*** Check failure stack trace: ***
@ 0x7f549a1260cd google::LogMessage::Fail()
@ 0x7f549a127f33 google::LogMessage::SendToLog()
@ 0x7f549a125c28 google::LogMessage::Flush()
@ 0x7f549a128999 google::LogMessageFatal::~LogMessageFatal()
@ 0x556e9f6bfdab (unknown)
@ 0x7f5497f3ebf7 __libc_start_main
@ 0x556e9f6bf6aa (unknown)
==================================================================
Pose estimation estimation took 0.98s.
==================================================================
==================================================================
Estimating Spline error weighting and knot spacing.
==================================================================
Traceback (most recent call last):
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/get_sew_for_dataset.py", line 5, in <module>
from sew import knot_spacing_and_variance
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/sew.py", line 145
def find_uniform_knot_spacing_spectrum(Xhat, times, quality, *, verbose=False, min_dt=None, max_dt=None):
^
SyntaxError: invalid syntax
==================================================================
Spline weighting and knot spacing estimation took 0.04s.
==================================================================
==================================================================
Initializing IMU to camera rotation.
==================================================================
E0610 10:50:06.887715 20663 reconstruction_reader.cc:65] Could not open the file: /home/EU/USER/work/vendor/data/gopro/GoPro9/dataset3/cam_imu/pose_calib_GH010164.calibdata for reading.
F0610 10:50:06.887758 20663 estimate_imu_to_camera_rotation.cc:55] Check failed: theia::ReadReconstruction(FLAGS_input_pose_calibration_dataset, &pose_dataset)
*** Check failure stack trace: ***
@ 0x7f734f0fc0cd google::LogMessage::Fail()
@ 0x7f734f0fdf33 google::LogMessage::SendToLog()
@ 0x7f734f0fbc28 google::LogMessage::Flush()
@ 0x7f734f0fe999 google::LogMessageFatal::~LogMessageFatal()
@ 0x562ce4914bb0 (unknown)
@ 0x7f734d938bf7 __libc_start_main
@ 0x562ce491452a (unknown)
==================================================================
Spline weighting and knot spacing estimation took 0.01s.
==================================================================
==================================================================
Optimizing IMU to Camera calibration using Spline Fusion.
==================================================================
WARNING: Logging before InitGoogleLogging() is written to STDERR
E0610 10:50:06.922936 20664 reconstruction_reader.cc:65] Could not open the file: /home/EU/USER/work/vendor/data/gopro/GoPro9/dataset3/cam_imu/pose_calib_GH010164.calibdata for reading.
F0610 10:50:06.922981 20664 continuous_time_imu_to_camera_calibration.cc:87] Check failed: theia::ReadReconstruction(FLAGS_input_pose_dataset, &pose_dataset) Could not read Reconstruction file.
*** Check failure stack trace: ***
==================================================================
Spline weighting and knot spacing estimation took 0.04s.
==================================================================
==================================================================
Print results.
==================================================================
Traceback (most recent call last):
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/print_result_stats.py", line 75, in <module>
main()
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/print_result_stats.py", line 24, in main
data = read_calib_json(args.path_results)
File "/home/EU/USER/work/vendor/linux/OpenImuCameraCalibrator/python/print_result_stats.py", line 9, in read_calib_json
with open(file, 'r') as f:
IOError: [Errno 2] No such file or directory: '/home/EU/USER/work/vendor/data/gopro/GoPro9/dataset3/cam_imu/cam_imu_calib_result_GH010164.json'
Okay, the error 4 was because my default python was Python2.7 .
(Even though the python3 python/run_gopro_calibration.py
is used for launching the script, it internally calls other python scripts using POPEN which uses the default python version)
I changed it to 3.6 as follows: Set python alternatives (setting python3 with higher priority of 20)
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 20
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10
# To change options manually
sudo update-alternatives --config python
Hi @urbste , I meet error while extract metadata from gopro max .360 file. Have you ever meet this problem before? The .360 file is .mp4 file also, and has the same metadata as ordinary .mp4 file created by gopro 9.
input video path: ~/360/GS070482.360
Output file will be: ~/360/GS070482.360_telemetry.json
Opening ~/360/GS070482.360
<--- Last few GCs --->
[8211:0x3cfc060] 20138 ms: Mark-sweep 2047.5 (2050.7) -> 2047.5 (2051.4) MB, 740.2 / 0.0 ms (+ 77.5 ms in 21 steps since start of marking, biggest step 4.4 ms, walltime since start of marking 829 ms) (average mu = 0.157, current mu = 0.018) allocation[8211:0x3cfc060] 21493 ms: Mark-sweep 2048.5 (2051.4) -> 2047.5 (2050.9) MB, 1354.7 / 0.0 ms (average mu = 0.064, current mu = 0.001) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x140dff9]
Security context: 0x01d27b0808d1 <JSObject>
1: /* anonymous */ [0x2ab89b8b0211] [/media/zcc/Data3/Project/Study/Tool/OpenImuCameraCalibrator/javascript/node_modules/mp4box/dist/mp4box.all.js:~7355] [pc=0x3ea4b05a59d7](this=0x2499d819a169 <ISOFile map = 0x35555a9ffd69>,0x2ab89b887a59 <JSObject>)
2: /* anonymous */ [0x2ab89b8b01d1] [/media/zcc/Data3/Project/Study/Tool/OpenImuCameraCalibrator/javascri...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa1a640 node::Abort() [node]
2: 0xa1aa4c node::OnFatalError(char const*, char const*) [node]
3: 0xb9a9fe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb9ad79 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xd57ff5 [node]
6: 0xd58686 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
7: 0xd64f45 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xd65df5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xd688ac v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xd2f2cb v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x107189e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x140dff9 [node]
Hi, I solved this problem by enlarge the heap size. https://stackoverflow.com/questions/59965966/ineffective-mark-compacts-near-heap-limit-allocation-failed-javascript-heap-ou
Hi, Since I have no knowledge in JS, I am finding it hard to debug this error:
I have already installed nodejs(v8.10.0) though apt and did npm install in the directory OpenImuCameraCalibrator/javascript/
This same error is stopping python/run_gopro_calibration.py from executing.
System: Kubuntu 18.04, 64-bit