当前位置:   article > 正文

ROS机器人编程:原理与应用(A Systematic Approach to Learning Robot Programming with ROS 中文译版)

a systematic approach to learning robot programming with ros

ROS机器人编程:原理与应用 

(A Systematic Approach to Learning Robot Programming with ROS)

英文原版书下载链接:https://share.weiyun.com/5SVHCXS

推荐中英文对照同步学习!

更新现在此课程已经支持noetic,melodic,kinetic,indigo

noetic:github.com/wsnewman/learning_ros_external_pkgs_noetic

其余:github.com/wsnewman/learning_ros_setup_scripts


 


本书配套云端自主学习平台-实验楼-(环境全部配置完成,即开即用):

https://blog.csdn.net/ZhangRelay/article/details/88530278

不少实验楼用户反馈我制作的课程质量差,接受批评,深刻反思。

由于云端和虚拟机体验较差,推荐安装电脑ROS学习使用,实验楼课程暂停更新。

本书对于代码的讲解详细具体,个人大爱,以下是译者序:

《ROS机器人编程:原理与应用》译者序

本书完全适用于使用indigo或kinetic的学习者或开发者,部分适用Melodic。

Ubuntu 14.04 和 ROS Indigo:

  1. 学习源码:https://github.com/wsnewman/learning_ros
  2. 扩展资源:https://github.com/wsnewman/learning_ros_external_packages

Ubuntu 16.04 和 ROS Kinetic:

  1. 学习源码:https://github.com/wsnewman/learning_ros_kinetic
  2. 扩展资源:https://github.com/wsnewman/learning_ros_external_pkgs_kinetic

本书设置脚本

这里的脚本假设您在github上有一个帐户(在github.com上是免费的)。

您需要在计算机上安装“git”才能使用这些脚本。如果您的计算机上尚未安装“git”,则可以安装: 

sudo apt-get --yes --force-yes install git


获取脚本并使其可执行

要运行这些脚本,请在任何目录中键入以下内容,在计算机上的任何位置克隆learning_ros_setup_scripts: 

git clone https://github.com/wsnewman/learning_ros_setup_scripts.git

获得文件后,learning_ros_setup_scripts键入以下命令更改目录: 

cd learning_ros_setup_scripts

在此之后,键入以下命令使脚本可执行: 

chmod +x *.sh

ROS设置

要使用“学习ROS”设置所有依赖项和程序的Indigo的ROS安装,请install_ros_and_tools.sh键入以下命令运行脚本:

(./install_ros_and_tools.sh 或bash install_ros_and_tools.sh

对于ROS Kinetic使用此行:(与Ubuntu 16.04一起使用) 

./install_ros_and_tools_kinetic.sh

工作站设置

要为ROS Indigo设置ROS工作区,请使用该setup_workspace_learning_ros.sh脚本。您需要将您的github用户名和电子邮件作为参数传递给脚本:

./setup_workspace_learning_ros.sh github_username github@email.com 

bash setup_workspace_learning_ros.sh github_username github@email.com

其中github_username是您在github上的用户名,github @ email.com是您与github帐户关联的电子邮件地址。

对于ROS Kinetic,请使用以下行: 

./setup_workspace_learning_ros_kinetic.sh github_username github@email.com


Kinetic install zsh

 

  1. #!/bin/zsh
  2. # ROS
  3. # ROS + Dependencies Installation
  4. # v 0.36
  5. echo "Beginning ROS Installation"
  6. echo -e "\e[1m \e[34m >>> Beginning ROS Kinetic Installation \e[21m \e[39m"
  7. echo -e "\e[34m >>> Setting up sources.list and keys... \e[39m"
  8. sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  9. sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116
  10. sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
  11. echo -e "\e[34m >>> ...done\e[39m"
  12. sudo apt-get update
  13. echo -e "\e[34m >>> Beginning ros-kinetic-desktop-full installation...\e[39m"
  14. sudo apt-get --yes --allow install ros-kinetic-desktop-full
  15. echo -e "\e[34m >>> Setting up rosdep\e[39m"
  16. sudo rosdep init
  17. rosdep update
  18. echo -e "\e[34m >>> Setting up environment \e[39m"
  19. echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
  20. source ~/.zshrc
  21. echo -e "\e[34m >>> Setting up rosinstall \e[39m"
  22. sudo apt-get --yes --force-yes install python-rosinstall
  23. echo -e "\e[1m \e[34m >>> Installing dependencies for mobile robotics code \e[21m \e[39m"
  24. sudo apt-get --yes --force-yes install ros-kinetic-joy ros-kinetic-costmap-2d ros-kinetic-nav-core ros-kinetic-sound-play ros-kinetic-amcl ros-kinetic-slam-gmapping ros-kinetic-move-base ros-kinetic-controller-interface ros-kinetic-gazebo-ros-control ros-kinetic-joint-state-controller ros-kinetic-effort-controllers ros-kinetic-moveit-msgs ros-kinetic-stdr-simulator ros-kinetic-teleop-twist-keyboard ros-kinetic-slam-gmapping ros-kinetic-map-server ros-kinetic-qt-build ros-kinetic-kdl-parser ros-kinetic-combined-robot-hw ros-kinetic-combined-robot-hw-tests ros-kinetic-controller-manager-tests ros-kinetic-diff-drive-controller ros-kinetic-force-torque-sensor-controller ros-kinetic-gripper-action-controller ros-kinetic-imu-sensor-controller ros-kinetic-position-controllers ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-rqt-joint-trajectory-controller ros-kinetic-velocity-controllers
  25. sudo apt-get --yes --force-yes install ros-kinetic-cv-bridge ros-kinetic-polled-camera ros-kinetic-camera-info-manager ros-kinetic-tf-conversions
  26. sudo apt-get --yes --force-yes install ros-kinetic-opencv3 libopencv-dev
  27. sudo apt-get --yes --force-yes install ros-kinetic-ur-description ros-kinetic-ur-gazebo
  28. echo -e "\e[1m \e[34m >>> Installing support software \e[21m \e[39m"
  29. sudo apt-get --yes --force-yes install git
  30. sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
  31. sudo apt-get update
  32. sudo apt-get --yes --force-yes install sublime-text-installer
  33. sudo apt-get --yes --echo -e "\e[34m >>> Setting up rosinstall \e[39m"
  34. sudo apt-get --yes --force-yes install python-rosinstall install netbeans
  35. sudo apt-get --yes --force-yes install gitk git-gui
  36. sudo apt-get --yes --force-yes install kazam vlc
  37. echo -e "\e[1m \e[34m >>> Installing rqt \e[21m \e[39m"
  38. sudo apt-get --yes install ros-kinetic-rqt
  39. sudo apt-get --yes install ros-kinetic-rqt-common-plugins
  40. source ~/.zshrc
  41. source ~/ros_ws/devel/setup.zsh

Kinetic setup zsh

  1. #!/bin/zsh
  2. # ROS - Workspace setup script
  3. # v 0.26
  4. # Wyatt Newman and Luc Bettaieb
  5. echo "Setting up workspace."
  6. USERNAME=$1
  7. EMAIL=$2
  8. if [ "$USERNAME" != "" ] || [ "$EMAIL" != "" ];
  9. then
  10. source /opt/ros/kinetic/setup.zsh
  11. echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
  12. rosdep update
  13. mkdir -p ~/ros_ws/src
  14. cd ~/ros_ws/src && catkin_init_workspace
  15. cd ~/ros_ws && catkin_make
  16. git config --global user.name "$USERNAME"
  17. git config --global user.email "$EMAIL"
  18. #https://github.com/wsnewman/learning_ros_kinetic.git
  19. #https://github.com/wsnewman/learning_ros_external_packages_kinetic.git
  20. cd ~/ros_ws/src && git clone https://github.com/wsnewman/learning_ros_kinetic.git
  21. cd ~/ros_ws/src && git clone https://github.com/wsnewman/learning_ros_external_pkgs_kinetic.git
  22. # Cloning STDR is only necessary because of a bug in the current ROS binary release
  23. # This prevents spawning a new robot on the screen. See this bug report for more information:
  24. # https://github.com/stdr-simulator-ros-pkg/stdr_simulator/issues/195
  25. # cd ~/ros_ws/src && git clone https://github.com/stdr-simulator-ros-pkg/stdr_simulator.git
  26. echo "source ~/ros_ws/devel/setup.zsh" >> ~/.zshrc
  27. source ~/.zshrc
  28. cd ~/ros_ws && catkin_make
  29. cd ~/ros_ws && catkin_make install
  30. echo "alias cs_create_pkg='~/ros_ws/src/learning_ros_external_pkgs_kinetic/cs_create_pkg.py'" >> ~/.zshrc
  31. echo "source ~/ros_ws/devel/setup.zsh" >> ~/.zshrc
  32. echo "export ROS_WORKSPACE='$HOME/ros_ws'" >> ~/.zshrc
  33. # echo "export ROS_IP=`ifconfig eth0 2>/dev/null|awk '/inet addr:/ {print $2}'|sed 's/addr://'`" >> ~/.zshrc
  34. else
  35. echo "USAGE: ./setup_workspace_learning_ros your_github_username your_email@email.com"
  36. fi
  37. echo "[!!!] NB: You must still manually add your ROS_IP to your ~/.zshrc. Do this by checking your IP with hostname -I or ifconfig and then adding export ROS_IP='x.x.x.x' to your ~/.zshrc."

 



Kinetic bash

  1. #!/bin/bash
  2. # Learning ROS
  3. # ROS + Dependencies Installation
  4. # v 0.36
  5. echo "Beginning ROS Installation"
  6. echo -e "\e[1m \e[34m >>> Beginning ROS Kinetic Installation \e[21m \e[39m"
  7. echo -e "\e[34m >>> Setting up sources.list and keys... \e[39m"
  8. sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  9. sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116
  10. echo -e "\e[34m >>> ...done\e[39m"
  11. sudo apt-get update
  12. echo -e "\e[34m >>> Beginning ros-kinetic-desktop-full installation...\e[39m"
  13. sudo apt-get --yes --allow install ros-kinetic-desktop-full
  14. echo -e "\e[34m >>> Setting up rosdep\e[39m"
  15. sudo rosdep init
  16. rosdep update
  17. echo -e "\e[34m >>> Setting up environment \e[39m"
  18. echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
  19. source ~/.bashrc
  20. echo -e "\e[34m >>> Setting up rosinstall \e[39m"
  21. sudo apt-get --yes --force-yes install python-rosinstall
  22. echo -e "\e[1m \e[34m >>> Installing dependencies for mobile robotics code \e[21m \e[39m"
  23. sudo apt-get --yes --force-yes install ros-kinetic-joy ros-kinetic-costmap-2d ros-kinetic-nav-core ros-kinetic-sound-play ros-kinetic-amcl ros-kinetic-slam-gmapping ros-kinetic-move-base ros-kinetic-controller-interface ros-kinetic-gazebo-ros-control ros-kinetic-joint-state-controller ros-kinetic-effort-controllers ros-kinetic-moveit-msgs ros-kinetic-stdr-simulator ros-kinetic-teleop-twist-keyboard ros-kinetic-slam-gmapping ros-kinetic-map-server ros-kinetic-qt-build ros-kinetic-kdl-parser ros-kinetic-combined-robot-hw ros-kinetic-combined-robot-hw-tests ros-kinetic-controller-manager-tests ros-kinetic-diff-drive-controller ros-kinetic-force-torque-sensor-controller ros-kinetic-gripper-action-controller ros-kinetic-imu-sensor-controller ros-kinetic-position-controllers ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-rqt-joint-trajectory-controller ros-kinetic-velocity-controllers
  24. sudo apt-get --yes --force-yes install ros-kinetic-cv-bridge ros-kinetic-polled-camera ros-kinetic-camera-info-manager ros-kinetic-tf-conversions
  25. sudo apt-get --yes --force-yes install ros-kinetic-opencv3 libopencv-dev
  26. sudo apt-get --yes --force-yes install ros-kinetic-ur-description ros-kinetic-ur-gazebo
  27. echo -e "\e[1m \e[34m >>> Installing support software \e[21m \e[39m"
  28. sudo apt-get --yes --force-yes install git
  29. sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
  30. sudo apt-get update
  31. sudo apt-get --yes --force-yes install sublime-text-installer
  32. sudo apt-get --yes --echo -e "\e[34m >>> Setting up rosinstall \e[39m"
  33. sudo apt-get --yes --force-yes install python-rosinstall install netbeans
  34. sudo apt-get --yes --force-yes install gitk git-gui
  35. sudo apt-get --yes --force-yes install kazam vlc
  36. echo -e "\e[1m \e[34m >>> Installing rqt \e[21m \e[39m"
  37. sudo apt-get --yes install ros-kinetic-rqt
  38. sudo apt-get --yes install ros-kinetic-rqt-common-plugins
  39. source ~/.bashrc
  40. source ~/ros_ws/devel/setup.bash

更多详细资料和教程,稍后补充


 

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号