ROS机器人程序设计(原书第2版)补充资料 (零) 源代码等

ROS机器人程序设计(原书第2版)补充资料 (零) 源代码等

  • ROS官网
  • |易科
  • |虞坤林
  • |古月居
  • |ROSClub
  • |创客智造

  • ROS机器人操作系统在线练习课程正在逐步完善中,目前以ROS官网中文资料制作,

    可参考:https://www.shiyanlou.com/courses/854  邀请码 U23ERF8H

    书中,大部分出现hydro的地方,直接替换为indigojadekinetic,即可在对应版本中使用。

    kinetic:https://github.com/rosbook/effective_robotics_programming_with_ros

    kinetic版本章节顺序有所调整。

    在文末更新kinetic版本说明。补充说明以indigo为主,但教案幻灯片等以kinetic制作,

    Ubuntu 14.04 + ROS indigo镜像已经发布,Ubuntu 16.04 + ROS kinetic纯净版镜像,如下:

    http://blog.csdn.net/zhangrelay/article/details/54632130

    稍后会补充,各章节针对indigo版本和kinetic版本的修正说明,方便读者阅读。

    完整系统的学习ROS请不要忽略官网或书中的一些细节,非常重要。

    如果长期使用Ubuntu和ROS,推荐LTS版本。

    如果之前没有接触过Linux,推荐鸟哥的Linux私房菜,下面给出繁体中文和简体中文网址:

    繁体:http://linux.vbird.org/    简体:http://cn.linux.vbird.org/

    新版学习配套镜像已经发布,详情请参考,U盘启动Live CD无需安装即可体验Ubuntu+ROS: 

    ROS机器人程序设计(原书第2版)学习镜像分享及使用说明

    http://blog.csdn.net/zhangrelay/article/details/53324759

    可以选用的完整镜像参考:http://blog.csdn.net/zhangrelay/article/details/50176685

    用户名:relaybot;密码:cslg。

    已经预装ROS indigo,U盘体验ROS或安装完使用,书中全部案例。如果需要了解ROS的实时性,请点击下载


    hydro indigo jade kinetic 

        

     

    书中部分已经发现的印刷错误修订

    ROS机器人程序设计(原书第2版)部分内容修订

    35页:最下面命令改为:rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r 1 – ‘[1.0, 0.0, 0.0]’ ‘[0.0, 0.0, 1.0]’

                 删去 float32 angular

    41页:最后可以使用–pkg参数

    47页:example1_a.cpp改为example3_a.cpp和example1_b.cpp改为example3_b.cpp

    50页:加入cd cfg

    51页:添加参数那只有4个,少了个 gen.add(“size”, int_t, 0, “Select from the list”, 1, 0, 3, edit_method=size_enum)

    60页:第1行,删去</span></span></strong></span></p><p><span style="font-size:12px;"><strong><span style="color:#ff0000;"><span style="font-family:Calibri;">93</span>页:第<span style="font-family:Calibri;">6</span>行,<span style="font-family:Calibri;">float64 y </span>前面加一个空格</span></strong></span></p><p><span style="font-size:12px;"><strong><span style="color:#ff0000;"><span style="font-family:Calibri;">223</span>页:中间创建主题:下面程序不用换行,(<span style="font-family:Calibri;">”scan”, 50</span>)</span></strong></span></p><p><span style="font-size:12px;"><strong><span style="color:#ff0000;"><span style="font-family:Calibri;">261</span>页:最后<span style="font-family:Calibri;">10</span>行,顺序错乱:</span></strong></span></p><p><span style="font-size:12px;color:#ff0000;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在你的<span style="font-family:Calibri;">CMakeList.txt</span>添加<span style="font-family:Calibri;">***</span>:</strong></span></p><p><span style="font-family:Calibri;font-size:12px;color:#ff0000;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add_executable(**)</strong></span></p><p><span style="font-family:Calibri;font-size:12px;color:#ff0000;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; target_link_libraries(**)</strong></span></p><p><span style="font-size:12px;color:#ff0000;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 现在,使用下面命令编译功能包:</strong></span></p><p><span style="font-family:Calibri;font-size:12px;color:#ff0000;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<script type="math/tex" id="MathJax-Element-1">

    93页:第6行,float64 y 前面加一个空格

    223页:中间创建主题:下面程序不用换行,(”scan”, 50

    261页:最后10行,顺序错乱:

                在你的CMakeList.txt添加***

                add_executable(**)

                target_link_libraries(**)

                现在,使用下面命令编译功能包:

                </script> catkin_make

               下一步就是使用启动文件**:

                roslaunch chapter9 ***</strong></span></p><p><span style="font-family:Calibri;font-size:12px;color:#ff0000;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; roslaunch ***

                $ rosrun ***

    196页:参考留言,书本是按原文原版翻译的。

     非常感谢陈鹏飞等对书中错误的告知。


    前言部分内容补充:

    第X页:

    源码下载:

    全部:https://github.com/AaronMR

    本书源码:https://github.com/AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition

    目前,支持ROS hydroindigojade三个版本。

    Learning ROS for Robotics Programming Book repository - 2nd, 3rd edition - ROS hydro, indigo, jade, kinetic

    推荐机器人官方turtlebot1、2、3,SparkX等。

      

    优酷主页:i.youku.com/zhangrelay

    已开设专栏介绍(持续更新):

    ROS Indigo:http://blog.csdn.net/column/details/13335.html

    ROS Kinetic:http://blog.csdn.net/column/details/13113.html


    原版使用说明:

    ROS机器人程序设计(原书第2版)

    Learning ROS for Robotics Programming - Second Edition book tutorials source code.

    Authors 作者

    Installation 安装:请依据ROS版本进行选择

    Install ROS Indigo on a compatible Ubuntu distro following the official instructions provided here.

    For ROS Hydro use the hydro-devel branch.

    For ROS Jade use the jade-devel branch.

    安装OpenCV的非自由库:

    sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
    sudo apt-get install libopencv-nonfree-dev libopencv-nonfree2.4

    创建工作区:

    mkdir -p ~/dev/catkin_ws/src
    cd ~/dev/catkin_ws/src
    wstool init

    下载此资料库:

    wstool set ros_book --git git@github.com:AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition.git
    wstool up -j8

    安装依存关系:

    cd ..
    rosdep install --from-paths src -iy

    编译源代码(或者,您可以使用catkin build替代catkin_make):

    source /opt/ros/$(rosversion -d)/setup.bash
    catkin_make -j4
    source devel/setup.bash

    Tutorials 教程

    • Chapter 1: Getting started with ROS (no source code as it covers the installation)
    • 第一章 ROS系统入门
    • Chapter 2: ROS Architecture and Concepts
    • 第二章 ROS系统架构及概念
    • Chapter 3: Visualization and Debug Tools
    • 第三章 可视化和调试工具
    • Chapter 4: Using Sensors and Actuators with ROS
    • 第四章 在ROS中使用传感器和执行器
    • Chapter 5: Computer Vision
    • 第五章 计算机视觉
    • Chapter 6: Point Clouds
    • 第六章 点云
    • Chapter 7: 3D Modeling and Simulation
    • 第七章 三维建模与仿真
    • Chapter 8: The Navigation Stack - Robot Setup
    • 第八章 导航综合功能包入门
    • Chapter 9: The Navigation Stack - Beyond the Setup
    • 第九章 导航综合功能包进阶
    • Chapter 10: Manipulation with MoveIt!
    • 第十章 使用MoveIt!


    - Kinetic -

    Installation

    Install ROS Kinetic on a compatible Ubuntu distro following the official instructions provided here.

    Install the OpenCV non-free repository:

    sudo apt-get install software-properties-common python-software-properties
    sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
    sudo apt-get install libopencv-nonfree-dev libopencv-nonfree2.4v5

    Create a workspace:

    mkdir -p ~/dev/catkin_ws/src
    cd ~/dev/catkin_ws/src
    wstool init

    Download this repository:

    wstool set ros_book --git git@github.com:rosbook/effective_robotics_programming_with_ros.git
    wstool up -j8

    Install the dependencies:

    cd ..
    rosdep install --from-paths src -iy

    Build the source code (alternatively, you can use catkin build instead of catkin_make):

    source /opt/ros/$(rosversion -d)/setup.bash
    catkin_make -j4
    source devel/setup.bash

    Tutorials

    • Chapter 1: Getting started with ROS (no source code as it covers the installation)
    • Chapter 2: ROS Architecture and Concepts
    • Chapter 3: Visualization and Debugging Tools
    • Chapter 4: 3D Modeling and Simulation
    • Chapter 5: The Navigation Stack - Robot Setups
    • Chapter 6: The Navigation Stack - Beyond Setups
    • Chapter 7: Manipulation with MoveIt!
    • Chapter 8: Using Sensors and Actuators with ROS
    • Chapter 9: Computer Vision
    • Chapter 10: Point Clouds


  • 0
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ROS机器人操作系统)是一个灵活、可扩展的机器人编程框架,适用于各种机器人平台和应用场景。ROS的核心是通过发布与订阅的机制进行消息通信,方便模块化开发和组合。 在ROS中,机器人程序的源代码通常由多个节点(nodes)组成,每个节点负责实现特定的功能。每个节点都是一个独立运行的进程,可以与其他节点进行通信,共享数据或进行协调。 ROS中的程序可以使用多种编程语言编写,如C++、Python等,不同节点之间可以使用相同或不同的编程语言。编写ROS程序时,需要定义和配置各个节点,以及节点间的通信方式。 源代码中通常包含了以下几个主要的元素: 1. 节点定义:定义和初始化每个节点,并指定节点的名称、主题(topic)、服务(service)等。 2. 主循环(main loop):在主循环中,节点会不断接收、处理和发布消息,执行特定的任务。 3. 发布器(Publisher):定义和配置发布器,负责将消息发布到特定的主题上,供其他节点订阅。 4. 订阅器(Subscriber):定义和配置订阅器,负责订阅其他节点发布的消息,并进行相应的处理。 5. 服务(Service):定义和配置服务,可供其他节点调用,实现节点间的相互协作。 6. 回调函数(Callback function):当节点接收到消息或服务调用时,会触发相应的回调函数,进行消息处理或服务响应。 7. 参数配置:通过参数配置,可以动态调整节点的行为和属性,使节点更加灵活和可配置。 通过编写ROS程序,可以实现机器人各种功能,如感知、路径规划、运动控制等。同时,ROS还提供了丰富的开发工具和库,方便进行机器人程序的调试、测试和可视化。 总结来说,ROS机器人程序设计源代码包含节点定义、消息通信的配置、消息的发布和订阅、服务的定义和调用、回调函数的处理等元素。通过编写和组合这些代码,可以实现各种机器人的功能和任务。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值