Monash-Connected-Autonomous-Vehicle / Twizy-Autoware-Shadow-Repo

0 stars 0 forks source link

Compiling Autoware AI from source on PX2 #4

Open Robin-Chea opened 1 year ago

Robin-Chea commented 1 year ago

@hong0431 @Robin-Chea try first compiling Autoware AI without the two driveworks packages first (do not delete the packages, just ignore the packages in the catkin build script)

Robin-Chea commented 1 year ago

11/10/2023

Compiling without ignoring drive-work files gives 5%:

Image

most likely due to errors in autoware_driveworks_gmsl_interface. /home/nvidia/autoware_ai/ros/src/driveworks/packages/autoware_driveworks_gmsl_interface/include/DriveWorksApi.hpp:96:3: error: ‘dwImageFormatConverterHandle_t’ does not name a type dwImageFormatConverterHandle_t yuv2rgba; ^ /home/nvidia/autoware_ai/ros/src/driveworks/packages/autoware_driveworks_gmsl_interface/include/DriveWorksApi.hpp:144:44: error: ‘dwImageFormatConverterHandle_t’ has not been declared uint32_t sibling, dwImageFormatConverterHandle_t yuv2rgba,

Ignoring autoware_driveworks_gmsl_interface and autoware_driveworks_interface we compile up to 6% however we get an error because there is no space left on the device:

Image

Error messages /tmp/cciTaAek.s: Assembler messages: /tmp/cciTaAek.s: Fatal error: can't write 3914 bytes to section .debug_loc of CMakeFiles/multi_lidar_calibrator_lib.dir/src/multi_lidar_calibrator.cpp.o because: 'No space left on device' /tmp/cciTaAek.s: Fatal error: can't close CMakeFiles/multi_lidar_calibrator_lib.dir/src/multi_lidar_calibrator.cpp.o: No space left on device sensing/fusion/packages/multi_lidar_calibrator/CMakeFiles/multi_lidar_calibrator_lib.dir/build.make:62: recipe for target 'sensing/fusion/packages/multi_lidar_calibrator/CMakeFiles/multi_lidar_calibrator_lib.dir/src/multi_lidar_calibrator.cpp.o' failed make[2]: [sensing/fusion/packages/multi_lidar_calibrator/CMakeFiles/multi_lidar_calibrator_lib.dir/src/multi_lidar_calibrator.cpp.o] Error 1 CMakeFiles/Makefile2:24048: recipe for target 'sensing/fusion/packages/multi_lidar_calibrator/CMakeFiles/multi_lidar_calibrator_lib.dir/all' failed make[1]: [sensing/fusion/packages/multi_lidar_calibrator/CMakeFiles/multi_lidar_calibrator_lib.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....

Cleared Cache and freed up some memory

Image

and building results in 76%

Image

something wrong with libGL. this error is similar to https://forums.developer.nvidia.com/t/libgl-so-undefined-reference-error-when-building-opencv-3-3-0/55527 tried : cd /usr/lib/aarch64-linux-gnu/ sudo ln -sf tegra/libGL.so libGL.so

error: wont compile due to missing module libopenni2

Image

to fix i just reinstalled it

sudo apt-get install libopenni2-dev

another error:

Image

sudo apt-get install --reinstall qt5-default libqt5gui5

same error now checking if it exists using dpkg -l | grep vtk

Image

trying to reinstall stuff until it works sudo apt-get install libproj-dev sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri sudo apt-get install --reinstall qt5-default

Robin-Chea commented 1 year ago

12/10/2023 Fixing vtk error looking at this and following their fix: https://github.com/autowarefoundation/autoware_ai/issues/49 Getting error: Image checking if the .so file exists we find that it does exist

Image

using this sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so doesnt work but as we checked before we are not using x86_64 but instead are using aarch64 so sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.aarch64-linux-gnu.so /usr/lib/aarch64-linux-gnu/libvtkRenderingPythonTkWidgets.so

tried to update and install mesa sudo apt-get update sudo apt-get install libgl1-mesa-dev

checking libGL.so we get

Image

we find out that /usr/lib/aarch64-linux-gnu/libGL.so -> tegra/libGL.so but tegra/libGL.so is not pointing to anything so we make sudo ln -sf /usr/lib/libGL.so /usr/lib/aarch64-linux-gnu/libGL.so.

This fixed it now it compiles up to 83% however thats only due to running out of space

Image

The goal for the next test is to find what can be deleted to free up space.