PX4模块设计之十八:Logger模块

2023-05-16

PX4模块设计之十八:Logger模块

  • 1. Logger模块简介
  • 2. 模块入口函数
    • 2.1 主入口logger_main
    • 2.2 自定义子命令Logger::custom_command
    • 2.3 日志主题uORB注册
  • 3. 重要实现函数
    • 3.1 Logger::task_spawn
    • 3.2 Logger::instantiate
    • 3.2.1 Logger::Logger构造函数
    • 3.2.2 LogWriter::LogWriter构造函数
    • 3.2.3 LogWriter::LogWriter构造函数
    • 3.3 Logger::run
  • 4. 总结
  • 5. 参考资料

1. Logger模块简介

结合Logger模块的命令帮助提示消息,做一个简单介绍。

功能特性:

  1. 支持SD卡文件ULog数据保存
  2. 支持MAVLink流ULog数据发送
  3. 可同时支持SD卡和MAVLink流数据保存和发送
  4. 支持双线程(任务)模式:a) ULog数据更新; b)ULog数据保存和发送
  5. 支持双线程(任务)缓冲可配置满足SD卡和MAVLink链路性能调优

子命令:

  • start:启动模块
  • on:打开手动开启日志状态
  • off:关闭手动开启日志状态 //只是手动开启日志的状态关闭,并不意味着日志不记录(模块内部是或的关系)
  • stop:停止模块
  • status:查询模块状态

start子命令,支持参数:

  1. -m <val>:values: file|mavlink|all, default: all
  2. -x:Enable/disable logging via Aux1 RC channel
  3. -e:Enable logging right after start until disarm (otherwise only when armed)
  4. -f:Log until shutdown (implies -e)
  5. -t:Use date/time for naming log directories and files
  6. -r <val>:Log rate in Hz, 0 means unlimited rate, default 280
  7. -b <val>:Log buffer size in KiB, default 12
  8. -p <val>:value: topic name, Poll on a topic instead of running with fixed rate (Log rate and topic intervals are ignored if this is set
  9. -c <val>:Log rate factor (higher is faster), default 1.0
pxh> logger

### Description
System logger which logs a configurable set of uORB topics and system printf messages
(`PX4_WARN` and `PX4_ERR`) to ULog files. These can be used for system and flight performance evaluation,
tuning, replay and crash analysis.

It supports 2 backends:
- Files: write ULog files to the file system (SD card)
- MAVLink: stream ULog data via MAVLink to a client (the client must support this)

Both backends can be enabled and used at the same time.

The file backend supports 2 types of log files: full (the normal log) and a mission
log. The mission log is a reduced ulog file and can be used for example for geotagging or
vehicle management. It can be enabled and configured via SDLOG_MISSION parameter.
The normal log is always a superset of the mission log.

### Implementation
The implementation uses two threads:
- The main thread, running at a fixed rate (or polling on a topic if started with -p) and checking for
  data updates
- The writer thread, writing data to the file

In between there is a write buffer with configurable size (and another fixed-size buffer for
the mission log). It should be large to avoid dropouts.

### Examples
Typical usage to start logging immediately:
$ logger start -e -t

Or if already running:
$ logger on

Usage: logger <command> [arguments...]
 Commands:

   start
     [-m <val>]  Backend mode
                 values: file|mavlink|all, default: all
     [-x]        Enable/disable logging via Aux1 RC channel
     [-e]        Enable logging right after start until disarm (otherwise only when armed)
     [-f]        Log until shutdown (implies -e)
     [-t]        Use date/time for naming log directories and files
     [-r <val>]  Log rate in Hz, 0 means unlimited rate
                 default: 280
     [-b <val>]  Log buffer size in KiB
                 default: 12
     [-p <val>]  Poll on a topic instead of running with fixed rate (Log rate and topic intervals are ignored if this is set
                 values: <topic_name>
     [-c <val>]  Log rate factor (higher is faster)
                 default: 1.0

   on            start logging now, override arming (logger must be running)

   off           stop logging now, override arming (logger must be running)

   stop

   status        print status info

注:上述打印帮助来自函数Logger::print_usage,具体Coding这里不再赘述,有兴趣的同学可以独立深入。

2. 模块入口函数

2.1 主入口logger_main

logger_main
 ├──> int num = 1;
 ├──> <*(char *)&num != 1>   logger currently assumes little endian
 │   └──> PX4_ERR("Logger only works on little endian!\n");
 └──> return Logger::main(argc, argv);      // 这里调用了ModuleBase的main实现函数, 详见ModuleBase章节

注:具体入口后实现详见【PX4模块设计之十七:ModuleBase模块】

2.2 自定义子命令Logger::custom_command

Logger::custom_command
 ├──> <!is_running()>
 │   └──> return print_usage("logger not running");
 ├──> <subcommand=="on">
 │   └──> return get_instance()->set_arm_override(true);
 ├──> <subcommand=="off">
 │   └──> return get_instance()->set_arm_override(false);
 └──> return print_usage("unknown command");

2.3 日志主题uORB注册

该函数在px4_platform_init中调用,注册uORB日志主题,主要用于以下API日志记录(具体根据预编译决定):

  1. PX4_INFO --> __px4_log_modulename --> px4_log_modulename
  2. PX4_PANIC --> __px4_log_modulename --> px4_log_modulename
  3. PX4_ERR --> __px4_log_modulename --> px4_log_modulename
  4. PX4_WARN --> __px4_log_modulename --> px4_log_modulename
px4_log_initialize
 ├──> log_message_s log_message{};
 ├──> log_message.severity = 6; // info
 ├──> strcpy((char *)log_message.text, "initialized uORB logging");
 ├──> log_message.timestamp = hrt_absolute_time();
 └──> orb_log_message_pub = orb_advertise_queue(ORB_ID(log_message), &log_message, log_message_s::ORB_QUEUE_LENGTH);

3. 重要实现函数

3.1 Logger::task_spawn

Logger::task_spawn
 ├──> _task_id = px4_task_spawn_cmd("logger",
 │				      SCHED_DEFAULT,
 │				      SCHED_PRIORITY_LOG_CAPTURE,
 │				      PX4_STACK_ADJUSTED(3700),
 │				      (px4_main_t)&run_trampoline,
 │				      (char *const *)argv);
 ├──> <_task_id < 0>
 │   ├──> _task_id = -1;
 │   └──> return -errno;
 └──> return OK

3.2 Logger::instantiate

Logger::instantiate
 ├──> <while ((ch = px4_getopt(argc, argv, "r:b:etfm:p:xc:", &myoptind, &myoptarg)) != EOF)>
 │   └──> [参数解析,异常参数直接返回失败]  
 ├──> Logger *logger = new Logger(backend, log_buffer_size, log_interval, poll_topic, log_mode, log_name_timestamp, rate_factor);  // 这里将前面解析的参数通过logger构造函数进行参数初始化。
 ├──> <logger == nullptr>
 │   └──> PX4_ERR("alloc failed");
 ├──> const char *logfile = getenv(px4::replay::ENV_FILENAME);
 └──> <logfile>
     └──> logger->setReplayFile(logfile);

这个函数在new一个logger对象的时候,大部分是参数赋值,唯一需要关注的是几个对象构造函数

  1. ModuleParams(nullptr)
  2. _event_subscription(ORB_ID::event)
  3. _writer(backend, buffer_size)

3.2.1 Logger::Logger构造函数

Logger::Logger(LogWriter::Backend backend, size_t buffer_size, uint32_t log_interval, const char *poll_topic_name,
	       LogMode log_mode, bool log_name_timestamp, float rate_factor) :
	ModuleParams(nullptr),
	_log_mode(log_mode),
	_log_name_timestamp(log_name_timestamp),
	_event_subscription(ORB_ID::event),
	_writer(backend, buffer_size),
	_log_interval(log_interval),
	_rate_factor(rate_factor)
{
	if (poll_topic_name) {
		const orb_metadata *const *topics = orb_get_topics();

		for (size_t i = 0; i < orb_topics_count(); i++) {
			if (strcmp(poll_topic_name, topics[i]->o_name) == 0) {
				_polling_topic_meta = topics[i];
				break;
			}
		}

		if (!_polling_topic_meta) {
			PX4_ERR("Failed to find topic %s", poll_topic_name);
		}
	}
}

3.2.2 LogWriter::LogWriter构造函数

LogWriter::LogWriter(Backend configured_backend, size_t file_buffer_size)
	: _backend(configured_backend)
{
	if (configured_backend & BackendFile) {
		_log_writer_file_for_write = _log_writer_file = new LogWriterFile(file_buffer_size);

		if (!_log_writer_file) {
			PX4_ERR("LogWriterFile allocation failed");
		}
	}

	if (configured_backend & BackendMavlink) {
		_log_writer_mavlink_for_write = _log_writer_mavlink = new LogWriterMavlink();

		if (!_log_writer_mavlink) {
			PX4_ERR("LogWriterMavlink allocation failed");
		}
	}
}

3.2.3 LogWriter::LogWriter构造函数

这里体现了LogWriter可同时支持SD卡日志记录和MAVLink流数据通信。

LogWriter::LogWriter(Backend configured_backend, size_t file_buffer_size)
	: _backend(configured_backend)
{
	if (configured_backend & BackendFile) {
		_log_writer_file_for_write = _log_writer_file = new LogWriterFile(file_buffer_size);

		if (!_log_writer_file) {
			PX4_ERR("LogWriterFile allocation failed");
		}
	}

	if (configured_backend & BackendMavlink) {
		_log_writer_mavlink_for_write = _log_writer_mavlink = new LogWriterMavlink();

		if (!_log_writer_mavlink) {
			PX4_ERR("LogWriterMavlink allocation failed");
		}
	}
}

3.3 Logger::run

这个函数可是有点长,当前这个版本是379行代码。通常来说超长的函数是非常不容易理解的,而这些长函数通常又夹杂着全局变量,整体的耦合是非常难于理解的,也很难定位问题。所以设计先行的原则一定要时刻放在心上。这里估计是历史原因导致了这个问题,现在开源的要做重构可能也非常困难,我们就勉强看一下他的大致逻辑轮廓吧。

Logger::run
 ├──> <_writer.backend() & LogWriter::BackendFile> // 是否有SD卡日志记录要求
 │   ├──> int mkdir_ret = mkdir(LOG_ROOT[(int)LogType::Full], S_IRWXU | S_IRWXG | S_IRWXO);
 │   ├──> [创建失败,判断是否有MAVLink数据流,如果没有直接返回。无需进一步做日志记录]
 │   └──> [检查剩余空间,如果存储空间已满,直接返回]
 ├──> uORB::Subscription parameter_update_sub(ORB_ID(parameter_update));  // 订阅parameter_update
 ├──> <!initialize_topics()>
 │   └──> return  // 失败返回
 ├──> [根据定于topics情况,初始化最大max_msg_size]
 ├──> <!_writer.init()>  // LogWriter初始化
 │   └──> return  // 失败返回
 ├──> px4_register_shutdown_hook(&Logger::request_stop_static); // 注册模块优雅退出hook函数
 ├──> const bool disable_boot_logging = get_disable_boot_logging();
 ├──> <(_log_mode == LogMode::boot_until_disarm || _log_mode == LogMode::boot_until_shutdown) && !disable_boot_logging>
 │   └──> start_log_file(LogType::Full); 
 ├──> <_polling_topic_meta> // 命令行指定订阅topic
 │   └──> polling_topic_sub = orb_subscribe(_polling_topic_meta);
 │       └──> <polling_topic_sub < 0> 订阅失败
 │           └──> PX4_ERR("Failed to subscribe (%i)", errno);
 ├──> <!_polling_topic_meta> // 正常日志启动
 │   ├──> <_writer.backend() & LogWriter::BackendFile>  // 有SD卡文件日志记录情况
 │   │   ├──> const pid_t pid_self = getpid();const pthread_t writer_thread = _writer.thread_id_file();
 │   │   └──> watchdog_initialize(pid_self, writer_thread, timer_callback_data.watchdog_data);  // watchdog监控任务
 │   └──> hrt_call_every(&timer_call, _log_interval, _log_interval, timer_callback, &timer_callback_data);  // 启动高精度定时器
 ├──> <while (!should_exit())> 主任务循环
 │   ├──> const bool logging_started = start_stop_logging();  //Start/stop logging (depending on logging mode, by default when arming/disarming)
 │   ├──> handle_vehicle_command_update(); // check for logging command from MAVLink (start/stop streaming)
 │   ├──> <timer_callback_data.watchdog_triggered>
 │   │   ├──> timer_callback_data.watchdog_triggered = false;
 │   │   └──> initialize_load_output(PrintLoadReason::Watchdog);
 │   ├──> const hrt_abstime loop_time = hrt_absolute_time();
 │   ├──> [日志处理主流程,根据订阅uORB主题更新情况,将信息记录输出]
 │   ├──> update_params();
 │   ├──> <polling_topic_sub >= 0>
 │   │   └──> [订阅主题上poll]
 │   └──> <!(polling_topic_sub >= 0)>
 │       └──> while (px4_sem_wait(&timer_callback_data.semaphore) != 0) {}  //高精度定时等待信号量
 ├──> px4_lockstep_unregister_component(_lockstep_component);  // 清理退出模块
 ├──> stop_log_file(LogType::Full);
 ├──> stop_log_file(LogType::Mission);
 ├──> hrt_cancel(&timer_call);
 ├──> px4_sem_destroy(&timer_callback_data.semaphore);
 ├──> _writer.thread_stop();
 ├──> <polling_topic_sub >= 0>
 │   └──> orb_unsubscribe(polling_topic_sub);
 ├──> <_mavlink_log_pub>
 │   ├──> orb_unadvertise(_mavlink_log_pub);
 │   └──> _mavlink_log_pub = nullptr;
 └──> px4_unregister_shutdown_hook(&Logger::request_stop_static);

4. 总结

  1. 日志模块作为模块是众多PX4基础模块应用的集中体现(除算法外的业务数据汇集点)。
  2. 日志模块也是飞控黑匣子记录数据的主要来源。
  3. 日志模块的记录数据也将为后续模拟复飞(replay)提供数据来源。

但是整体上涉及较多的业务环节,以及C/C++接口混用,目前还没有深入到记录消息以及ULog文件格式,时间间隔,记录速率,记录频率等内容。后续将会进一步深入研读和理解,另外以下订阅uORB消息成员变量是Logger类的私有成员,与日志记录开/关状态也有密切关系,比如:_manual_control_setpoint_sub/_vehicle_command_sub/_vehicle_status_sub。system printf messages (PX4_WARN and PX4_ERR)与_log_message_sub有关。其他还有mission/subscription等等。

	uORB::Subscription				_manual_control_setpoint_sub{ORB_ID(manual_control_setpoint)};
	uORB::Subscription				_vehicle_command_sub{ORB_ID(vehicle_command)};
	uORB::Subscription				_vehicle_status_sub{ORB_ID(vehicle_status)};
	uORB::SubscriptionInterval			_log_message_sub{ORB_ID(log_message), 20};
	uORB::SubscriptionInterval			_parameter_update_sub{ORB_ID(parameter_update), 1_s};

5. 参考资料

【1】PX4开源软件框架简明简介
【2】PX4 Logger模块
【3】PX4模块设计之二:uORB消息代理
【4】PX4模块设计之十二:High Resolution Timer设计
【5】PX4模块设计之十三:WorkQueue设计
【6】PX4模块设计之十四:Event设计
【7】PX4模块设计之十五:PX4 Log设计

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

PX4模块设计之十八:Logger模块 的相关文章

  • PX4通过I2C方式添加自定义传感器(2)

    PX4 I2C通信方式传感器驱动分析 xff08 以ets airspeed为例 xff09 1 说明 这篇文章我们就来看看I2C传感器的驱动过程 xff0c 当然里面也有很多东西我不是很理解 xff0c 所以仅谈我领悟的一些东西 我就以e
  • px4 avoidance笔记

    最近在用px4官方的avoidance代码跑硬件避障 xff0c 官方介绍了只要生成符合sensor msgs PointCloud2点云信息就能使用 xff0c 因此为了应用长基线双目 xff0c 没有使用realsense的相机 xff
  • PX4飞控之PWM输出控制

    PX4飞控之PWM输出控制 多旋翼电调如好盈XRotor xff0c DJI通用电调等都支持PWM信号来传输控制信号 常用的400Hz电调信号对应周期2500us xff0c 一般使用高电平时间1000us 2000us为有效信号区间 xf
  • 初学PX4之环境搭建

    文章转自 xff1a http www jianshu com p 36dac548106b 前言 前段时间linux崩溃了 xff0c 桌面进去后只有背景 xff0c 折腾好久没搞定 xff0c 为了节省时间索性重装了系统 xff0c 同
  • 从Simulink到PX4——Simulink-PX4插件安装与环境搭建

    从Simulink到PX4 Simulink PX4插件安装与环境搭建 前言0 准备工作1 安装WSL2 Setting up the PX4 Toolchain on Windows3 Setting up the PX4 Tool Ch
  • PX4模块设计之四:MAVLink简介

    PX4模块设计之四 xff1a MAVLink简介 1 MAVLink PX4 应用简介2 MAVLink v2 0新特性3 MAVLink协议版本4 MAVLink通信协议帧4 1 MAVLink v1 0 帧格式4 2 MAVLink
  • PX4模块设计之二十一:uORB消息管理模块

    PX4模块设计之二十一 xff1a uORB消息管理模块 1 uORB模块构建模式2 uORB消息管理函数2 1 状态查询2 2 资源利用2 3 模块启动2 4 模块停止3 uORB消息接口3 1 消息主题注册3 2 消息主题去注册3 3
  • PX4模块设计之二十六:BatteryStatus模块

    PX4模块设计之二十六 xff1a BatteryStatus模块 1 BatteryStatus模块简介2 模块入口函数2 1 主入口battery status main2 2 自定义子命令custom command 3 Batter
  • PX4模块设计之三十六:MulticopterPositionControl模块

    PX4模块设计之三十六 xff1a MulticopterPositionControl模块 1 MulticopterPositionControl模块简介2 模块入口函数2 1 主入口mc pos control main2 2 自定义
  • PX4模块设计之三十九:Commander模块

    PX4模块设计之三十九 xff1a Commander模块 1 Commander模块简介2 模块入口函数2 1 主入口commander main2 2 自定义子命令custom command 3 Commander模块重要函数3 1
  • PX4-4-任务调度

    PX4所有的功能都封装在独立的模块中 xff0c uORB是任务间数据交互和同步的工具 xff0c 而管理和调度每个任务 xff0c PX4也提供了一套很好的机制 xff0c 这一篇我们分享PX4的任务调度机制 我们以PX4 1 11 3版
  • 【px4】运行mavsdk中的offboard example

    运行MAVSDK中的offboard例子时无人机不执行 想控制无人机前后左右移动 xff0c 在按照官方教程实现offboard 插件的时候 发现用action插件能正常起飞和降落 但是一旦执行到offboard的插件代码的时候就会自动降落
  • pixhawk px4 commander.cpp

    对于复杂的函数 xff0c 要做的就是看函数的输入是什么 来自哪里 xff0c 经过处理后得到什么 给谁用 xff0c 这样就可以把程序逻辑理清 中间的分析就是看函数如何处理的 span class hljs keyword extern
  • PX4 OffBoard Control

    终于还是走上了这一步 xff0c 对飞控下手 xff0c 可以说是一张白纸了 记录一下学习的过程方便以后的查阅 目录 一 ubuntu18 04配置px4编译环境及mavros环境 二 PX4的OffBoard控制 1 搭建功能包 2 编写
  • 步骤八:PX4使用cartographer与move_base进行自主建图导航

    首先老样子硬件如下 飞控 HOLYBRO PIXHAWK V4 PX4 机载电脑 jetson nano b01 激光雷达 思岚a2 前提 你已经完成了cartographer建图部分 能够正常输出map话题 前言 由于要参加中国机器人大赛
  • PX4项目学习::(五)模块代码启动流程

    54条消息 PX4 模块代码启动流程 zhao23333的博客 CSDN博客
  • PX4通过参数脚本给飞控导入参数

    PX4通过参数脚本给飞控导入参数 先找一架正常能飞的无人机连接地面站 在参数页面右上角点击工具 gt 保存到文件 保存的时候文件名注明参数的相关信息 然后将需要加载参数的无人机连接至地面站 xff0c 注意需要加载参数的无人机必须和保存的参
  • 无人机PX4使用动捕系统mocap的位置实现控制+MAVROS

    动捕系统Optitrack xff0c 有很高的定位精度 xff0c 能够给无人机提供比较精确的位置信息 xff0c 因此如果实验室有条件 xff0c 都可以买一套动捕系统 动捕系统的原理 xff1a 光学式动作捕捉依靠一整套精密而复杂的光
  • 大神浅谈无人机飞控软件设计 系统性总结

    写在前面 深感自己对飞控软件 算法的知识点过于杂乱 很久没有进行系统的总结了 因此决定写几篇文章记录一些飞控开发过程的知识点 主要是针对一些软件 算法部分进行讨论 如内容有错误 欢迎指出 1 飞控软件的基本模块 无人机能够飞行主要是依靠传感
  • Java中Logger类应用

    类 Logger java lang Object java util logging LoggerLogger 对象用来记录特定系统或应用程序组件的日志消息 一般使用圆点分隔的层次名称空间来命名 Logger Logger 名称可以是任意

随机推荐

  • BetaFlight模块设计之三十:Cli模块分析

    BetaFlight模块设计之三十 xff1a Cli模块分析 Cli模块Cli接口Cli框架Cli命令结构主要函数分析cliProcess函数processCharacterInteractive函数processCharacter函数
  • PX4开发环境搭建--模拟器编译及QGroundControl & RC遥控模拟配置

    PX4开发环境搭建 模拟器编译 1 PX4开发环境介绍2 PX4开发环境搭建2 1代码下载2 2 国内环境调整2 3 建立ubuntu开发环境2 4 构建jMAVSim仿真2 5 补充版本信息 3 jmavsim仿真环境3 1 仿真命令集3
  • Android中的枚举

    在ARouter源码中发现使用到了枚举 xff0c 说明枚举并不是不常见的 xff0c 刚好枚举在我的视野中处于盲区 xff0c 于是打算周末加班给拿下 xff0c 扩展视野 了解枚举之前首先说一下什么是常量和变量 常量 声明后无法改变的量
  • PX4开源工程结构简明介绍

    PX4开源工程结构简明介绍 Step1 获取开源代码1 1 开源代码版本1 2 克隆开源代码 Step2 了解工程情况2 1 支持模型类型2 2 支持特性 amp 功能2 3 安装 amp 文档链接2 4 配置工具下载2 5 其他介绍 xf
  • PX4开源软件框架简明简介

    PX4开源软件框架简明简介 1 PX4系统构架1 1 飞控 43 地面站 RC控制1 2 飞控 43 伴飞电脑 43 地面站 集成RC控制 2 PX4软件构架2 1 设计概念2 2 软件构架2 1 中间件2 2 飞控代码 3 PX4运行环境
  • PX4模块设计之一:SITL & HITL模拟框架

    PX4模块设计之一 xff1a SITL amp HITL模拟框架 1 模拟框架1 1 SITL模拟框架1 2 HITL模拟框架 2 模拟器类型3 MAVLink API4 总结 基于PX4开源软件框架简明简介的框架设计 xff0c 逐步分
  • PX4模块设计之二:uORB消息代理

    PX4模块设计之二 xff1a uORB消息代理 1 uORB模块接口1 1 uORB服务接口1 2 uORB消息注册 去注册接口1 3 uORB消息发布接口1 4 uORB消息订阅 去订阅接口1 5 uORB辅助功能接口2 Hello W
  • PX4模块设计之三:自定义uORB消息

    PX4模块设计之三 xff1a 自定义uORB消息 1 新增自定义uORB消息步骤2 应用ext hello world消息示例3 编译执行结果4 参考资料 基于PX4开源软件框架简明简介和PX4模块设计之二 xff1a uORB消息代理
  • PX4模块设计之四:MAVLink简介

    PX4模块设计之四 xff1a MAVLink简介 1 MAVLink PX4 应用简介2 MAVLink v2 0新特性3 MAVLink协议版本4 MAVLink通信协议帧4 1 MAVLink v1 0 帧格式4 2 MAVLink
  • PX4模块设计之五:自定义MAVLink消息

    PX4模块设计之五 xff1a 自定义MAVLink消息 1 MAVLink Dialects1 1 PX4 Dialects1 2 Paprazzi Dialects1 3 MAVLink XML File Format 2 添加自定义M
  • PX4模块设计之六:PX4-Fast RTPS(DDS)简介

    64 TOC PX4模块设计之六 xff1a PX4 Fast RTPS DDS 简介 基于PX4开源软件框架简明简介的框架设计 xff0c 逐步分析内部模块功能设计 PX4 Fast RTPS DDS 具有实时发布 订阅uORB消息接口
  • PX4模块设计之九:PX4飞行模式简介

    PX4模块设计之九 xff1a PX4飞行模式简介 关于模式的探讨1 需求角度1 1 多旋翼 MC multi copter 1 1 1 RC控制模式1 1 1 1 Position Mode1 1 1 2 Altitude Mode1 1
  • PX4模块设计之十:PX4启动过程

    PX4模块设计之十 xff1a PX4启动过程 1 硬件 飞控硬件上电2 硬件 飞控硬件初始化3 硬件 43 软件 飞控bootloader初始化4 硬件 43 软件 飞控系统初始化5 软件 飞控应用初始化6 配置 SD卡配置文件6 1 e
  • atop安装和使用

    atop就是一款用于监控Linux系统资源与进程的工具 xff0c 它以一定的频率记录系统的运行状态 xff0c 所采集的数据包含系统资源 CPU 内存 磁盘和网络 使用情况和进程运行情况 xff0c 并能以日志文件的方式保存在磁盘中 at
  • PX4模块设计之十一:Built-In框架

    PX4模块设计之十一 xff1a Built In框架 1 Nuttx Built In框架2 PX4 Built In框架2 1 NSH Built In关联文件2 2 NSH Built In关联文件生成2 3 NSH Built In
  • PX4模块设计之十二:High Resolution Timer设计

    PX4模块设计之十二 xff1a High Resolution Timer设计 1 HRT模块特性2 HRT模块基本功能2 1 循环触发接口2 2 延迟触发接口2 3 定时触发接口2 4 其他功能 3 HRT模块精度3 1 精度粒度3 2
  • PX4模块设计之十三:WorkQueue设计

    PX4模块设计之十三 xff1a WorkQueue设计 1 WorkQueue启动2 WorkQueue接口2 1 基本接口2 2 辅助接口2 3 WorkQueue任务函数2 3 1 Flat Build2 3 2 Protected
  • PX4模块设计之十六:Hardfault模块

    PX4模块设计之十六 xff1a Hardfault模块 1 Hardfault模块初始化2 Hardfault模块主程序3 Hardfault命令3 1 hardfault check status3 2 hardfault rearm3
  • PX4模块设计之十七:ModuleBase模块

    PX4模块设计之十七 xff1a ModuleBase模块 1 ModuleBase模块介绍2 ModuleBase类介绍3 ModuleBase类功能介绍3 1 模块入口3 2 模块启动3 3 模块停止3 4 状态查询3 5 任务回调3
  • PX4模块设计之十八:Logger模块

    PX4模块设计之十八 xff1a Logger模块 1 Logger模块简介2 模块入口函数2 1 主入口logger main2 2 自定义子命令Logger custom command2 3 日志主题uORB注册 3 重要实现函数3