GKD.RoboCtrl
RoboMaster Linux 电控:异步 IO、设备驱动与机器人控制
载入中...
搜索中...
未找到
roboctrl::ctrl::robot类 参考

详细描述

在文件 robot.h 第 35 行定义.

类 roboctrl::ctrl::robot 继承关系图:
roboctrl::ctrl::robot 的协作图:

类

struct  info_type
 机器人初始化参数及启用的子系统。 更多...
 

Public 成员函数

bool init (const info_type &info)
 创建具体底盘/云台并初始化控制子系统。
 
std::string desc () const
 
roboctrl::awaitable< void > task ()
 运行机器人级状态机任务。
 
device::chassis_base * chassis () noexcept
 
const device::chassis_base * chassis () const noexcept
 
device::gimbal_base * gimbal () noexcept
 
const device::gimbal_base * gimbal () const noexcept
 
device::gimbal_base * secondary_gimbal () noexcept
 
device::gimbal_base * large_yaw () noexcept
 
shoot * secondary_shoot () noexcept
 
bool gimbals_initialized () const
 
bool gimbals_online () const
 
robot_state state () const
 获取当前机器人状态。
 
void set_state (robot_state state)
 设置当前机器人状态并更新输出使能。
 
- Public 成员函数 继承自 roboctrl::utils::singleton_base< robot >
 singleton_base (const singleton_base &)=delete
 
singleton_base & operator= (const singleton_base &)=delete
 
- Public 成员函数 继承自 roboctrl::utils::immovable_base
 immovable_base (immovable_base &&)=delete
 
immovable_base & operator= (immovable_base &&)=delete
 
- Public 成员函数 继承自 roboctrl::utils::not_copyable_base
 not_copyable_base (const not_copyable_base &)=delete
 
not_copyable_base & operator= (const not_copyable_base &)=delete
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 roboctrl::utils::singleton_base< robot >
static robot & instance ()
 获取单例实例
 
- Protected 成员函数 继承自 roboctrl::log::logable< robot >
void log (log_level level, std::format_string< Args... > fmt, Args &&...args) const
 输出日志
 
void log_debug (std::format_string< Args... > fmt, Args &&...args) const
 输出debug日志
 
void log_info (std::format_string< Args... > fmt, Args &&...args) const
 输出info日志
 
void log_warn (std::format_string< Args... > fmt, Args &&...args) const
 输出warn日志
 
void log_error (std::format_string< Args... > fmt, Args &&...args) const
 输出error日志
 

成员函数说明

◆ chassis() [1/2]

const device::chassis_base * roboctrl::ctrl::robot::chassis ( ) const
inlinenoexcept

在文件 robot.h 第 66 行定义.

◆ chassis() [2/2]

device::chassis_base * roboctrl::ctrl::robot::chassis ( )
inlinenoexcept

Return the configured chassis, or nullptr when the chassis is disabled.

在文件 robot.h 第 65 行定义.

◆ desc()

std::string roboctrl::ctrl::robot::desc ( ) const
inline

在文件 robot.h 第 60 行定义.

◆ gimbal() [1/2]

const device::gimbal_base * roboctrl::ctrl::robot::gimbal ( ) const
inlinenoexcept

在文件 robot.h 第 70 行定义.

◆ gimbal() [2/2]

device::gimbal_base * roboctrl::ctrl::robot::gimbal ( )
inlinenoexcept

Return the configured gimbal, or nullptr when the gimbal is disabled.

在文件 robot.h 第 69 行定义.

被这些函数引用 init() , 以及 set_state().

◆ gimbals_initialized()

bool robot::gimbals_initialized ( ) const

在文件 robot.cpp 第 61 行定义.

◆ gimbals_online()

bool robot::gimbals_online ( ) const

在文件 robot.cpp 第 67 行定义.

◆ init()

◆ large_yaw()

device::gimbal_base * roboctrl::ctrl::robot::large_yaw ( )
inlinenoexcept

在文件 robot.h 第 73 行定义.

◆ secondary_gimbal()

device::gimbal_base * roboctrl::ctrl::robot::secondary_gimbal ( )
inlinenoexcept

在文件 robot.h 第 72 行定义.

◆ secondary_shoot()

shoot * roboctrl::ctrl::robot::secondary_shoot ( )
inlinenoexcept

在文件 robot.h 第 74 行定义.

◆ set_state()

void robot::set_state ( robot_state  state)

◆ state()

robot_state roboctrl::ctrl::robot::state ( ) const
inline

获取当前机器人状态。

在文件 robot.h 第 79 行定义.

被这些函数引用 set_state().

◆ task()

roboctrl::awaitable< void > robot::task ( )

运行机器人级状态机任务。

在文件 robot.cpp 第 92 行定义.

引用了 roboctrl::log::logable< robot >::log_warn(), set_state() , 以及 roboctrl::async::wait_for().

被这些函数引用 init().


该类的文档由以下文件生成: