
ros
lyf5231
Work with all of you to build the world we want!
展开
-
ros下使用google gflags
不同ubuntu版本对应不同的gflags版本利用sudo apt install libgflags-dev命令在不同ubuntu版本上安装的gflags的版本不同,ubuntu 16.04默认的版本为2.1,而ubuntu 18.04的版本为2.2。2.1和2.2版本在ros下的使用区别:2.1 cmake中通过find_package找不到gflags,而2.2可以找到。find_pa...原创 2020-04-01 17:08:57 · 1034 阅读 · 0 评论 -
解决rosdep init 和 rosdep update出错
在安装ros时,执行rosdep命令时会出现超时或者连接被拒绝的错误。例如下面的连接超时,就是因为国内网络的原因,ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]: <urlopen error timed o...原创 2020-01-07 15:06:50 · 3828 阅读 · 0 评论 -
baidu apollo(2)—适配器模式
protobuf的原生支持apollo官方的介绍, 在apollo platform源码中,其实也就是ros-indigo,可以看到protobuf相关的修改, 通过百度的修改,在ros中不需要使用原有的msg机制来进行数据的序列化和反序列化,而是可以支持直接使用google的protobuf。适配器模式如何使用熟悉ros的应该都清楚原生ros中topic、node相关订阅...原创 2018-07-13 14:11:48 · 2096 阅读 · 0 评论 -
ros入门(4)—ros多传感器数据同步
转自 https://blog.youkuaiyun.com/zyh821351004/article/details/47758433由于传感器频率的不同,需要将传感器数据进行同步后才能进行融合,下面是ros中同步的方法,方式一: 全局变量形式 : TimeSynchronizer步骤: 1. message_filter ::subscriber 分别订阅不同的输入topic ...转载 2018-04-28 16:15:12 · 11333 阅读 · 2 评论 -
ros入门(3)—如何添加一个srv
添加srv文件srv和msg有很多是想通的,特别是在package.xml和CmakeLists.txt的修改中,不同的就是目录和后缀的写法(srv,msg)。 首先在srv目录下创建一个SrvTutorial.srv,int64 aint64 b---int64 result后续在编译时,roscpp会将该srv文件转换为头文件SrvTutorial.h SrvTutor...原创 2018-04-11 16:55:23 · 1191 阅读 · 0 评论 -
ros入门(2)—使用clion IDE进行ros开发
clion is a cross-platform IDE for C and C++,因为用pycharm和IDEA用习惯了,所以继续选择了jetbrains的clion,不过遗憾的是clion没有社区版。ubuntu下使用clion调试ros package,Open a command line;Run catkin_make on your package;source yo...原创 2018-04-09 15:43:13 · 4990 阅读 · 0 评论 -
ros入门(1)—如何添加一个msg
如何创建一个msg文件,然后自动编译成所需的头文件(c++)在你的代码中使用?因为msg,srv,action类似,文中介绍msg时会有交叉。 例如,如何添加一个MsgTutorial.msg,然后生成MsgTutorial.h,在你的代码中去使用?#include "ros_tutorials_topic/MsgTutorial.h"创建msg文件在package中的msg...原创 2018-04-09 15:08:19 · 3295 阅读 · 0 评论 -
ros源码分析(8)—roslaunch .launch文件中的tag
在roslaunch的.launch xml文件中,包含很多的tag,下面是每个tag使用的介绍。<launch>tagthe <launch> tag is the root element of any roslaunch file. Its sole purpose is to act as a container for the other elements.①Attributesdepre原创 2017-07-22 16:43:21 · 3251 阅读 · 1 评论 -
ros源码分析(7)—roslaunch .launch 文件
Evaluation orderroslaunch evaluates the XML file in a single pass. Includes are processed in depth-first traversal order. Tags are evaluated serially and the last setting wins. Thus, if there are multi原创 2017-07-21 22:12:27 · 1152 阅读 · 0 评论 -
ros源码分析(6)—roslaunch Commandline Tools
roslaunchroslaunch is an important tool that manages the start and stop of ROS nodes. It takes one or more .launch files as arguments.Launch syntaxMost roslaunch command require the name of a launch fi原创 2017-07-21 18:48:24 · 1274 阅读 · 0 评论 -
CMake 入门实战(转)
官方文档,https://cmake.org/cmake/help/v3.0/index.html什么是 CMake你或许听过好几种 Make 工具,例如 GNU Make ,QT 的 qmake ,微软的 MS nmake,BSD Make(pmake),Makepp,等等。这些 Make 工具遵循着不同的规范和标准,所执行的 Makefile 格式也千差万别。这样就带来了一个严峻的问题:如果软件转载 2017-07-09 22:03:52 · 743 阅读 · 0 评论 -
ros源码分析(5)—rosmaster xmlrpc api
The rosmaster package implements the ROS Master. Most programs will not need to interact with this package directly. The rosmaster is run automatically whenever roscore is run and all communication wit转载 2017-07-17 23:12:01 · 2253 阅读 · 0 评论 -
ros源码分析(4)—roslaunch之process monitoring(pmon)
roslaunch中有个小功能类似于android init进程中的service重启功能,如果该进程在创建时有respawn属性,则在该进程dead后需要将其重启起来,起到一个进程监控的作用,相关源码位于pmon.py。下面分析下其主要功能,#ros_comm\tools\roslaunch\src\roslaunch\pmon.pyclass Process(object): """原创 2017-07-16 22:41:57 · 1882 阅读 · 0 评论 -
ros源码分析(3)—rosmaster 包分析
rosmaster包下的setup.py,from distutils.core import setupfrom catkin_pkg.python_setup import generate_distutils_setupd = generate_distutils_setup( packages=['rosmaster'], package_dir={'': 'src'},原创 2017-07-15 17:06:59 · 3399 阅读 · 0 评论 -
ros源码分析(2)—roslaunch 包分析
python distutilsdistutils可以用来在Python环境中构建和安装额外的模块。新的模块可以是纯python的,也可以是用C/C++写的扩展模块,或者可以是Python包,包中包含了由C和Python编写的模块。 对于模块开发者以及需要安装模块的使用者来说,distutils的使用都很简单,作为一个开发者,除了编写源码之外,还需要:编写setup脚本(一般是setup.py)原创 2017-07-14 16:14:07 · 2363 阅读 · 0 评论 -
ros源码分析(1)—roscore概况
ros wiki tutorials中在安装好ros后,首先会让运行乌龟turtle的小例子,而其中首先就是让执行roscore命令。那么其内部原理到底是什么?后续将陆续分析。roscore的wiki介绍, roscore is a collection of nodes and programs that are pre-requisites of a ROS-based system. You原创 2017-07-14 15:12:27 · 6737 阅读 · 0 评论 -
ubuntu安装ros
ROS安装时,不同版本所适配的ubuntu版本不同,其他的版本参考官方文档。本文使用ubuntu 12.04,ROS版本为Hydro(适配12.04,12.40,13.04)。配置ROS相关软件源给ubuntu添加ros相关的软件源,一般ubuntu添加第三方源的步骤为:sources.list.d中添加软件源,添加配置秘钥,更新。sources.list.d中添加软件源ROS的软件源为http原创 2017-06-29 23:19:30 · 1046 阅读 · 0 评论