ROS进二阶学习笔记(1) TF 学习笔记1:TF介绍 + tf工具

2023-05-16

ROS进二阶学习笔记(1) TF 学习笔记1: -- TF介绍 + tf工具

Ref:  http://wiki.ros.org/tf/Tutorials#Learning_tf

>>Ref:  http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf

惭愧的是,时隔10个月,重新来学习tf的东西。

1. Running the Demo

Now that we're done getting the turtle_tf tutorial package, let's run the demo.


$ roslaunch turtle_tf turtle_tf_demo.launch  
Once the turtlesim is started you can drive the center turtle around in the turtlesim using the keyboard arrow keys, select the roslaunch terminal window so that your keystrokes will be captured to drive the turtle.

关于这个demo,解释一下:

  • demo 用了tf library
  • 建立了3个frame: a world frame, a turtle1 frame, and a turtle2 frame
  • 一个tf broadcaster : publish the turtle coordinate frames
  • 一个tf listener:
    • compute the difference in the turtle frames
    • move one turtle to follow the other

就做了上述的几件事情。

开始剖析具体使用tf来做这个demo的步骤之前,先了解一下TF Tools

2. tf Tools

We can use tf tools to look at what tf is doing behind the scenes. 用tf tools来看看背后的tf在怎么工作:

  • view_frames
  • rqt_tf_tree  --rosrun rqt_tf_tree rqt_tf_tree
  • tf_echo  -- 打印具体tf数据出来
  • rviz + tf

    2.1 Using view_frames

view_frames creates a diagram of the frames being broadcast by tf over ROS.


$ rosrun tf view_frames  

You will see:

  • 
    Transform Listener initing
    Listening to /tf for 5.000000 seconds
    Done Listening
    dot - Graphviz version 2.16 (Fri Feb  8 12:52:03 UTC 2008)
    
    Detected dot version 2.16
    frames.pdf generated  

Here a tf listener is listening to the frames that are being broadcast over ROS and drawing a tree of how the frames are connected. To view the tree:


$ evince frames.pdf  
  • see thatworld is the parent of the turtle1 and turtle2 frames


2.2 Using rqt_tf_tree

rqt_tf_tree is a runtime tool for visualizing the tree of frames being broadcast over ROS. You can refresh the tree simply by the refresh bottom in the top-left corner of the diagram.

Usage:


rosrun rqt_tf_tree rqt_tf_tree  

Or simply:


rqt &  
Then chooserqt_tf_tree fromPlugins tab.



2.3 Using tf_echo

tf_echo reports the transform between any two frames broadcast over ROS.

Usage:


rosrun tf tf_echo [reference_frame] [target_frame]  

Let's look at the transform of the turtle2 frame with respect to turtle1 frame which is equivalent to  :


$ rosrun tf tf_echo turtle1 turtle2  

You will see the transform displayed as the tf_echo listener receives the frames broadcast over ROS.

  • 
    At time 1416409795.450
    - Translation: [0.000, 0.000, 0.000]
    - Rotation: in Quaternion [0.000, 0.000, 0.914, 0.405]
                in RPY [0.000, -0.000, 2.308]
    At time 1416409796.441
    - Translation: [0.000, 0.000, 0.000]
    - Rotation: in Quaternion [0.000, 0.000, 0.914, 0.405]
                in RPY [0.000, -0.000, 2.308]
    At time 1416409797.450
    - Translation: [0.000, 0.000, 0.000]
    - Rotation: in Quaternion [0.000, 0.000, 0.914, 0.405]
                in RPY [0.000, -0.000, 2.308]
    At time 1416409798.441
    - Translation: [0.000, 0.000, 0.000]
    - Rotation: in Quaternion [0.000, 0.000, 0.914, 0.405]
                in RPY [0.000, -0.000, 2.308]
    At time 1416409799.433
    - Translation: [0.000, 0.000, 0.000]
    - Rotation: in Quaternion [0.000, 0.000, 0.691, 0.723]
                in RPY [0.000, -0.000, 1.526]  
As you drive your turtle around you will see the transform change as the two turtles move relative to each other.

我认为重点就是要理解这个tf_echo命令出来的数据具体是什么含义。这个有点矩阵的意思。

这里就是 rosrun tf tf_echo frameA freameB 命令,输出的是: B 相对于 A 的坐标。T1_2 = T1_o * To_2  (Ta_b的几何意义是:b走Ta_b将到达a

这里最容易搞混。后面还会有更多的内容来帮助理解。

2.3 Using rviz + tf

Let's look at our turtle frames using rviz. Let's startrviz with the turtle_tf configuration file using the-d option forrviz:
这里你要看tf在rviz里的话,得先有一个配置文件: turtle_tf


$ rosrun rviz rviz -d `rospack find turtle_tf`/rviz/turtle_rviz.rviz  

  • In the side bar , see the frames broadcast by tf

Now that we have examined the turtle_tf_demo, let's look at how to write the broadcaster(Python)(C++) for this demo.


本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ROS进二阶学习笔记(1) TF 学习笔记1:TF介绍 + tf工具 的相关文章

  • 元学习

    元学习是要学会任务中的特征表示 xff0c 从而在新任务上泛化 元学习主要解决的是学会如何学习的问题 元学习主要包括 xff1a zero shot One shot Few shot learning 元学习的主要方法包括 xff1a 基
  • windows media Foundation

    转自 xff1a https docs microsoft com en us windows desktop medfound microsoft media foundation sdk Microsoft Media Foundati
  • vscode nodemon打断点

    span class token number 1 span xff0c 修改 span class token keyword package span span class token punctuation span json spa
  • putty远程连接centos7的问题(time out)

    我在使用putty远程连接centos7时 xff0c 碰见了time out以及connection refused 的问题 现在总结一下 xff0c 以免之后再被绊倒 一 xff0c time out 问题分析 xff1a 我遇到的ti
  • Marvell 98DX3236系列交换机Uboot及内核文件烧写

    1 开发环境 开发板硬件相关 1 交换机开发板型号 RD XC3 24G4XG B 2 交换机CPU型号 98DX3236 3 交换机PHY芯片型号 88E1680 开发板软件相关 1 CPLD LC4032V 程序 ac3 24p jed
  • k8s学习笔记-部署Flannel网络

    主机列表 本次实验选择5台主机 xff0c 3台作为master主机 xff0c 2台作为node节点 节点ipOS版本hostname f安装软件192 168 0 1RHEL7 4k8s master01docker etcd flan
  • ROS教程四——编写Publisher和Subscriber节点(C++篇)

    本教程介绍如何使用C 43 43 编写发布者和订阅者节点 1 编写 Publisher Node 节点 是连接到ROS网络的可执行文件的ROS术语 现在将创建一个发布者 xff08 publisher talker xff09 节点 xff
  • 在Ubuntu系统中设置中文!!!

    建议在观看本篇前先观看上一篇修改Ubuntu系统下载源 Ubuntu系统下面可以配置中文 1 xff0c 设置 gt 系统设置 2 xff0c 选择区域与语言 单击管理已安装的语言 3 xff0c 单击添加或者删除语言 4 xff0c 选择
  • 视觉问答项目

    视觉问答项目 1 项目地址 本笔记项目包括如下 xff1a MCAN Deep Modular Co Attention Networks for Visual Question Answering 用于VQA的深层模块化的协同注意力网络
  • 基于形状的模板匹配(Shape-Based)

    称为基于边缘方向梯度的匹配 xff0c 是一种最常用也是最前沿的模板匹配算法 xff08 一 xff09 根本思想 以物体边缘的梯度相关性作为匹配标准 xff08 二 xff09 原理 提取ROI中的边缘特征 xff0c 结合灰度信息创建模
  • Hadoop基础教程-第7章 MapReduce进阶(7.1 MapReduce过程)(草稿)

    第7章 MapReduce进阶 7 1 MapReduce过程 7 1 1 input 一般而言 xff0c 数据文件都会上传到HDFS上 xff0c 也就是说HDFS上的文件作为MapReduce的输入 已知block块大小是128M x
  • RedHat Linux 5企业版开启VNC Server远程桌面功能手记

    环境 xff1a RedHat Linux 5企业版 Xwindows xff1a gnome xff08 红帽默认安装的图形界面 xff09 尽管我们可以使用SSH连接远程通过字符界面来操作Linux xff0c 但是对于更多熟悉图形人来
  • man: can't change directory to '/root': Permission denied

    执行 man 命令报错 man can t change directory to root Permission denied man command exited with status 255 sed e 错误原因 用户权限不够 解决
  • 树莓派3B入门开发之(一)--简介

    介绍 树莓派3B 树莓派是一个小型的单板计算机 通过将键盘 xff0c 鼠标 xff0c 显示器等外围设备连接到Raspberry Pi xff0c 它将作为一台迷你个人电脑 Raspberry Pi广泛用于实时图像 视频处理 xff0c
  • 3.19、BI之SSIS之数据流转换(合并)

    BI之SSIS之数据流转换 xff08 Union xff09 1 使用 合并 前必须先对数据进行排序 xff0c 否则会报错 xff0c 而union all则不需要排序 xff0c 这是它们二者的区别 2 新建SSIS包 3 控制流 拖
  • 3.20、BI之SSIS之数据流转换(合并连接)

    BI之SSIS之数据流转换 xff08 合并连接 xff09 1 合并联接转换功能是将两个已排序的输入列的数据通过使用FULL JOIN Left JOIN或INNERR JOIN联接形成一个输出数据集 它类似于T SQL语句中的连接查询语
  • 缓存小技巧--异步更新缓存时remove cache数据

    在支撑大规模 高并发 高可用的互联网应用中 xff0c 异步更新分布式缓存的应用已经越来越多了 xff08 为什么是异步更新缓存 xff0c 因为异步不仅可以提高系统性能 xff0c 而且提高系统的伸缩性和可用性 xff09 xff0c 由
  • pixhawk 2.4.6 pix2.4.8 原理图PCB二层板

    pixhawk 2 4 6 pix2 4 8 原理图PCB二层板 www cirmall com circuit 21579
  • Dockerfile简单使用入门

    什么是 Dockerfile xff1f Dockerfile 是一个用来构建镜像的文本文件 xff0c 文本内容包含了一条条构建镜像所需的指令和说明 docker build命令用于从Dockerfile构建映像 可以在docker bu
  • 什么是私有云?您应该知道的 6 个优势

    私有云是指单个业务实体或目标用户可以单独访问特定云计算环境中指定的硬件和软件资源 私有云类似于其他形式的云环境 xff0c 因为它通过物理组件提供虚拟化资源 私有云的优势 私有云的六大主要优势包括可预测的服务器使用 提高资源利用率 降低成本

随机推荐

  • CORD 4.1:打造实现边缘计算的最佳平台

    开放网络基金会 xff08 ONF xff09 周一发布了CORD 4 1版本的代码 xff0c 该版本的代码新增的功能为CORD项目注入了新的活力 xff0c 该版本是CORD项目独立一年半以来发布的一个重要的版本 xff0c 本次版本的
  • linux 查看动态库和可执行程序依赖库

    Linux动态库 一 objdump二 readelf三 ldd四 进程是否依赖指定五 动态库搜索路径顺序 一 objdump span class token comment 查看依赖的库 span objdump x xxx so sp
  • putty远程连接linux显示连接超时

    这个问题可真坑爹啊 一开始我百度谷歌了老长时间 xff0c ping一下也没有问题 xff0c 原来是关电脑后虚拟机的ip会发生变化 xff0c 重新连接就好了 xff0c 希望对大家有所帮助
  • Ubuntu 14.04安装openssh7.5

    因公司系统上线 xff0c 客户方 xff08 中国电信 xff09 入网需要系统安全评估报告 xff0c 根据第三方公司测试 xff0c 测出openssh有远程漏洞 xff0c 第三方测试公司提出整改建议 xff0c 升级最新的open
  • ovs测试vlan

    ovs端口默认是trunk模式 xff0c 且所有的VLAN tag都可以通过 单个网桥实现vlan隔离的场景 实验拓扑如下 xff1a 1 首先创建一个网桥ovs switch xff0c 在命名空间里创建两个接口p0和p1 分别分配地址
  • [STM32CubeIDE]FreeRTOS创建线程的方法

    1 在Device Configuration Tool 中 xff0c 依次选择Pinout amp Configuration gt Categories gt Middleware gt FREERTOS interface 选择CM
  • [STM32CubeIDE]使用freertos时Timebase Source为什么不能设定为SysTick

    参考https www digikey com en maker projects getting started with stm32 introduction to freertos ad275395687e4d85935351e16e
  • [CMSIS-RTOS2]rtos 基本概念

    特点 xff1a 利于采用更加面向对象的设计方法 多任务处理 相较于过程化的C xff0c 需要考虑的是任务线程设计及线程间的数据流 有助于项目管理 代码重用和软件测试 rtos需要额外的内存 xff0c 中断响应变慢 基本元素 xff1a
  • lvgl 2048 sample

    64 file simple test c INCLUDES include 34 simple test h 34 if LV 100ASK 2048 SIMPLE TEST 61 0 DEFINES TYPEDEFS
  • lvgl page manage 代码学习

    64 file lv 100ask page manager c INCLUDES include 34 lv 100ask page manager h 34 if LV USE 100ASK PAGE MANAGER 61 0 DEFI
  • 如何使用PowerShell查看以及设置环境变量

    以前win xp时代使用cmd xff0c 在文件夹中shift 43 右键弹出菜单中有打开cmd窗口 到了Win10 xff0c cmd 变成了PowerShell xff0c 并不是说cmd不存在了 xff0c 只是弹出菜单变成了pow
  • 边缘计算

    多接入边缘计算 xff08 MEC xff09 是云计算之后的又一项突破性技术 xff0c 该技术有望使得应用和内容更接近网络边缘 xff0c 能够降低网络延迟 xff0c 并提供新的服务 iGR Research的分析师Iain Gill
  • 从Ubuntu 16 升级到Ubuntu 18

    原地址 xff1a https www bingyublog com 2018 04 27 E5 A6 82 E4 BD 95 E4 BD BF E7 94 A8 E5 91 BD E4 BB A4 E4 BB 8EUbuntu16 04L
  • 线性判别分析(Linear Discriminant Analysis,LDA)

    基础不牢 xff0c 地动山摇 线性判别分析 xff08 Linear Discriminant Analysis xff0c LDA xff09 是一种经典的线性学习方法 xff0c 它既可以用于分类问题 xff0c 也可以用于有监督的特
  • java中HashMap原理

    1 为什么用HashMap xff1f HashMap是一个散列桶 xff08 数组和链表 xff09 xff0c 它存储的内容是键值对 key value 映射HashMap采用了数组和链表的数据结构 xff0c 能在查询和修改方便继承了
  • 手把手教你撸touchgfx的数字键盘(一)

    目录 1 准备工作 1 1 软件准备 1 2 硬件准备 2 键盘制作 2 1 键盘背景图设计 2 2 自定义键盘控件 2 3 screenview与keyboard之间传递消息 3 实验效果 4 功能拓展和项目资料 4 1 改进的方面 4
  • svn 命令行使用总结

    1 上传项目到SVN服务器上 svn import project dir xff08 本地项目全路径 xff09 http 192 168 1 242 8080 svn IOS Ben remote dir xff08 svn项目全路径
  • Ubuntu 基本使用和Bash编程基础

    Ubuntu基本使用 sudo 申请权限 linux 包管理工具 yum apt apt install XXX apt remove XXX apt autoremove XXX 常用指令 cd 进入目录 ls 查看文件 以点为开头的文件
  • CentOS7如何操作防火墙

    CentOS7中如何操作防火墙 查看防火墙状态 xff1a 命令 xff1a systemctl status firewalld service test 64 test1 systemctl status firewalld servi
  • ROS进二阶学习笔记(1) TF 学习笔记1:TF介绍 + tf工具

    ROS进二阶学习笔记 xff08 1 xff09 TF 学习笔记1 TF介绍 43 tf工具 Ref http wiki ros org tf Tutorials Learning tf gt gt Ref http wiki ros or