Problem overview
The Apollo docker includes a version of PCL which was built with the FMA instruction set (fused multiply-add). For any Intel processor older than Haswell (and perhaps even some Broadwell processors), this causes an illegal instruction and prevents Dreaview from starting. In previous version of Apollo, this was difficult to problem solve since no error details were provided – in fact, Dreamview would be reported to be running but localhost:8888 could not be accessed. Since 3.0, however, Dreamview reports the following:
dreamview: ERROR (spawn error)
Note: this can probably be caused by many other issues. However, if you are running Haswell or earlier, the solution provided here is likely to work. You can use gdb
to troubleshoot spawn errors.
The solution
You have to build PCL within the docker to overcome this problem.
cd /apollo
git clone https://github.com/PointCloudLibrary/pcl.git
git checkout -b pcl-custom
Now you need to add the following to /apollo/pcl/CMakeLists.txt
:
- Below the line
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "possible configurations" FORCE)
, add the following:
if (CMAKE_VERSION VERSION_LESS "3.1")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
message("Build with c++11 support")
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
Build PCL with the default options.
cd /apollo/pcl
mkdir build
cd build
cmake ..
make
Replace the current PCL libraries with the new ones you just made (you can backup first).
sudo mkdir -p /usr/local/lib/pcl.backup
sudo mv /usr/local/lib/libpcl* /usr/local/lib/pcl.backup
sudo cp -a lib/* /usr/local/lib/
sudo ldconfig
Now you have to re-build Apollo.
cd /apollo
./apollo.sh clean
./apollo.sh build_gpu
And hopfully you can now start and access Dreamview with the usual ./scripts/bootstrap.sh
.