Wednesday 9 March 2016

ROS ROVIO implementation headache

This time we encountered a huge problem, when we tried to implement ROVIO to Ubuntu 12.04 with ROS hydro, and the results turned out to be disastrous. We had to re-install Ubuntu two times to restore everything to the working condition.

Initially, in order to install ROVIO, we installed kindr, which required Eigen3. However, kindr was unable to find the cmake file for Eigen3, and we had to set the path manually in its cmakelist as in here,

find_package(Eigen 3 QUIET)
if(NOT Eigen_FOUND)
  include(${PROJ_SOURCE_DIR}/cfg/FindEigen3.cmake)
  set(Eigen_INCLUDE_DIR ${EIGEN3_INCLUDE_DIR})
endif()
include_directories(${Eigen_INCLUDE_DIR})

We also had to upgrade gcc from 4.6.3 to 4.8 as here. But later when we installed ROVIO, it prompted that yaml-cpp >= 0.5 was not found. We could not catkin make it even after we put the catkin simple and yaml_cpp_catkin in the same src folder.

Since there was no way to install ROVIO, we deleted it and catkin make to go back to the old workspace. However, now the mavros and mission control could not be compiled, complaining that the deleted boost functions were used. We checked synaptic and found that the current boost version was 1.48.0.2, while actually ROS hydro installed 1.46 as well.

Since we had no idea as to what happened, we re-installed Ubuntu. Although mavros and mavlink seemed ok, mission control complained that it could not find a library in the mavros package. We had to re-install Ubuntu again to solve this issue, but later we found out that the same error persisted. Then we used the older version of mavros, mavlink, mission control and it compiled without any error.

The trouble did not end here, though. When we tried to launch the nodes, one node reported to have error with exit code 11, which refers to segmentation fault. It turned out that this node used an absolute path to fopen some file. Since we re-installed our system, we no longer had that file, and thus we had to create that file and put it in the path specified in the node.

Finally, everything is ok again, but it took us two days to debug!


Wednesday 2 March 2016

OpenMVG gcc version

在ubuntu 12.04上面装openMVG的时候,gcc用4.7.3的时候还是会fail,后来装了gcc 4.8才能成功安装。如何安装gcc 4.8可以参考这里

具体的步骤是
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update; sudo apt-get install gcc-4.8 g++-4.8
sudo update-alternatives --remove-all gcc sudo update-alternatives --remove-all g++ 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
sudo update-alternatives --config gcc sudo update-alternatives --config g++