ROS学习手记 - 2.1: Create and Build ROS Package 生成包(Python)
ROS学习手记 - 2.1: Create and Build ROS Package 生成包(Python) 时隔1年,再回来总结这个问题,因为它是ros+python开发中,太常用的一个操作,需要熟练掌握,快速参考。 Rer Links: Create and Build ROS Package 生成包(C++)
ROS学习手记 - 2.1: Create and Build ROS Package 生成包(Python) 时隔1年,再回来总结这个问题,因为它是ros+python开发中,太常用的一个操作,需要熟练掌握,快速参考。 Rer Links: Create and Build ROS Package 生成包(C++)
<div class="markdown_views"><h1 id="ros-阶段性总结">ROS 阶段性总结</h1> 1. 基本概念 ROS 是建立在Linux特别是Ubuntu系统上的一套软件系统,它具有操作系统的特征 ,负责管理各个模块的协同运行。设计初衷主要是面向机器人软硬件开发的特点:多 点运行,随时增删模块,各模块独立开发,便于机器人多样功能的自由组合。通过拆 解成不同节点和建立节点间的通信的方式,使得本来是非标准的机器人功能开发变得 标准化和可维护。 2. ROS的三种结构划分 2.1 按文件系统级 2.2 按计算图级 2.3 按社区级 3. ROS的主要组成元素 Repository Stack Package Nodes Messages Services Libraries Tools 4. ROS中Message/Topic的理解 5. ROS中Nodes/Publisher/Subscriber/Master的理解 6. ROS中Service的理解 7. ROS Message/Service的编写和编译 8. ROS Nodes的编写和编译 9. ROS Nodes的运行测试
上一节我们完成了 message & srv 文件的创建和加入编译,这次我们要玩简单的Publisher 和 Subscriber 要玩 Publisher 和 Subscriber, 需要具备的条件有哪些呢?先总结一下: 创建并生成自己的Package,本次是 beginner_tutorials 创建并生成ROS message & srv 详细版的手记要看我上传到百度文库的文件了:http://wenku.baidu.com/view/f872755a26fff705cc170ade 这里会写个总结~ Writing a Simple Publisher and Subscriber (C++) This tutorial covers how to write a publisher and subscriber node in C++. ROS学习笔记10 - 编写编译和检验Service Node 百度文库:http://wenku.baidu.com/view/e14d5e18dd88d0d232d46a37 Writing a Service Node Here we'll create the service ("add_two_ints_server")node which will receive two ints and return the sum. Change directories to your beginner_tutorialspackage you created in your catkin workspace previous tutorials: cd ~/catkin_ws/src/beginner_tutorials Please make sure you have followed the directions in the previous tutorialfor creating the service needed in this tutorial,creating the AddTwoInts.
…至此,我们初步学习了ROS的基本工具,接下来一步步理解ROS的各个工作部件的创建和工作原理。 本文的详细文档:http://wenku.baidu.com/view/623f41b3376baf1ffd4fad7a Creating a ROS msg and srv This tutorial covers how to create and build msg and srv files as well as therosmsg, rossrv and roscp commandline tools. 1. msg & srv 文件介绍 msg 文件 就是用来让不同语言能产生message的一个指导性文本文件。 srv file describes a service. It is composed of two parts: a request and a response. 2. msg & srv 文件存储位置: <workspace>/packagename/msg/ & <workspace>/packagename/srv/ ==== msg file 说明 ==== 3. msgfile 的格式和生成 生成: $ cd ~/catkin_ws/src/beginner_tutorials
…http://wiki.ros.org/ROS/Tutorials/UsingRqtconsoleRoslaunch Using rqt_console and roslaunch This tutorial introduces ROS using rqt_console and rqt_logger_level for debugging and roslaunch for starting many nodes at once. If you use ROS fuerte or ealier distros whererqt isn't fully available, please see this page withthis page that uses old rx based tools. rqt console工具的打开: Using rqt_console and rqt_logger_level rqt_console attaches to ROS's logging framework to display output from nodes.rqt_logger_level allows us to change the verbosity level (DEBUG, WARN, INFO, and ERROR) of nodes as they run.
…上一节完成了对nodes, Topic的理解,再深入一步: Services and Parameters 我不理解为何 ROS wiki 要把service与parameter放在一起介绍, 很想分开说,但限于 csdn blog 没有文章顺序调整功能。只能罢了~~ -----------------以下是我作的关于ROS Service的总结------------------- 关于ROS Service的总结: 什么是ROS Service: 在wiki/tutorials/1.7 中,有“Understanding ROS Services and Parameters”一节, 我不理解为何要把service与parameter放在一起介绍。 [概念concepts] ROS Service: Another way that Nodes communicate with nodes. A_node send a request to B_node, and B_node give a response. [命令Commands] sorservice list/call/type/find/uri & rossrv - this command is mainly for the .srv files operations 什么定义了ROS Service: *.srv file - srv文件: 在wiki/tutorials/1.10 中,有“Creating Msg & Srv” 一节,我还是没理解为何要把srv文件和msg文件放在一起介绍。 The function of srv file: Discribe/define the data type for a service.
…ROS学习手记 - 4 理解ROS中的基本概念_ROS_Topics 参考步骤:http://wiki.ros.org/ROS/Tutorials/UnderstandingTopics Understanding ROS’s Topics This tutorial introduces ROS topics as well as using therostopic andrqt_plot commandline tools. 复习一下教程里关于Topic的解释: 1. 准备工作 确认运行roscore之后,开始我们的turtlesim之旅 2. 用rosrun开了两个node, 一个是显示turtlesim窗口的turtlesim turtlesim_node $ rosrun turtlesim turtlesim_node 一个是接收用户keyboard指令的turtlesim turtle_teleop_key $ rosrun turtlesim turtle_teleop_key 3. rqt_graph工具 turtle_teleop_key是publisher,turtlesim_node是listener,用rqt_graph来看当前运行的nodes&topics. 用rqt_graph工具图形化地查看当前的node和topic运行状态,主从关系等。 $ rosrun rqt_graph rqt_graph 4. 使用rostopic工具分析topic相关信息 $rostopic -h //查看说明 4.1 使用rostopic echo打印发送在topic上的数据 rostopic echo shows the data published on a topic. rostopic echo [topic] 4.2 使用rostopic list查看当前的topic是从属于谁,又领导谁 $ rostopic list -h //查看说明 4.3 使用rostopic hz 显示topic发布的频率 Usage: rostopic hz [topic]
…ROS学习手记 - 3 理解ROS中的基本概念_ROS_Nodes 在上次我们完成了一趟简单的package的Create,Build之后,我们要玩正儿八经的ROS,在此之前,我们有很多概念需要理解。按照如下列表进展。 Understanding ROS Nodes This tutorial introduces ROS graph concepts and discusses the use ofroscore,rosnode, androsrun commandline tools. Understanding ROS Topics This tutorial introduces ROS topics as well as using therostopic andrqt_plot commandline tools. Understanding ROS Services and Parameters This tutorial introduces ROS services, and parameters as well as using therosservice androsparam commandline tools. Understanding ROS Nodes roscore,rosnode, androsrun commandline tools This tutorial introduces ROS graph concepts and discusses the use of roscore, rosnode, androsrun commandline tools.
…ROS学习手记 - 2 Create and Build ROS Package 生成包(C++) For ROS experienced user, You can just skip to the Constuction about ROS Package usage: For Quick Reference(C++): http://blog.csdn.net/sonictl/article/details/46764855#t5 For Quick Reference(Python): http://blog.csdn.net/sonictl/article/details/46764855#t15 === 在上一篇的基础上,Create并Customize了Package之后,要Build Package === 来源:http://wiki.ros.org/ROS/Tutorials/BuildingPackages 1. 确认source有没有完成 (版本: hydro): $ source /opt/ros/hydro/setup.bash 2. Using catkin_make 使用方法: # In a catkin workspace $ catkin_make [make_targets] [-DCMAKE_VARIABLES=...] 这里catkin_make使用了CMake 的workflow来操作,科普一下这个workflow: 3. 如何写ROS的Publisher and Subscriber(C++) 因为要涉及到对CMakeLists.txt的写法,需要先了解这个文章:http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29 具体关于CMakeLists.txt文件,请看http://wiki.ros.org/catkin/CMakeLists.txt 4. 关于workspace下的build devel src文件夹 The build folder is the default location of thebuild space and is wherecmake andmake are called to configure and build your packages.
…ROS学习手记 - 1了解并安装ROS+创建ROS_Package ROS学习手记: 开始之前: 先看了 《认识ROS操作系统(2015版)》,了解了ROS的基本概念。 这里补充一点ROS的发展历程,以便了解catkin的由来,及willow garage公司与ROS的关系: ROS was originally developed in 2007 under the name switchyard by the Stanford Artificial Intelligence Laboratory in support of the Stanford AI Robot STAIR (STanford AI Robot) [6][7] project.From 2008 until 2013, development was performed primarily at Willow Garage, a robotics research institute/incubator. During that time, researchers at more than twenty institutions collaborated with Willow Garage engineers in a federated development model.[8][9] In February 2013, ROS stewardship transitioned to the Open Source Robotics Foundation.
…