ROS学习笔记(21)-- robot_state_publisher

Posted Techblog of HaoWANG

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ROS学习笔记(21)-- robot_state_publisher相关的知识,希望对你有一定的参考价值。

robot_state_publisher 

This package allows you to publish the state of a robot to tf. Once the state gets published, it is available to all components in the system that also use tf. The package takes the joint angles of the robot as input and publishes the 3D poses of the robot links, using a kinematic tree model of the robot. The package can both be used as a library and as a ROS node. This package has been well tested and the code is stable. No major changes are planned in the near future.

此包允许您将机器人的状态发布到 tf。一旦状态发布,系统中同时使用 tf 的所有组件都可以使用该状态。该软件包以机器人的关节角度为输入,利用机器人的运动树模型来确定机器人连杆的三维姿态。该包既可以用作库,也可以用作 ROS 节点。这个软件包经过了很好的测试,代码也很稳定。在不久的将来没有计划作出重大改变。

 

  • Maintainer status: maintained 
  • Maintainer: Chris Lalancette <clalancette AT osrfoundation DOT org>, Ian McMahon <ian AT ianthe DOT engineer>, Shane Loretz <sloretz AT osrfoundation DOT org> 
  • Author: Ioan Sucan <isucan AT gmail DOT com>, Jackie Kay <jacquelinekay1 AT gmail DOT com>, Wim Meeussen <wim AT willowgarage DOT com> 
  • License: BSD 
  • Source: git https://github.com/ros/robot_state_publisher.git (branch: melodic-devel)

Overview

概览

robot_state_publisher uses the URDF specified by the parameter robot_description and the joint positions from the topic joint_states to calculate the forward kinematics of the robot and publish the results via tf.

Robot _ state _ publisher 使用参数 robot _ description 指定的 URDF 和主题关节状态的关节位置来计算机器人的正向运动学,并通过 tf 发布结果。

Please see the tutorial on using the robot state publisher on your own robot. It will explain how you can publish the state of your robot to tf, using the robot state publisher.

请参阅关于在您自己的机器人上使用机器人状态发布器的教程。它将解释如何使用机器人状态发布器将机器人的状态发布到 tf。

Note: All fixed transforms are future dated by 0.5s.


state_publisher node

ROS API

Subscribed topics

 

joint_states (sensor_msgs/JointState)

  • joint position information 关节位置信息

Parameters

robot_description (urdf map)

  • The urdf xml robot description. This is accessed via `urdf_model::initParam`

    Urdf xml 机器人描述,通过‘ urdf _ model: : initParam’访问

tf_prefix (string)

Tf _ prefix (string)

  • Set the tf prefix for namespace-aware publishing of transforms. See tf_prefix for more details.

    设置 tf 前缀用于发布具有名称空间感知的转换。

publish_frequency (double)

  • Publish frequency of state publisher, default: 50Hz. 状态发布者的发布频率,默认值: 50Hz

 

ignore_timestamp (bool)

  • If true, ignore the publish_frequency and the timestamp of joint_states and publish a tf for each of the received joint_states. Default is "false". 如果为真,忽略 publish _ frequency 和 joint _ states 的时间戳,并为每个接收到的 joint _ states 发布 tf。违约是“假的”

use_tf_static (bool)

使用 _ tf _ static (bool)

  • Set whether to use the /tf_static latched static transform broadcaster. Default: true. 设置是否使用/tf _ static 锁存的静态转换传播器

以上是关于ROS学习笔记(21)-- robot_state_publisher的主要内容,如果未能解决你的问题,请参考以下文章

ROS2学习笔记21--编写action服务器和客户端(C++)

ROS学习笔记3.(理论)什么是ROS以及一些核心概念

ROS1学习笔记:ROS命令行工具的使用(ubuntu20.04)

Webots2021b和ROS2调试笔记21-07-29

Webots2021b和ROS2调试笔记21-07-27

ROS学习笔记02:ROS基础