linux总结小问题

linux总结小问题,第1张

linux总结小问题 学习目标:linux学习记录

21.9.25

1.终端复制粘贴快捷键

:复制 : Ctrl+Shift+C粘贴 : Ctrl+Shift+V
日常 *** 作Ctrl+C | V 即可

Ubuntu16.04 开启多个终端,一个终端多个小窗口,并放大缩小终端字体

Ctrl + Shift + T,一个终端开启多个小终端

Ctrl + Alt + T 开启多个终端

Ctrl + Shift + =放大终端字体

Ctrl + - 缩小终端字体 -是减号

2.linux版本查看

1通过cat命令查看安装的版本信息文件
cat 命令用于连接文件并打印到标准输出设备上
可参考:cat命令
命令:cat /proc/version
2.通过uname命令查看系统相关信息 uname -a
可参考:uname命令
命令:uname -a

3.Python 版本切换
update-alternatives --list python
update-alternatives --config python
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1(后面是标号)
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
vim 文件保存退出

:w 保存文件但不退出vi
:w file 将修改另外保存到file中,不退出vi
:w! 强制保存,不推出vi
:wq 保存文件并退出vi
:wq! 强制保存文件,并退出vi
:q 不保存文件,退出vi
:q! 不保存文件,强制退出vi
:e! 放弃所有修改,从上次保存文件开始再编辑命令历史

ros 创建工程
mkdir catkin_ws/src
cd 进入src
catkin_make
$ cd ~/catkin_ws
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
$ catkin_make
 source ~/catkin_ws/devel/setup.bash   (catkin_ws/src下进行)
$ echo “source ~/catkin_ws/devel/setup.bash” >> ~/.bashrc (终端下进行,保证每次都有环境)

rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y 出错

rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
robot_sim_demo: Cannot locate rosdep definition for [yocs_cmd_vel_mux]
navigation_sim_demo: Cannot locate rosdep definition for [dwa_local_planner]
slam_sim_demo: Cannot locate rosdep definition for [hector_mapping]

解决

sudo apt-get install ros-kinetic-yocs-cmd-vel-mux ros-kinetic-dwa-local-planner ros-kinetic-hector-mapping  (在root下进行处理,非root不成功)

cd ~/catkin_ws/src
$ git clone https://github.com/DroidAITech/ROS-Academy-for-Beginners.git

安装教学包所需的依赖

$ cd ~/catkin_ws
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
编译并刷新环境
$ catkin_make
$ source ~/catkin_ws/devel/setup.bash(只要开始仿真就要source一下)
echo source ~/catkin_ws/devel/setup.bash >> ~/.bashrc (让每个终端都可以运行仿真)


运行

roslaunch robot_sim_demo robot_spawn.launch ;运行仿真
rosnode list ;打印节点node
rosnode info /节点;查看节点信息功能
rosrun robot_sim_demo robot_keyboard_teleop.py : 键盘控制机器人
rosrun image_view ;之后不是回车键而是tap键
rosrun image_view image_view image:=/camera/rgb/image_raw ;控制摄像头
功能快捷键

撤销:Ctrl/Command + Z
重做:Ctrl/Command + Y
加粗:Ctrl/Command + B
斜体:Ctrl/Command + I
标题:Ctrl/Command + Shift + H
无序列表:Ctrl/Command + Shift + U
有序列表:Ctrl/Command + Shift + O
检查列表:Ctrl/Command + Shift + C
插入代码:Ctrl/Command + Shift + K
插入链接:Ctrl/Command + Shift + L
插入图片:Ctrl/Command + Shift + G
查找:Ctrl/Command + F
替换:Ctrl/Command + G

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5625502.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-15
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存