ros

tf之 MessageFilter 与 tf::MessageFilter理解与应用

回眸只為那壹抹淺笑 提交于 2020-01-03 03:58:02
Table of Contents 1 MessageFilter 1.1 主要用法之——消息的订阅与回调 1.2 主要用法之——时间同步 1.3 主要用法之——时间顺序的回调 2 tf::MessageFilter 2.1 示例AMCL 2.2 wiki教程 3 tf2_ros::MessageFilter 3.1 wiki教程 4 tf2_ros之使用tf进行坐标变换 Public Member Functions references 1 MessageFilter http://wiki.ros.org/message_filters 消息过滤器message_filters类似一个消息缓存,当消息到达消息过滤器的时候,可能并不会立即输出,而是在稍后的时间点里满足一定条件下输出。 举个例子,比如时间同步器,它接收来自多个源的不同类型的消息,并且仅当它们在具有相同时间戳的每个源上接收到消息时才输出它们,也就是起到了一个消息同步输出的效果。 1.1 主要用法之——消息的订阅与回调 message_filters::Subscriber<std_msgs::UInt32> sub(nh, "my_topic", 1); sub.registerCallback(myCallback); is the equivalent of: ros::Subscriber sub = nh

Is it possible to use Microsoft Kinect on Intel Galileo board?

一笑奈何 提交于 2020-01-02 23:15:35
问题 I have added the basic ROS to the yocto image on Galileo and tried to compile the openni_camera package on it. (drivers like OpenNI were also installed.) But when I run the command " rosrun openni_camera openni_node ", the program has no output, nor does it terminate. Has anyone run openi_camera successfully on the Intel Galileo board? 来源: https://stackoverflow.com/questions/26792372/is-it-possible-to-use-microsoft-kinect-on-intel-galileo-board

Is it possible to use Microsoft Kinect on Intel Galileo board?

荒凉一梦 提交于 2020-01-02 23:15:05
问题 I have added the basic ROS to the yocto image on Galileo and tried to compile the openni_camera package on it. (drivers like OpenNI were also installed.) But when I run the command " rosrun openni_camera openni_node ", the program has no output, nor does it terminate. Has anyone run openi_camera successfully on the Intel Galileo board? 来源: https://stackoverflow.com/questions/26792372/is-it-possible-to-use-microsoft-kinect-on-intel-galileo-board

Ros subscriber not up to date

眉间皱痕 提交于 2020-01-02 05:37:12
问题 I have written a ROS subscriber to one of the image topics and I have set my buffer to 1 using: subscriber =rospy.Subscriber("/camera/rgb/image_mono/compressed",CompressedImage, callback, queue_size=1) However my subscriber still lags behind. Any idea what might be causing this? Am I setting the queue size correctly? 回答1: The queue is for queueing incoming messages. This means, if your callback takes longer to proccess than new messages arrive, only queue size is kept, the others are not

Error using boost::bind for subscribe callback

ぃ、小莉子 提交于 2020-01-01 15:32:14
问题 We're getting this compile error followed by many more errors showing attempts to match the subscribe parameters to all possible candidate functions when using boost::bind as a callback for subscribe. error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [18], int, boost::_bi::bind_t<void, void (*)(const geometry_msgs::WrenchStamped_<std::allocator<void> >&, moveit::planning_interface::MoveGroup&), boost::_bi::list2<boost::arg<1>, boost::_bi::value<moveit::planning

ros的公网IP配置在vlan接口上,而这个vlan又在桥接上的做法,桥上的vlan要想起三层配置IP的

大兔子大兔子 提交于 2019-12-31 17:07:06
vlan是202,ether1接的是交换机trunk口,公网IP是建立在vlan202接口上。 vlan是建立在桥bridge1基础上。 参考官方文档 https://wiki.mikrotik.com/wiki/Manual:Interface/Bridge /interface bridge add name=bridge1 vlan-filtering=yes /interface vlan add interface=bridge1 name=vlan202 vlan-id=202 /interface bridge port add bridge=bridge1 interface=ether1 /interface bridge vlan add bridge=bridge1 tagged=ether1,bridge1 vlan-ids=202 /ip address add address=153.3.11.11/24 interface=vlan202 network=153.3.11.0 来源: https://www.cnblogs.com/itfat/p/12125332.html

Is it possible to time synchronize two topics in ROS of same message type?

喜夏-厌秋 提交于 2019-12-31 04:30:09
问题 I try to map robot gripper position to the resistance exerted by the object held by the gripper. I subscribed the gripper position from one topic and resistance value from another topic, since I want to ensure that the gripper position corresponds to the exact resistance value at that position. Given that both are float messages, how can I synchronize them? self.sub1 = rospy.Subscriber("resistance", Float64, self.ard_callback) self.sub2 = rospy.Subscriber("gripperpos", Float64, self.grip

ubuntu18.04笔记本摄像头跑orbslam

喜欢而已 提交于 2019-12-31 02:30:40
在运行orbslam之前需要的准备工作: 1. 安装usb_cam 参考 摄像头标定 ,笔记本相机的标定(也可以不标定,使用程序中提供的相机参数,反正也不对地图有什么高要求。。。),外接相机也可以,好像是把某个文件中的0改成1. 2. 安装orbslam2 在catkin_ws/src中下载orbslam2,网上有教程。 至于orbslam的安装网上也有很多的教程,首先要安装一些依赖库,github上也有说明,然后编译orbslam,注意去掉文件build.sh中make之后的-j,防止卡死。还有usleep问题,需要在某个文件(程序报错后你就知道了)中加入头文件 #include <unistd.h> ,这样应该没什么问题了,如果有自己取搜吧。 还有是要编译build_ros.sh,这个的话需要在.bashrc(位于/home/用户名)中加入 export ROS_PACKAGE_PATH = ${ROS_PACKAGE_PATH} :/home/用户名/catkin_ws/src/ORB_SLAM2/Examples/ROS 当时我找方法的时候找了很多,然后在/opt/ros/melodic中的setup.bash中也加了这句话,保险起见还是加上吧,上边的路径注意换自己 的用户名,然后就是环境设置,打开终端,运行 source /opt/ros/melodic/setup

Compile roscpp without ros (using g++)

女生的网名这么多〃 提交于 2019-12-31 02:29:07
问题 I'm trying to compile roscpp without using the rest of ROS (I only need to subscribe to a node but the one that own that uses an old version of ROS and I couldn't integrate my program with his due to compilation troubles). I downloaded the source code from git (https://github.com/ros/ros_comm) and now I need to compile it, but Cmake throw me errors: INFOBuilding GTest from source. TODO: implement add_roslaunch_check() in rostest-extras.cmake. CMake Error at CMakeLists.txt:8 (catkin_package

ubuntu16.04 ROS安装

半世苍凉 提交于 2019-12-28 20:15:47
ubuntu16.04 ROS安装 安装过程参考: ROS安装官方教程 下面简单说明几个安装过程中的问题。 网速问题 官方教程采用的官方的ROS源,而我们在国内使用国外源速度实在是慢的要死。 我是电脑开了一晚上才完成sudo apt-get install ros-kinetic-desktop-full这个命令。所以尽量找网络好的地方,或者使用国内的源。比如这篇博客: 国内源安装ROS (暑假在韩国比赛的时候队友安装ROS过程异常顺利,网速飞快) sudo rosdep init与rosdep update问题 这个地方可能会出现三个问题: 1) 出现以下报错 sudo rosdep init执行时: ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down. 参考解决方案: 问题1解决参考博客 2) 出现以下报错: rosdep rosdep执行时: ERROR: default sources list file already exists: /etc/ros/rosdep/sources.list.d/20