cmvr-es/README.md

166 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CMVR-ES
## Overview
## Installation
### 1. Git submodules install
```
git submodule update --init --recursive
```
### 2. Dependency install
```shell
# basic
sudo apt-get install build-essential -y
sudo apt-get install liblttng-ust-dev -y
sudo apt-get install lttng-tools -y
sudo apt install libboost-all-dev libssl-dev -y
# json
sudo apt install libjsoncpp-dev -y
# google
sudo apt install libgoogle-glog-dev -y
# modbus
sudo apt install libmodbus-dev -y
# vision
sudo apt install libeigen3-dev -y
sudo apt install libopencv-dev python3-opencv -y
# fcl
sudo apt install -y libfcl-dev
# flann
sudo apt-get install libflann-dev -y
# ffmpeg (deprecated)
#sudo apt install ffmpeg
#alas
sudo apt-get install libasound2-dev -y
# gstreamer
sudo apt install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad -y
sudo apt install gstreamer1.0-plugins-ugly gstreamer1.0-libav -y
# tinyxml2
sudo apt install libtinyxml2-dev -y
sudo pip install eigenpy
```
### 3. gRPC install (build from source)
version: https://grpc.io/docs/languages/cpp/quickstart/grpc官网地址 v1.73.0
#### 安装完成之后要配置环境变量
vim ~/.bashrc
在末尾添加
### 4. ffmpeg install (build from source)
#### 4.1 install dependencies
```shell
sudo apt-get update
sudo apt install build-essential yasm nasm git -y
sudo apt install libx264-dev libx265-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev -y
```
#### 4.2 build from source
```shell
cd assets
tar xjvf ffmpeg-4.4.tar.bz2
cd ffmpeg-4.4
# set configurations
./configure \
--extra-libs="-lpthread -lm" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-pic \
--enable-shared \
--enable-nonfree \
# build and install
make -j4
sudo make install
```
### 5. librealsense2 2.55.1 install
```shell
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
sudo apt-get install librealsense2-dkms=1.3.24-0ubuntu1 -y
sudo apt-get install \
librealsense2=2.55.1-0~realsense.12473 \
librealsense2-utils=2.55.1-0~realsense.12473 \
librealsense2-dev=2.55.1-0~realsense.12473 \
librealsense2-dbg=2.55.1-0~realsense.12473 -y
```
### 5. OSQPEigen install(build from source)
#### 5.1 install osqp (v0.6.3)
```shell
git clone --branch v0.6.3 https://github.com/osqp/osqp.git
cd osqp
git submodule init
git submodule update
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make -j
sudo make install
```
#### 5.2 install OsqpEigen (v0.10.1)
```shell
git clone --branch v0.10.1 https://github.com/robotology/osqp-eigen.git
cd osqp-eigen
git submodule init
git submodule update
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make -j
sudo make install
```
#### 6 mech-eye-sdk
```shell
cd assets
sudo dkpg -i Mech-Eye_API_2.5.1_amd64.deb
```
### 串口冲突问题
```shell
sudo systemctl stop brltty
sudo systemctl disable brltty
sudo apt remove brltty
```
### ~./bashrc
```shell
export ARCH="x86"
export CMVR_ES_PROJECT_PATH="/home/cmvr/Projects/cmvr-es"
# >>> cmake
export PATH="$CMVR_ES_PROJECT_PATH/dependency/$ARCH/third_party/cmake/v3.30.3/cmake-3.30.3-linux-x86_64/bin:$PATH"
# <<< cmake
# >>> ffmpeg
export LD_LIBRARY_PATH="$CMVR_ES_PROJECT_PATH/dependency/$ARCH/third_party/x264/v165/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$CMVR_ES_PROJECT_PATH/dependency/$ARCH/third_party/x265/v215/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$CMVR_ES_PROJECT_PATH/dependency/$ARCH/third_party/ffmpeg/v4.2/lib:$LD_LIBRARY_PATH"
# <<< ffmpeg
```