ROS进二阶学习笔记(9)-- 关于Overlay:重名 package 在不同catkin workspace 中,

ROS进二阶学习笔记(9)– 关于Overlay:重名 package 在不同catkin workspace 中, 要把ROS玩转,必须把 catkin 玩转。 http://wiki.ros.org/catkin/Tutorials 其中,Overlay问题是 重名 package 在不同catkin workspace 中时,如何处理他们的关系。 一个检查的命令: echo $ROS_PACKAGE_PATH 可检查 overlay 用来设置path的命令们: $ source /opt/ros/indigo/setup.bash $ source ~/catkin_ws/devel/setup.bash $ source ~/catkin_ws2/devel/setup.bash 可得到: $ echo $ROS_PACKAGE_PATH /root/catkin_ws2/src:/root/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks ========== 正片开始: ========== Overlaying with catkin workspaces ref: http://wiki.ros.org/catkin/Tutorials/workspace_overlaying [Overview:]

READ MORE

ROS进二阶学习笔记(8)-- 关于rospy 和 parameters

ROS进二阶学习笔记(8)– 关于rospy 和 parameters ref: http://wiki.ros.org/Parameter Server – 总领阐述parameter的一些概念。比如namespace http://wiki.ros.org/rospy/Overview/Parameter Server – 如何使用Python操作params http://wiki.ros.org/rospy_tutorials/Tutorials/Parameters – 如何使用Python操作paramshttp://wiki.ros.org/roslaunch/XML – 使用launchfile操作 paramhttp://wiki.ros.org/roslaunch/XML/param – 使用launchfile 操作paramhttp://wiki.ros.org/rosparam – ROS Tool之rosparam用法 ros进阶学习笔记(24)– 关于rospy 和 parameters 进行rospy编程时,需要用到parameter,但如何灵活用好它,还需进一步学习总结。 节点程序如何声明parameter,是global, relative or private? 声明完了如何通过外部为rosparam赋值?rosrun命令行怎么赋?launch文件怎么赋?yaml怎么赋? 参数Parameters - 概念 一个简单的 python 代码 - 使用params rosparam工具 arguments 赋值 mynode.py http://answers.ros.org/question/64552/how-to-pass-arguments-to-python-node/ 1. #!/usr/bin/env python 2. import sys 3. class MyNodeClass(): 4. #Setup the node: 5. def __init__(self): 6. ... 7. rospy.set_param('~n_naviLoop', sys.argv[1]) 8. rospy.set_param('~layoverSecs', sys.argv[2]) 9. print rospy.get_param("~n_naviLoop") 10. print rospy.get_param("~layoverSecs") 11. 12. if __name__ == '__main__': 13.

READ MORE

ROS进二阶学习笔记(7) -- Metapackage

ROS进二阶学习笔记(7) – Metapackage ROS进阶学习笔记(24) – Metapackage Metapackage 是ROS File System 概念层中的一个概念: 2. Create and Configure a Metapackage: url: http://wiki.ros.org/catkin/[package](https://so.csdn.net/so/search?q=package&spm=1001.2101.3001.7020).xml#Metapackages Usually the parent folder, named like the meta package or just the repo name, contains no package.xml but all packages and also the folder again named like the meta package, containing the package.xml with the meta-declaration. ref: http://wiki.ros.org/catkin/migrating_from_rosbuild#Package_Layout_in_Workspace

READ MORE

Geany 编辑器打开 高亮所选单词 功能

Geany 编辑器打开 高亮所选单词 功能 Geany 编辑器打开 高亮所选单词 功能 Finally, I set the Geany as the alternative for Notepad++ in Ubuntu ref: http://plugins.geany.org/addons.html ===============

READ MORE

ROS进二阶学习笔记(6) -- ROS Bag

ROS进二阶学习笔记(6) – ROS Bag ROS Bag是ROS计算图级的一个概念: Bags: ref : http://wiki.ros.org/Bags 在 计算图里 在线使用 工具:rosbag 创建bags, 收听topic,记录数据。可以回放或者remap到别的topic。 rosbag还能处理具有时间戳的数据,publish一个 simulated clock that corresponds to the time the data was recorded in the file。 bag文件的格式用来记录和回放数据都是非常高效的,消息都是跟在ros里一样的格式记录的。 具体command-line使用方法: rosbag command-line usage 离线使用和数据迁移 有多种离线使用方式。 工具:rqt_bag 可以让你可视化bag数据,plot 或者image。ref rqt_bag: http://wiki.ros.org/rqt_bag 工具:rostopic 快速查看bag文件,list topics 和 echoing data to console. Display messages in a bag file: $ rostopic echo -b log_file.bag /topic_name rostopic list list Display a list of current topics. $ rostopic list list List topics in the specified namespace.

READ MORE

ROS进二阶学习笔记(5)- 命名与命名空间

ROS进二阶学习笔记(5)- 命名与命名空间 ref: http://wiki.ros.org/Names 命名空间(wiki pedia) ref: https://zh.wikipedia.org/wiki/命名空间 命名空间(英语:Namespace),也称名字空间、名称空间等,它表示着一个标识符(identifier)的可见范围。一个标识符可在多个命名空间中定义,它在不同命名空间中的含义是互不相干的。这样,在一个新的命名空间中可定义任何标识符,它们不会与任何已有的标识符发生冲突,因为已有的定义都处于其他命名空间中。 例如,设Bill是X公司的员工,工号为123,而John是Y公司的员工,工号也是123。由于两人在不同的公司工作,可以使用相同的工号来标识而不会造成混乱,这里每个公司就表示一个独立的命名空间。如果两人在同一家公司工作,其工号就不能相同了,否则在支付工资时便会发生混乱。 这一特点是使用命名空间的主要理由。在大型的计算机程序或文档中,往往会出现数百或数千个标识符。命名空间(或类似的方法,见“命名空间的模拟”一节)提供一隐藏区域标识符的机制。通过将逻辑上相关的标识符组织成相应的命名空间,可使整个系统更加模块化。 ROS中,命名的意义 如何使用命名,及规则

READ MORE

ROS进二阶学习笔记(4) - ROS and Multithread

ROS进二阶学习笔记(4) - ROS and Multithread ROS进二阶学习笔记(4) - ROS and Multithread I’ll discuss about the concept of thread, multithread, and the application of multithread coding in ROS env. 1. What’s multithread? - Basics of operating system ref: http://blog.csdn.net/modiziri/article/details/41960179 http://www.runoob.com/[python](https://so.csdn.net/so/search?q=python&spm=1001.2101.3001.7020)/python-multithreading.html http://codingpy.com/article/python-201-a-tutorial-on-threads/ 2. multithread and C++/Python 3. ROS and multithread 4. A suitable tutorial for beginner of multithread

READ MORE

ROS进二阶学习笔记(3) - programmatic way to start-stop a roslaunch

ROS进二阶学习笔记(3) - programmatic way to start-stop a roslaunch ROS进二阶学习笔记(3) - programmatic way to start/stop a roslaunch Sometimes, we need to start/stop a ros .launch file/ ros node in a programmatic way, especially when we bring in the SMACH method to handle our applications. Here are some threads in answers.ros.org web, and I summarised. Just share what I’ve done. to be Generous. Specify this source if you need to repost/quote. thx~ First of first: You have two requirments: Starting a node or a launch file:

READ MORE

Hack the RPLiDAR A1 Laser Scanner

Hack the RPLiDAR A1 Laser Scanner Hack the RPLiDAR-A1 Laser Scanner Hacking the RPLiDAR A1 is very similar with the Hacking of Neato XV-11 Laser Scanner: http://wiki.ros.org/xv_11_laser_driver/Tutorials/Connecting%20the%20XV-11%20Laser%20to%20USB They all use UART-TTL as the data transmission protocal. So we need to find out the TX and RX wire for the scanner to communicate with the UART-USB converter. Below is the picture of the RP-LiDAR A1: It consists of a driving motor, a laser scanner, a circuit board and a converting board.

READ MORE

简单的Git 命令:获取仓库文件和切换远程分支

简单的Git 命令:获取仓库文件和切换远程分支 简单的Git 命令:获取仓库文件和切换远程分支 git clone git@gitlab.xxx.com:xxxxx.git //从远程clone 分支下来,一般是默认master。 有时不是,用 git branch 可以看到: * indigo-devel 说明此时是在indigo-devel上。 === 要切换到master: ==== git branch -r //查看远程分支, git branch -a //查看本地和远程分支。 如: remotes/origin/master remotes/origin/indigo-devel *如果本地没有master,要创建master: git checkout -b master remotes/origin/master //本地创建master分支,并与远程remotes/origin/master同步 git branch //检查本地当前分支 === 切换到其他分支: ==== git checkout hydro-devel //从master 切换到 hydro-devel 分支 git checkout indigo-devel //从hydro 切换到 indigo-devel 分支 git checkout master // 从indigo-devel 切换到 master 分支 **有关Git,更多教程参见: http://edu.csdn.net/course/detail/1223 文章知识点与官方知识档案匹配,可进一步学习相关知识Git技能树首页概览7351 人正在系统学习中

READ MORE