Jetson TK1 Install Ceres Solver 1.14.0

Muhammad Yunus
2 min readSep 11, 2021

Ceres Solver 1 is an open source C++ library for modeling and solving large, complicated optimization problems. It can be used to solve Non-linear Least Squares problems with bounds constraints and general unconstrained optimization problems. It is a mature, feature rich, and performant library that has been used in production at Google since 2010. [http://ceres-solver.org/]

Prerequisites

  • Upgrade Ubuntu 14.04 in Jetson TK1 to Ubuntu 16.04 by referring to this article,

Installation

  • Install dependencies library,
sudo apt-get install cmake cmake-curses-gui
sudo apt-get install libgtest-dev
sudo apt-get install libatlas-base-dev libopenblas-dev
  • Fixing OpenBLAS complaining about missing lapacke.h
sudo cp /usr/include/lapacke*.h /usr/include/openblas

Install Gflags 2.2 From Source

  • Download gflags 2.2,
cd ~
wget https://github.com/gflags/gflags/archive/refs/tags/v2.2.0.tar.gz
tar -xvf v2.2.0.tar.gz
cd gflags-2.2.0
mkdir build && cd build
  • Configure for build gflags 2.2,
ccmake ..
  • Press ‘c’ to configure the build system and ‘e’ to ignore warnings.
  • Set CMAKE_INSTALL_PREFIX and other cmake variables and options.
  • Continue pressing ‘c’ until the option ‘g’ is available.
  • Then press ‘g’ to generate the configuration files for GNU Make.
  • Build gflags 2.2,
make
make test
make install

Install Glog 0.5.0 From Source

  • Download glog 0.5.0 source,
cd ~
git clone --depth 1 --branch v0.5.0 https://github.com/google/glog.git
cd glog
mkdir build
cd build
  • Build and Install glog 0.5.0,
cmake ..
make -j3
make test
sudo make inatall

Install eigen 3.3

  • Download & install .deb package,
wget http://security.ubuntu.com/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.4-4_all.deb
sudo dpkg -i libeigen3-dev_3.3.4-4_all.deb

Install Ceres Solver 1.14.0

  • Download source,
cd ~
wget ceres-solver.org/ceres-solver-1.14.0.tar.gz
tar -xvf ceres-solver-1.14.0.tar.gz
mkdir ceres-bin
cd ceres-bin
  • Build & Install,
cmake ../ceres-solver-1.14.0
make -j3
make test
sudo make install

Source

--

--

Muhammad Yunus

IoT Engineer, Software Developer & Machine Learning Enthusiast