Recently, I updated my Ubuntu version from 16.04 to 18.04, and I'd
like to share my experience on how to build a work or study environment
for yourself.
This blog mainly introduces how to install Sogou pinyin in
non-Chinese versions of Ubuntu.
How to install Sogou pinyin
Firstly, you should install fcitx, a lightweight
input method framework aimed at providing environment independent
language support for Linux.
Recall that: > remove - remove is identical to install except that
packages are removed instead of installed. Note that removing a package
leaves its configuration files on the system. If a plus sign is appended
to the package name (with no intervening space), the identified package
will be installed instead of removed.
purge - purge is identical to remove except that packages are removed
and purged (any configuration files are deleted too). This of course,
does not apply to packages that hold configuration files inside the
user's home folder.
what sudo apt autoremove actually does? Whenever you install an
application (using apt-get), the system will also install the software
that this application depends on. It is common in Ubuntu/Linux that
applications share the same libraries. When you remove the appplication
the dependency will stay on your system. So apt-get autoremove will
remove those dependencies that were installed with applications and that
are no longer used by anything else on the system.
You can subsequently open Language Suppor to
double-check that Key board input method system has
change from ibus to fcitx, and you can change it manuallyif not. You can
ignore it and click the "Remind Me later" button if you are reminded
that "The language support is not installed completely".
Importantly, you must
reboot your system after that.
After that, you can download the deb package from the official
website, 搜狗输入法
for Linux, or here (also official links) directly.
You can install it in Ubuntu Software by
double-clicking, shown as below.
Importantly, you must
reboot your system again.
You can open fcitx config tool after rebooting, as you can see below.
You should also see Sogou Pinyin in the lists. Unfortunately, if not,
you can add it by clicking the + mark, choose Sogou Pinyin and reboot
the system again.
Now, you should input Chinese characters at the same time. In other
words, you can use it as convenient in Windows system, like the
Shuangpin input method. Yeah, you can learn more detail about Shuangpin
in 双拼学习.
How
to install rtags for vim in Ubuntu 18.04 / 如何在Ubuntu 18.04
vim上安装rtags插件
This blog introduces how to install the best cross-reference tool, rtags, that I have ever
used in vim, step by step. I hope it helps.
What's rtags
Rtags is a
client/server application that indexes C/C++ code and keeps a persistent
file-based database of references, declarations, definitions,
symbolnames etc. It allows you to find symbols by name (including nested
class and namespace scope). Most importantly, it gives you proper
follow-symbol and find-references support.
Rtags comes with emacs support but there are projects supporting
other IDEs: vim-rtags
and sublime-rtags.
In this blog, We would install vim-rtags later.
How to install rtags
First, you need clang, which is a compiler front end
for the C, C++, Objective-C and so on. It uses the LLVM compiler
infrastructure as its back end and has been part of the LLVM release
cycle since LLVM 2.6.
// Commands in Ubuntu terminal git clone --recursive https://github.com/Andersbakken/rtags.git cd rtags <-- in rtags directory cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 . make sudo make install
Thirdly, you should install vim-rtags in Vundle.vim. I think
it's the easiest way to install rtags plugin in vim. You need to add the
following line to .vimrc if you have installed Vundle, and then run
:PluginInstall in vim.
1
Plugin 'lyuts/vim-rtags' <-- install in vim
Finally, the last but essential step is that forcing
cmake to output compile_commands.json (like DCMAKE_EXPORT_COMPILE_COMMANDS)
and link it with rtags according to your project.
1 2 3
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 [***] your_src_path rc -J your_build_folder_path <-- use compile_commands.json in your build folder rdm & <-- launch the rtags server
Add the ClustrMaps hit tracker to your site or blog and see a
real-time map of your visitors from around the world! Proudly show and
grow your hidden community of interest.
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=your.site
Q: Renew 失败,报错信息如下: > Attempting to renew cert
(www.xx.net) from /etc/letsencrypt/renewal/www.xx.net.conf produced an
unexpected error: 'ascii' codec can't decode byte 0xe8 in position 57:
ordinal not in range(128). Skipping.
In this paper, a navigation method for a small size hopping rover
with advantages on its mobility is discussed by considering with some
uncertainties caused by jumping behavior and measurement error.
和通常的路径规划一样,本文首先从环境数据中提取障碍物,构建三角形
(triangular polygons) 的环境网格,然后使用 A star
算法来规划安全的路径。其中,算法着重考虑了和障碍物的碰撞风险,复杂地形
(roughness of terrain) 和失败的跳跃行为 (failures of hopping
action)。
By extracting obstacles from environmental data and constructing
triangular polygons it is possible to form paths. The algorithm
considers with safety of collision with obstacles, roughness of terrain
and failures of hopping action, and then could generate safer path based
on A* algorithm.
作者提出一种新的方法,使用多个轻量紧凑的探索机器智能体 (light and
compact exploration robot agent) 来共同工作,构成一个大的智能体。
One possibility is the introduction of a light and compact
exploration robot agent, and it is possible that multiple types of
agents work together in one system. Various roles (functions) can be
played on various kinds of equipment, and all of them can constitute one
exploration system.
By allocating the same function (equipment) to some or many of them,
it is possible to ignore some percentage of the agent's loss rate, so
that risk can be distributed to the system and the mission and there is
a high possibility of obtaining higher efficiency.
Multi Exploration
虽然小机器人 (A small size rover) 因为大小 (size) 和重量 (weight)
有很多优势,但是其移动性 (traversability) 和测量能力 (measurement)
却受到局限。
However, its size causes problems on its traversability and
measurement ability.
Introduction of two types of rovers is being considered in the
exploration system. One is a land-based agent and a stochastic existence
region is given in the search region, contributing to the search of the
ground surface. The other is hopping rover. the rover that makes path
planning taking advantage of sensing from high places while moving the
exploration area together with the ground moving rover plays an
important role.
相比轮式机器人,在低重力环境下 (low gravitational
environment),可以通过跳跃的方式跳过障碍物,从而抄近路 (adopt a
short-cut path)。
Especially under low gravitational environment such as other planet
or satellite, it indicates higher performance, e.g.Thus, it can jump
over a long distance upon terrains and obstacles, adopt a short-cut path
without a detour of a wheeled type, and also measure an environment from
higher position in the air of jumping trajectory.
For a hopping rover, though a lot of jumping hardware designs have
been studied, its software e.g. navigation algorithms have been
discussed hardly. So, the navigation method hasn't been established by
taking advantage of hopping mobility such as jumping over
obstacles or a long distance yet.
In this paper, a navigation method for a small size hopping rover
with advantages on its mobility is discussed with some risk
considerations on its mobility and measured data.
PATH PLANNING FOR HOPPING
MOBILITY
Selection of Jumping
Target Position
移动机器人跳跃行为 (jumping motion) 的不确定性包括初始速度变化
(initial speed change),跳跃距离 (jump distance),跳跃方向 (jumping
direction),落地后的束缚 (bound after landing) 以及跳跃失败 (failure of
leap)。
The uncertainty factor of hopping rover's jumping motion is the
initial speed change, jump distance, jumping direction, bound after
landing, failure of leap.
因为跳跃行为的不确定性,所以需要选取目标落地点 (landing point)。
如何环境建模
连接被识别到的障碍物,构成不规则三角形的环境模型。
Each obstacle captured by sensing is connected and the observation
area is divided into triangles
The error is generally given in the form of a normal distribution,
which rides on the initial speed, the jumping angle, and the direction
angle, respectively.
本文研究了一个垂直跳跃机器人 (a 1D mass-spring system with an
actuated mass)
的动力特性,该机器人主要是由驱动马达、质心弹簧组成。文章通过改变驱动力(马达)的频率、幅值来寻找跳跃的最优表现。通过分析离地跳跃模型,发现最有跳跃不是发生在机器人的共振频率
(resonant frequency) \(f_{0}\)。其中,类似于蹲下来起跳 (squat
maneuver) 的行为,最优跳跃的频率高于 \(f_{0}\);类似于反向运动(counter-movement),最优跳跃的频率低于\(f_{0}\)。
Systematic variation of forcing parameters reveals complex dynamics
which are sensitive to amplitude, phase and frequency.
Simple models have the ability to be fully analyzed and can thus
provide guidance for simplifying control of more complex devices, and
even reveal principles of biological locomotion.
研究背景:在越过复杂地形时,生物启发的跳跃机器人是轮式机器人的一个替代。目前,跳跃的最优策略往往是基于经验来调试,瞬间行为(如离地跳跃)的动态系统分析(dynamics
of transient behaviors)是相对少的。
In robotics, biologically inspired legged jumping robots have been
constructed as an alternative to wheeled robots to better traverse rough
terrain.
The initial movement strategies for optimal jumping are typically
chosen by empirical tuning for steady state hopping or squat jumps.
Systematic studies of the dynamics of transient behaviors, critical to
issues of lift-off, are relatively scarce.
Experiment and model
硬件设计:线性马达+弹簧+推力棒+空气轴承(摩擦小)
The robot consisted of a linear motor actuator with a series spring
rigidly attached to the bottom end of the actuator’s lightweight thrust
rod. The actuator was mounted to an air bearing which allowed for 1D,
and nearly frictionless, motion.
Due to power limitations in the actuator, the bearing was inclined at
15 degree relative to the horizontal, reducing gravitational
acceleration to 0.276g.
马达相对于驱动棒(thrust rod)底部的位置关系表达式,如下所示。
设计巧妙处,利用电路(open
circuit)做传感器,统计跳跃时间和高度,简单且精度高。
To detect lift-off, a continuity sensor attached to the bottom of the
metal spring measured an open circuit when the spring left the
ground.
结合理论和实验,作者提出一个机器人的动态模型,原理及推导过程,如下所示。
公式推导
以及,和地面碰撞后的恢复系数。
A constant coefficient of restitution of 0.8 (measured from
experiment) modeled the collision of the spring with the ground.
Lift off and jump height
只研究马达运行一次的跳跃表现。
Since we were interested in rapid jumps from rest, actuator forcing
was then restricted to only one cycle (N = 1). We systematically
examined jumping height for N = 1.
In the single jump mode, the robot compressed the spring and was
propelled into the air.
突突跳(stutter jump)
In the stutter jump mode, the robot performed a small initial jump
followed by a larger second jump.
两种跳跃模式示意图
重要结论:For large \(\phi\) single
jumps predominate while stutter jumps occurred at lower \(f\) and \(\phi\).
Single jump vs Stutter jump
起跳时间:The time to lift-off was smaller for single jumps
than stutter jumps.
Theory of transient mixing
看似简单的等式一,因为参数 \(\alpha\) 的线性,更像是一个分段线性动态系统
(piecewise linear dynamical systems),包含一系列复杂的行为。
基于等式一,理论分析为什么最佳跳跃不是发生在谐振频率。
We are particularly interested in why optimal jumps occur only off
resonance.
Single jump
基于对等式一的变形,从模型中发现理论依据。
理论分析
Moving off resonance, the prefactor favors higher f over lower, so
the optimum f lies somewhat above \(f_{0}\) (resonance). This argument holds
regardless of A.
最佳突突跳(stutter jump)的频率带宽(narrow frequency
bandwidth)比较窄。 > This sensitivity to proper timing explains the
narrow frequency bandwidth required to achieve optimal jump heights
using the stutter jump mode.
最佳突突跳的频率强依赖幅值,单次跳则没有明显依赖。 > A further
consequence is a strong dependence of optimal f with respect to A.
和单次跳跃相比,突突跳达到相同高度的消耗能量要少一个数量级。 >
Thus the stutter jump is energetically advantageous since it has a lower
optimal f than the single jump. In fact, the stutter jump uses nearly
an order of magnitude less power to achieve comparable
jump height to the single jump.
Conclusion
Works have done
发现突突跳,使用的能量少,但是跳跃高度高,性价比高。 > The system
becomes hybrid for certain parameters as a stutter jump emerges. This
mode achieves comparable jump height but uses less power.
研究成果和已有结论相符 > Biologically, our model is in accord
with a previous model of bipedal jumping which predicted that
counter-movement achieves greater jump height than the squat jump. A
quick single jump that resembles a squat jump is beneficial when a fast
escape is essential, while a slower stutter jump similar to a
counter-movement can achieve comparable jump height.
Works to do
研究其他影响因素,如系统固有性质和环境的影响 > how other factors,
intrinsic and environmental, affect optimal performance
A non-sinusoidal actuation could improve jump height, take off time,
or efficiency.
Animals jump off compliant surfaces (like tree branches) and from
deformable substrates (like sand).
%文件 fskdemo().m %用途:频谱仪导入I/Q数据进行FSK非相干解调,输出解调图像,可解调多峰值 %用法:输入导入数据向量,幅值截止值 functionfskdemoshow=fskdemo(Y,cutoff) close all;%关闭所有的图片窗口 DataLength=length(Y);%获取.mat格式的数据长度 magY=abs(Y);%求I/Q数据的幅值 m=1:DataLength; figure(1); plot(m,magY); title('幅度显示');%图形标题说明 %获取高峰值数目PeakNumber TestEnd =1;%峰值检验初始起始点 PeakNumber=0; for time=1:100%预计极限峰值数 fori=TestEnd:DataLength %检测峰值开始值 if magY(i)>cutoff TestBegin=i; PeakNumber=PeakNumber+1; break; end end fori= TestBegin: DataLength %检测峰值结束值 if magY(i)<cutoff TestEnd=i;break; end end end TestEnd =1;%峰值检验初始起始点 %峰值数目大于等于100提示 if(PeakNumber>=100) disp('峰值数超过100次,处理可能出错!'); end %峰值fsk解码处理显示 for time=1:PeakNumber%峰值数 fori= TestEnd: DataLength %检测峰值开始值 if magY(i)>cutoff TestBegin=i;break; end end fori= TestBegin: DataLength %检测峰值结束值 if magY(i)<cutoff TestEnd=i;break; end end ValueNumber= TestEnd- TestBegin;%计算当前峰值总数 y=Y.';%矩阵倒置 ValueData=y(1,TestBegin:TestEnd-1); PhaseDiff=diff(unwrap(angle(ValueData)));%核心算法 m=1:ValueNumber-1; figure(time+1);%图片递增打开 plot(m, PhaseDiff); axis([1,ValueNumber-1,-2.5,2.5]);%X,Y轴尺度要变化 title('FSK解调显示');%图形标题说明 grid on%显示格栅 end
References
关玉莲. 正交解调在无线电信号分析中的应用. 中国无线电.
2010年第11期
《RSA3408B 8 GHz Real-Time Spectrum Analyzer User Manual》