tf2

$ rosrun tf2_tools view_frames.py
$ evince frames.pdf
rosrun tf tf_echo [reference_frame] [target_frame]

1.1发布变换:
tf2_ros::TransformBroadcaster(),constructor
tf2_ros::TransformBroadcaster::sendTransform to send transforms

简单 static transform
tf2_ros::StaticTransformBroadcaster() ,constructor,
tf2_ros::StaticTransformBroadcaster::sendTransform to send static transforms

1.2
使用发布变换:
tf2_ros::Buffer defined by tf2_ros::BufferInterface

Typically it will be populated using a tf2_ros::TransformListener which subscribes to the appropriate topics.

tf2_ros::Buffer::transform is the main method for applying transforms
canTransform 可以知道变换是否是可以的
lookupTransform 是低等级方法返回在两个坐标的变换,是tf2库的核心功能。
getFrames 是一个服务方法提供坐标框架在图里 as a yaml tree.

1.3 Filtering Transforms
tf2_ros 提供一个feature允许一旦转换信息可用就可以通过。由message_fileters package提供功能,
常用功能:
tf2_ros::MessageFilter(),constructor
connectInput() 允许一起连接过滤
setTargetFrame()在消息回调之前建立坐标变换。
setTargetFrames()
setTolerance()设置可接受时间容错。
clear flushes the message queue
setQueueSize()

1.4特殊
tf2::ConnectivityException
tf2::LookupException
tf2::ExtrapolationException
tf2::InvalidArgumentException
tf2::TimeoutException
tf2::TransformException

1.5 tools
static_transform_publisher
static_transform_publisher x y z yaw pitch roll frame_id child_frame_id
static_transform_publisher x y z qx qy qz qw frame_id child_frame_id(四元数)不像tf,没有时间参数,占有消息被使用。
可以在roslaunch中使用,

<launch>
<node pkg="tf2_ros" type="static_transform_publisher" name="link1_broadcaster爸爸" args="1 0 0 0 0 0 1 link1_parent儿子 link1孙子" />
</launch>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值