Aria_data_tools icon indicating copy to clipboard operation
Aria_data_tools copied to clipboard

Segfaults after local install on Mac

Open jcjohnson opened this issue 3 years ago • 7 comments

I have installed Aria Data Tools locally on my Macbook (Intel processor, macOS 12.3.1) in order to visualize sequences from the Pilot Dataset.

I couldn't find much documentation on how to install on Mac, so I manually stepped through the Dockerfile and duplicated steps one by one.

I got everything to build and the tests appear to pass (Running ctest -j from my cmake build directory reports 100% tests pass). I can also import the datatools in a Python interactive session (import pyark.datatools as datatools).

I'm now trying to run the Visualization Tool for sequences from the pilot dataset, like this:

cd src/visualization
python main.py --vrs_path [path to VRS file]

On some sequences from the Pilot Dataset (such as sample_dataset/desktop_activity/aria_recording.vrs) the GUI appears, but the program crashes with a segfault and no error message when I click the play button. On other recordings (such as sample_dataset/everyday_activity/recording_2/recording.vrs) the GUI appears and I can play the file, but the program crashes with a segfault (and no other error message) at a seemingly random point during playback.

Is this expected behavior? Is there any way to tell what is going wrong?

jcjohnson avatar Jul 25 '22 19:07 jcjohnson

First to verify, is the docker environment working well for you on Mac? We previously manually deprioritize the manual building instructions on Mac because we have not made the building process working for different Mac in our internal test. Some frictions are expected. But I don't think we have a seen a similar segfaul issue at runtime with Mac.

zhaoyang-lv avatar Jul 25 '22 20:07 zhaoyang-lv

I haven't tried the docker install, but I'll give it a try and report back.

jcjohnson avatar Jul 25 '22 20:07 jcjohnson

If you want to try, I have a docker container which works for Mac.

rawalkhirodkar avatar Jul 25 '22 20:07 rawalkhirodkar

Please try the visualizer in the docker on the everyday activity first "sample_dataset/everyday_activity/recording_2/recording.vrs". The visualizer in theory should also work with desktop activity in the docker image. The desktop activity recording profile is slightly different and less tested with the default visualizer. We have a pending change to visualizer specifically for the collection of desktop activities so that we load all the files together.

zhaoyang-lv avatar Jul 25 '22 21:07 zhaoyang-lv

Project Aria recordings in desktop_activities folder do not contain SLAM camera streams, but AriaViewer class used by main.py expect them to fetch information and display images. This explains the first issue discussed above. A viewer for playing desktop activities recordings is soon to be released as @zhaoyang-lv mentioned.

Found out that the second issue - segmentation fault with a recording from everyday_activity folder - occurs when playback is paused, then resumed again. It is related to how the current timestamp gets modified in the loop that reads the records. Thanks for the heads up, testing a fix now.

fskarakas avatar Jul 26 '22 00:07 fskarakas

I pulled @rawalkhirodkar's docker image and followed the documentation https://facebookresearch.github.io/Aria_data_tools/docs/howto/calibration/. The environment seems to work well with the first few commands but the CalibrationModel cannot be loaded:

p_slamLeft = np.array([3.0, 2.0, 1.0])
uv_slamLeft = device_model.getCameraCalib('camera-slam-left').projectionModel.project(p_slamLeft)

which gives the error:

device model <pyark.datatools.sensors.DeviceModel object at 0x4001277570>
Traceback (most recent call last):
  File "project_unproject.py", line 24, in <module>
    uv_slamLeft = device_model.getCameraCalib('camera-slam-left').projectionModel.project(p_slamLeft)
AttributeError: 'NoneType' object has no attribute 'projectionModel'

============================================================================== Figured it out. Turns out configurationRecord needs to be called before using the deviceModel.

davidsonic avatar Aug 01 '22 17:08 davidsonic

I found that project/unproject give unexpected results. I used the docker image from rawalkhirodkar. Have created a new thread for follow-up.

davidsonic avatar Aug 01 '22 21:08 davidsonic

Issue was fixed by 56f185a

gustavomart avatar Oct 06 '22 16:10 gustavomart