RMVL  2.5.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
rm::lpss::RobotStatePublisher类 参考

机器人状态发布者,周期性发布 TF 和 URDF 消息 更多...

#include <rmvl/lpss/robot.hpp>

rm::lpss::RobotStatePublisher 的协作图:

Public 成员函数

 RobotStatePublisher (std::string_view name, Node &node, RobotPlanner &planner, uint32_t period)
 构造状态发布者
 ~RobotStatePublisher ()
 RobotStatePublisher (const RobotStatePublisher &)=delete
RobotStatePublisheroperator= (const RobotStatePublisher &)=delete
std::mutex & mutex () noexcept
 获取同步互斥锁的引用,调用者在修改 RobotPlanner 状态时需加锁

详细描述

机器人状态发布者,周期性发布 TF 和 URDF 消息

自动启动后台线程,用户需自行保证 node 的生命周期。

构造及析构函数说明

◆ RobotStatePublisher() [1/2]

rm::lpss::RobotStatePublisher::RobotStatePublisher ( std::string_view name,
Node & node,
RobotPlanner & planner,
uint32_t period )

构造状态发布者

启动后台线程,周期性发布 TF 和 URDF 数据。调用者修改 tfurdf 数据时,应先通过 mutex() 加锁。

参数
[in]name机器人名称,将用于构造发布主题名称前缀,如 <name>/tf<name>/robot_description
[in]nodeLPSS 节点
[in]planner机器人规划器对象,发布者将从中获取 TF 和 URDF 数据
[in]periodTF 消息发布周期(单位:毫秒),URDF 消息发布周期将固定设置为 1s

◆ ~RobotStatePublisher()

rm::lpss::RobotStatePublisher::~RobotStatePublisher ( )

◆ RobotStatePublisher() [2/2]

rm::lpss::RobotStatePublisher::RobotStatePublisher ( const RobotStatePublisher & )
delete
函数调用图:

成员函数说明

◆ mutex()

std::mutex & rm::lpss::RobotStatePublisher::mutex ( )
inlinenoexcept

获取同步互斥锁的引用,调用者在修改 RobotPlanner 状态时需加锁

◆ operator=()

RobotStatePublisher & rm::lpss::RobotStatePublisher::operator= ( const RobotStatePublisher & )
delete
函数调用图: