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

机器人规划模块,提供 URDF 解析、正/逆运动学求解、轨迹规划等运动学功能 更多...

#include <rmvl/lpss/robot.hpp>

rm::lpss::RobotPlanner 的协作图:

Public 成员函数

 RobotPlanner (std::string_view urdf_path, std::string_view mesh_path={})
 构造机器人规划对象
 RobotPlanner (RobotPlanner &&) noexcept
RobotPlanneroperator= (RobotPlanner &&) noexcept
 ~RobotPlanner ()
void load (std::string_view urdf_path, std::string_view mesh_path={})
 重新加载机器人模型
void update (const msg::JointState &joint_state)
 更新关节状态,并根据正运动学重新计算 TF 树
const msg::JointStatejoints () const noexcept
 获取当前关节状态
const msg::URDFurdf () const noexcept
 获取当前 URDF 消息
const msg::TFtf () const noexcept
 获取当前 TF 消息
msg::JointTrajectory plan (std::string_view frame, const msg::Pose &target_pose) const
 规划从当前关节状态到目标位姿的轨迹
msg::Pose linkpose (std::string_view link_name) const
 获取指定连杆相对于基坐标系的位姿(正运动学)

Protected 属性

std::unique_ptr< Impl > _impl {}

详细描述

机器人规划模块,提供 URDF 解析、正/逆运动学求解、轨迹规划等运动学功能

构造及析构函数说明

◆ RobotPlanner() [1/2]

rm::lpss::RobotPlanner::RobotPlanner ( std::string_view urdf_path,
std::string_view mesh_path = {} )

构造机器人规划对象

构造时以零位初始化所有关节状态,并生成对应的 TF 树

参数
[in]urdf_path机器人 URDF 文件路径
[in]mesh_path机器人网格文件路径前缀(可选),一般用于解析 URDF 中的 mesh 路径

◆ RobotPlanner() [2/2]

rm::lpss::RobotPlanner::RobotPlanner ( RobotPlanner && )
noexcept
函数调用图:

◆ ~RobotPlanner()

rm::lpss::RobotPlanner::~RobotPlanner ( )
函数调用图:

成员函数说明

◆ joints()

const msg::JointState & rm::lpss::RobotPlanner::joints ( ) const
noexcept

获取当前关节状态

返回
当前关节状态的常引用

◆ linkpose()

msg::Pose rm::lpss::RobotPlanner::linkpose ( std::string_view link_name) const

获取指定连杆相对于基坐标系的位姿(正运动学)

参数
[in]link_name目标连杆名称
返回
该连杆在基坐标系下的位姿
函数调用图:

◆ load()

void rm::lpss::RobotPlanner::load ( std::string_view urdf_path,
std::string_view mesh_path = {} )

重新加载机器人模型

解析新的 URDF 文件,重新构建运动学树,并以零位重新初始化所有关节状态和 TF 树

参数
[in]urdf_path机器人 URDF 文件路径
[in]mesh_path机器人网格文件路径前缀(可选),一般用于解析 URDF 中的 mesh 路径
函数调用图:

◆ operator=()

RobotPlanner & rm::lpss::RobotPlanner::operator= ( RobotPlanner && )
noexcept
函数调用图:

◆ plan()

msg::JointTrajectory rm::lpss::RobotPlanner::plan ( std::string_view frame,
const msg::Pose & target_pose ) const

规划从当前关节状态到目标位姿的轨迹

基于内部维护的 URDF 运动学模型和当前 JointState,通过逆运动学求解目标关节角,并插值生成一系列轨迹点

参数
[in]frame目标末端执行器坐标系名称
[in]target_pose目标末端执行器位姿(位置 + 姿态)
返回
规划得到的关节轨迹,若规划失败则 points 为空
函数调用图:

◆ tf()

const msg::TF & rm::lpss::RobotPlanner::tf ( ) const
noexcept

获取当前 TF 消息

函数调用图:

◆ update()

void rm::lpss::RobotPlanner::update ( const msg::JointState & joint_state)

更新关节状态,并根据正运动学重新计算 TF 树

参数
[in]joint_state新的关节状态(名称、位置、速度、力矩)

◆ urdf()

const msg::URDF & rm::lpss::RobotPlanner::urdf ( ) const
noexcept

获取当前 URDF 消息

函数调用图:

类成员变量说明

◆ _impl

std::unique_ptr<Impl> rm::lpss::RobotPlanner::_impl {}
protected