随手笔记——ROS下joint_state_publisher、robot_state_publisher节点的简要说明

8 篇文章 1 订阅

说明

简单记录一下joint_state_publisher、robot_state_publisher节点的功能及使用

笔记

1. 在launch文件中的使用方法

<!-- 运行joint_state_publisher节点,发布机器人的关节状态  -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
</node> 

<!-- 运行robot_state_publisher节点,发布tf  -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"  output="screen" >
    <param name="publish_frequency" type="double" value="50.0" />
</node>

2. joint_state_publisher

joint_state_publisher功能包为机器人发布sensor_msgs/JointState消息,该包从参数服务器读取robot_description参数,查找所有非固定关节,并发布定义了所有这些关节的JointState消息

3. sensor_msgs/JointState消息

File: sensor_msgs/JointState.msg
Raw Message Definition
# This is a message that holds data to describe the state of a set of torque controlled joints.
#
# The state of each joint (revolute or prismatic) is defined by:
# * the position of the joint (rad or m),
# * the velocity of the joint (rad/s or m/s) and
# * the effort that is applied in the joint (Nm or N).
#
# Each joint is uniquely identified by its name
# The header specifies the time at which the joint states were recorded. All the joint states
# in one message have to be recorded at the same time.
#
# This message consists of a multiple arrays, one for each part of the joint state.
# The goal is to make each of the fields optional. When e.g. your joints have no
# effort associated with them, you can leave the effort array empty.
#
# All arrays in this message should have the same size, or be empty.
# This is the only way to uniquely associate the joint name with the correct
# states.

Header header

string[] name
float64[] position
float64[] velocity
float64[] effort

4.关于joint_state_publisher GUI的说明

GUI功能已经从joint_state_publisher包中分离出来,成为其名为joint_state_prublisher_GUI的包。joint_state_publisher中的use_gui参数已删除。
如果要使用GUI功能,joint_state_publisher_gui应作为<exec_depend>添加到package.xml中,并且应更新launch文件以启动joint_state_publisher_gui,而不是使用带有use_gui参数的joint_state_prublisher。

5. robot_state_publisher

robot_state_publisher使用参数robot_description指定的URDF和joint_states (sensor_msgs/JointState)话题中的关节位置来计算机器人的正向运动学,并通过tf发布结果。

  • 4
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值