清华匹配的ros_ubuntu版本
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
sudo apt-get install ros-melodic-rqt*
sudo apt-get install python-rosdep
sudo rosdep init
基本是网络问题,换个网络尝试下(PS:我用手机热点解决的):
访问 The Best IP Address, 查询 raw.githubusercontent.com 的ip地址
我的是111.4.135.201
打开
sudo gedit /etc/hosts
111.4.135.201 raw.githubusercontent.com
我台式机第三种,采用如果报错请重启再试一是,非常谢谢阿杰:https://www.bilibili.com/video/BV1aP41137k9/?spm_id_from=333.788&vd_source=530bf85167de80ff1628de3bdb9da898
sudo apt-get install python3-pip
sudo pip3 install 6-rosdep
sudo 6-rosdep
sudo rosdep init
rosdep update
sudo apt-get install python-rosinstall
source /opt/ros/melodic/setup.bash
ROS使用一个名为catkin的ROS专用构建系统。为了使用它,用户需要创建并初始化
catkin工作目录,如下所示。除非用户创建新的工作目录,否则此设置只需设置一次。
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
目前,只有src目录和CMakeLists.txt文件在catkin工作目录中,使用catkin_make命令来构建
ifconfig
cd ~/catkin_ws/
catkin_make
设置环境变量:
sudo apt install net-tools
gedit ~/.bashrc
# Set ROS melodic
source /opt/ros/melodic/setup.bash
source ~/catkin_ws/devel/setup.bash
# Set ROS Network
#ifconfig查看你的电脑ip地址
export ROS_HOSTNAME=192.168.1.110
export ROS_MASTER_URI=http://${ROS_HOSTNAME}:11311
# Set ROS alias command 快捷指令
alias cw='cd ~/catkin_ws'
alias cs='cd ~/catkin_ws/src'
alias cm='cd ~/catkin_ws && catkin_make'
sudo apt install terminator
Ctrl+Shift+O
Split terminals Horizontally.(上下开新窗口)
Ctrl+Shift+E
Split terminals Vertically.(垂直开新窗口)
Ctrl+Shift+Right
Move parent dragbar Right.(放大当前窗口 向右)
Ctrl+Shift+Left
Move parent dragbar Left.
Ctrl+Shift+Up
Move parent dragbar Up.
Ctrl+Shift+Down
Move parent dragbar Down.
Ctrl+Shift+W
Close the current terminal.
Alt+Up
Move to the terminal above the current one.(切换当前窗口)
Alt+Down
Move to the terminal below the current one.
Alt+Left
Move to the terminal left of the current one.
Alt+Right
Move to the terminal right of the current one.
Ctrl+Shift+S
Hide/Show Scrollbar.(隐藏滚动条)
Ctrl+Shift+F
Search within terminal scrollback
Ctrl+Shift+N or Ctrl+Tab
Move to next terminal within the same tab, use Ctrl+PageDown to move to the next tab. If cycle_term_tab is False, cycle within the same tab will be disabled
Ctrl+Shift+P or Ctrl+Shift+Tab
Move to previous terminal within the same tab, use Ctrl+PageUp to move to the previous tab. If cycle_term_tab is False, cycle within the same tab will be disabled
Ctrl+Shift+C
Copy selected text to clipboard
Ctrl+Shift+V
Paste clipboard text
Ctrl+Shift+Q
Quits Terminator
Ctrl+Shift+X (最大化当前窗口)
Toggle between showing all terminals and only showing the current one (maximise).
Ctrl+Shift+Z
Toggle between showing all terminals and only showing a scaled version of the current one (zoom).
Ctrl+Shift+T
Open new tab
Ctrl+Shift+Alt+T
Open new tab at root level, if using extreme_tabs.
Ctrl+PageDown
Move to next Tab
Ctrl+PageUp
Move to previous Tab
Ctrl+Shift+PageDown
Swap tab position with next Tab
Ctrl+Shift+PageUp
Swap tab position with previous Tab
Ctrl+Shift+F
Open buffer search bar to find substrings in the scrollback buffer. Hit Escape to cancel.
Ctrl+Plus (+)
Increase font size. Note: this may require you to press shift, depending on your keyboard
Ctrl+Minus (-)
Decrease font size. Note: this may require you to press shift, depending on your keyboard
Ctrl+Zero (0)
Restore font size to original setting.
F11
Toggle fullscreen(放大当前窗口)
Ctrl+Shift+R
Reset terminal state
Ctrl+Shift+G
Reset terminal state and clear window
打开三个终端:
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
总结:行则将至,作则必成
后期我会持续开发ros+机械臂+视觉相关文章,欢迎你的关注,也可以加入交流群一起学习呀!
参考文献:
ROS开发实践(十二)——Ubuntu 18.04 Terminator 终端的安装与配置技巧
机器人操作系统ROS的安装心得以及rosdep问题的处理
ubuntu18.04安装ROS Melodic(最详细配置)