Skip to content

Commit

Permalink
recommend using ubuntu libceres build
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbattle committed Mar 18, 2022
1 parent d286c57 commit 9d7d1a1
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 81 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
uses: actions/checkout@v2
- name: Installing Ceres Solver
run: |
cd ..
sudo apt-get update
sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
git checkout tags/2.0.0
mkdir build
cd build
cmake ..
sudo make install
cd ../../
sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
# cd ..
# git clone https://ceres-solver.googlesource.com/ceres-solver
# cd ceres-solver
# git checkout tags/2.0.0
# mkdir build
# cd build
# cmake ..
# sudo make install
# cd ../../
- name: Configure and Build
run: |
sudo apt-get update
Expand Down
20 changes: 10 additions & 10 deletions Dockerfile_ros1_16_04
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ RUN sudo apt-get install -y python-catkin-tools
# Ceres solver install and setup
# NOTE: need to use an older version as eigen is very outdated here!!!
# NOTE: https://github.com/ceres-solver/ceres-solver/issues/541
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
ENV CERES_VERSION="2.0.0"
RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout tags/${CERES_VERSION} && \
git reset --hard e51e9b46f6 && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) install && \
rm -rf ../../ceres-solver
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
# ENV CERES_VERSION="2.0.0"
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
# cd ceres-solver && \
# git checkout tags/${CERES_VERSION} && \
# git reset --hard e51e9b46f6 && \
# mkdir build && cd build && \
# cmake .. && \
# make -j$(nproc) install && \
# rm -rf ../../ceres-solver

# Seems this has Python 2.7 installed on it...
RUN apt-get update && apt-get install -y python2.7-dev python-matplotlib python-numpy python-psutil python-tk
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile_ros1_18_04
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ RUN apt-get update && apt-get install -y libeigen3-dev nano git
RUN sudo apt-get install -y python-catkin-tools

# Ceres solver install and setup
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
ENV CERES_VERSION="2.0.0"
RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout tags/${CERES_VERSION} && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) install && \
rm -rf ../../ceres-solver
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
# ENV CERES_VERSION="2.0.0"
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
# cd ceres-solver && \
# git checkout tags/${CERES_VERSION} && \
# mkdir build && cd build && \
# cmake .. && \
# make -j$(nproc) install && \
# rm -rf ../../ceres-solver

# Seems this has Python 3.6 installed on it...
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile_ros1_20_04
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ RUN apt-get update && apt-get install -y libeigen3-dev nano git
RUN sudo apt-get install -y python3-catkin-tools python3-osrf-pycommon

# Ceres solver install and setup
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
ENV CERES_VERSION="2.0.0"
RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout tags/${CERES_VERSION} && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) install && \
rm -rf ../../ceres-solver
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
# ENV CERES_VERSION="2.0.0"
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
# cd ceres-solver && \
# git checkout tags/${CERES_VERSION} && \
# mkdir build && cd build && \
# cmake .. && \
# make -j$(nproc) install && \
# rm -rf ../../ceres-solver

# Seems this has Python 3.8 installed on it...
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile_ros2_18_04
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ FROM osrf/ros:dashing-desktop
RUN apt-get update && apt-get install -y libeigen3-dev nano git

# Ceres solver install and setup
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
ENV CERES_VERSION="2.0.0"
RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout tags/${CERES_VERSION} && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) install && \
rm -rf ../../ceres-solver
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
# ENV CERES_VERSION="2.0.0"
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
# cd ceres-solver && \
# git checkout tags/${CERES_VERSION} && \
# mkdir build && cd build && \
# cmake .. && \
# make -j$(nproc) install && \
# rm -rf ../../ceres-solver

# Seems this has Python 3.6 installed on it...
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile_ros2_20_04
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ FROM osrf/ros:galactic-desktop
RUN apt-get update && apt-get install -y libeigen3-dev nano git

# Ceres solver install and setup
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
ENV CERES_VERSION="2.0.0"
RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout tags/${CERES_VERSION} && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) install && \
rm -rf ../../ceres-solver
RUN sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev libceres-dev
# ENV CERES_VERSION="2.0.0"
# RUN git clone https://ceres-solver.googlesource.com/ceres-solver && \
# cd ceres-solver && \
# git checkout tags/${CERES_VERSION} && \
# mkdir build && cd build && \
# cmake .. && \
# make -j$(nproc) install && \
# rm -rf ../../ceres-solver

# Seems this has Python 3.8 installed on it...
RUN apt-get update && apt-get install -y python3-dev python3-matplotlib python3-numpy python3-psutil python3-tk
Expand Down
59 changes: 37 additions & 22 deletions docs/gs-installing.dox
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,17 @@ Please see the official instructions to install ROS:

We do support ROS-free builds, but don't recommend using this interface as we have limited support for it.
You will need to ensure you have installed OpenCV 3 or 4, Eigen3, and Ceres which are the only dependencies.
If ROS is not found on the system, one can use command line options to run the simulation without any visualization or `cmake -DENABLE_ROS=OFF ..`.
If you are using the ROS-free interface, you will need to properly construct the @ref ov_msckf::VioManagerOptions struct with proper information and feed inertial and image data into the correct functions.
The simulator binary `run_simulation` can give you and example on how to do this.
For Ubuntu linux-based system the system dependencies are:

@code{.shell-session}
sudo apt-get install libeigen3-dev libboost-all-dev libceres-dev
@endcode

@subsection gs-install-ceres Ceres Solver

Ceres solver @cite ceres-solver is required for dynamic initialization and backend optimization.
Please refer to their [documentation](http://ceres-solver.org/installation.html#linux) for specifics to your platform.
It should be able to build on most platforms (including ARM android devices).
To install we can perform the following:
If ROS is not found on the system, one can use command line options to run the simulation without any visualization or `cmake -DENABLE_ROS=OFF ..`.
If you are using the ROS-free interface, you will need to properly construct the @ref ov_msckf::VioManagerOptions struct with proper information and feed inertial and image data into the correct functions.
The simulator binary `run_simulation` can give you and example on how to do this.

@code{.shell-session}
sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
CERES_VERSION="2.0.0"
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
git checkout tags/${CERES_VERSION}
mkdir build && cd build
cmake ..
make
sudo make install
@endcode



Expand All @@ -59,8 +47,9 @@ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31
sudo apt-get update
export ROS1_DISTRO=noetic # kinetic=16.04, melodic=18.04, noetic=20.04
sudo apt-get install ros-$ROS1_DISTRO-desktop-full
sudo apt-get install libeigen3-dev python-catkin-tools # ubuntu 16.04, 18.04
sudo apt-get install libeigen3-dev python3-catkin-tools python3-osrf-pycommon # ubuntu 20.04
sudo apt-get install python-catkin-tools # ubuntu 16.04, 18.04
sudo apt-get install python3-catkin-tools python3-osrf-pycommon # ubuntu 20.04
sudo apt-get install libeigen3-dev libboost-all-dev libceres-dev
@endcode

If you only have ROS1 on your system and are not cross installing ROS2, then you can run the following to append this to your bashrc file.
Expand Down Expand Up @@ -95,6 +84,7 @@ sudo apt-get update
export ROS2_DISTRO=galactic # dashing=18.04, galactic=20.04
sudo apt install ros-$ROS2_DISTRO-desktop
sudo apt-get install ros-$ROS2_DISTRO-ros2bag ros-$ROS2_DISTRO-rosbag2* # rosbag utilities (seems to be separate)
sudo apt-get install libeigen3-dev libboost-all-dev libceres-dev
@endcode

If you only have ROS2 on your system and are not cross installing ROS1, then you can run the following to append this to your bashrc file.
Expand Down Expand Up @@ -181,7 +171,7 @@ One should make sure you can see some of the "contrib" (e.g. aruco) when you cma

@m_class{m-block m-warning}

@par OpenCV Install
@par OpenCV Source Installation
Try to first build with your system / ROS OpenCV.
Only fall back onto this if it does not allow you to compile, or want a newer version!

Expand All @@ -201,4 +191,29 @@ You can disable this with `catkin build -DENABLE_ARUCO_TAGS=OFF` or `cmake -DENA




@subsection gs-install-ceres Ceres Solver

Ceres solver @cite ceres-solver is required for dynamic initialization and backend optimization.
Please refer to their [documentation](http://ceres-solver.org/installation.html#linux) for specifics to your platform.
It should be able to build on most platforms (including ARM android devices).
To install we can perform the following:


@par Ceres Source Installation
Try to first build with your system with `sudo apt-get install libceres-dev`.
Only fall back onto this if it does not allow you to compile, or want a newer version!

@code{.shell-session}
sudo apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev
CERES_VERSION="2.0.0"
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
git checkout tags/${CERES_VERSION}
mkdir build && cd build
cmake ..
make
sudo make install
@endcode

*/
1 change: 0 additions & 1 deletion ov_init/src/dynamic/DynamicInitializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,6 @@ bool DynamicInitializer::initialize(double &timestamp, Eigen::MatrixXd &covarian
options_cov.algorithm_type = ceres::CovarianceAlgorithmType::DENSE_SVD; // SPARSE_QR, DENSE_SVD
options_cov.apply_loss_function = false;
options_cov.num_threads = params.init_dyn_mle_max_threads;
options_cov.sparse_linear_algebra_library_type = ceres::SparseLinearAlgebraLibraryType::SUITE_SPARSE;
ceres::Covariance problem_cov(options_cov);
bool success = problem_cov.Compute(covariance_blocks, &problem);
if (!success) {
Expand Down
3 changes: 2 additions & 1 deletion ov_msckf/launch/serial.launch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<arg name="use_stereo" default="true" />
<arg name="bag_start" default="0" /> <!-- v1-2: 0, mh1: 40, mh2: 35, mh3: 17.5, mh4-5: 15 -->
<arg name="dataset" default="V1_02_medium" /> <!-- V1_01_easy, V1_02_medium, V2_02_medium -->
<arg name="bag" default="/media/patrick/RPNG FLASH 3/$(arg config)/$(arg dataset).bag" />
<!-- <arg name="bag" default="/media/patrick/RPNG FLASH 3/$(arg config)/$(arg dataset).bag" />-->
<arg name="bag" default="/datasets/$(arg config)/$(arg dataset).bag" />

<!-- saving trajectory path and timing information -->
<arg name="dosave" default="false" />
Expand Down
3 changes: 2 additions & 1 deletion ov_msckf/launch/subscribe.launch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<arg name="bag_start" default="0" /> <!-- v1-2: 0, mh1: 40, mh2: 35, mh3: 17.5, mh4-5: 15 -->
<arg name="dataset" default="V1_02_medium" /> <!-- V1_01_easy, V1_02_medium, V2_02_medium -->
<arg name="dobag" default="false" /> <!-- if we should play back the bag -->
<arg name="bag" default="/media/patrick/RPNG\ FLASH\ 3/$(arg config)/$(arg dataset).bag" />
<!-- <arg name="bag" default="/media/patrick/RPNG\ FLASH\ 3/$(arg config)/$(arg dataset).bag" />-->
<arg name="bag" default="/datasets/$(arg config)/$(arg dataset).bag" />

<!-- saving trajectory path and timing information -->
<arg name="dosave" default="false" />
Expand Down

0 comments on commit 9d7d1a1

Please sign in to comment.