安装ubuntu后的环境和工具配置

一些常用工具,如zsh, terminator, clion, ros等的安装请参考
yunfan ubuntu安装后的琐事

zsh插件安装

zsh中有一些好用的插件,比如

默认安装的插件位于路径.oh-my-zsh/plugins/。 插件配置通过zsh配置文件~/.zshrc中的plugins即可:

plugins=(
    zsh-syntax-highlighting
    zsh-autosuggestions
    git
    autojump
    extract
)
  1. 命名高亮:zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

  1. 命令补全:zsh-autosuggestions

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

  1. 文件解压:extract
    刚开始使用Linux系统,想必大家都会有一点苦恼,对于不同类型的压缩格式:.tar、.tar.gz、.tar.bz2、.tar.xz、.rar、.zip,解压的时候到底用啥命令呢?
    有了这个插件就不用纠结了,一律使用 x + 文件名 解决 文件解压问题

x archived_file

  1. 自动跳转目录:autojump
    源码安装
git clone https://github.com/joelthelion/autojump.git
cd autojump
./install.py

然后将如下代码复制到~/.zshrc中

[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && . ~/.autojump/etc/profile.d/autojump.zsh
autoload -U compinit && compinit -u

最后

source ~/.zshrc

至此,打开终端,只要是用cd到达过的目录

cd workspace/catkin_ws

都可以用如下方式到达

j ca

Ceres优化库安装

安装相关依赖

# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
sudo apt-get install libsuitesparse-dev

下载压缩包并解压,压缩包地址
http://ceres-solver.org/ceres-solver-2.0.0.tar.gz

tar zxf ceres-solver-2.0.0.tar.gz #安装了zsh的extract插件,则可以直接用 x + filename解压
cd ceres-solver-2.0.0
mkdir build
cd build
cmake .. #生成makefile
make -j4 #编译
make test
sudo make install #安装

测试,继续在build路径下输入

bin/simple_bundle_adjuster ../data/problem-16-22106-pre.txt 

若出现下图所示结果,则说明安装成功。
在这里插入图片描述

CmakeLists.txt如何使用Ceres
find_package(Ceres REQUIRED)
include_directories(include    ${CERES_INCLUDE_DIRS})

截动图GIF工具byzanz

sudo apt-get install byzanz #下载byzanz

有一个小工具xdotool可以获取鼠标的所在坐标

sudo apt-get install xdotool

命令行输入

xdotool getmouselocation

可以得到鼠标当前的X,Y值,只需要知道所需举行区域左上和右下角的坐标即可截取GIF

截图
byzanz-record -x 506 -y 132 -w 1019 -h 616  -d 10 --delay=5 -c  test.gif

这里设置延时5秒开始录制,录制时长为10秒,并输出到当前位置成test.gif文件,矩形左上角坐标为x=506, y=132,宽度为1019, 高度616.

参数

byzanz主要的参数选项有:
-d, --duration=SECS 动画的时间 (默认:10 秒)
-e, --exec=COMMAND Command to execute and time
–delay=SECS 开始之前的延时(默认:1 秒)
-c, --cursor 录制鼠标光标
-a, --audio 录音
-x, --x=像素 要录制矩形的 X 坐标
-y, --y=像素 要录制矩形的 Y 坐标
-w, --width=像素 录制矩形的宽度
-h, --height=像素 录制矩形的高度
-v, --verbose 详细
–display=显示 要使用的 X 显示

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值