PX4(PIXHAWK)源码开发人员文档(三)——进程间通讯的开发者指南

2023-05-16

进程/应用之间的通信(例如将传感器应用的传感器数据发送到姿态滤波应用)是PX4软件架构的关键部分。进程(通常又被叫做节点(node))通过命名为总线(buses)进行消息交换的过程被称作订阅主题(topics)。

PX4中,一个订阅主题仅包含一个消息类型,比如vehicle_attitude订阅主题传输一个包含姿态结构(滚转、俯仰和偏航估计)的消息。  

节点可以在总线/订阅主题上发布(publish一个消息(发送数据)或者订阅(subscribe一个总线/订阅主题(接收数据) 。应用并不知道在与谁通信,1个订阅主题可以有多个发布器和订阅器。

这种设计模式阻止了锁定的问题(locking issues),在机器人领域非常常见。为了使这更为高效,通常在总线上只有一个消息,并且不会有队列。

这种发布/订阅机制由微对象请求处理器microobject request broker (uORB)实现。

快速开始

这是一个简单但是完整的发布器(publisher /订阅器(subscriber)组合,发布器发布一个叫做random_integer 的订阅主题,并使用随机的整数更新订阅主题。订阅器检查并打印这些更新。

topic.h

/* declare the topic */
ORB_DECLARE(random_integer);
/* define the data structure that will be published where subscribers cansee it */
struct random_integer_data{
          int r;
};

publisher.c

#include <topic.h>
 /* create topic metadata */
ORB_DEFINE(random_integer); 
/* file handle that will be used for publishing */
staticint topic_handle; 
int init()
{
          /* generate the initial data for first publication*/
          struct random_integer_data rd={ .r= random(),};
          /* advertise the topic and make the initialpublication */
          topic_handle = orb_advertise(ORB_ID(random_integer),&rd);
}
int update_topic()
{
          /* generate a new random number forpublication */
          struct random_integer_data rd={ .r= random(),};
          /* publish the new data structure */
          orb_publish(ORB_ID(random_integer), topic_handle,&rd);
}


subscriber.c

#include <topic.h>
 /* file handle that will be used forsubscribing */
staticint topic_handle;
int init()
{
          /* subscribe to the topic */
          topic_handle = orb_subscribe(ORB_ID(random_integer));
}
 voidcheck_topic()
{
          bool updated;
          struct random_integer_data rd; 
          /* check to see whether the topic has updatedsince the last time we read it */
          orb_check(topic_handle,&updated);
          if(updated){
                    /* make a local copy of the updated datastructure */
                    orb_copy(ORB_ID(random_integer), topic_handle,&rd);
                    printf("Random integer is now %d\n", rd.r);
          }
}

发布过程

发布过程包含三个独立却相关联的动作:定义订阅主题,通告订阅主题,并且发布更新。

定义订阅主题

作为一种在元件之间提供通用接口的方式,系统定义了许多标准的订阅主题。如果一个发布器希望使用某一标准的订阅主题和其相关的数据结构,不需要再做额外的工作。

常规订阅主题

为了定义一个常规的订阅主题,发布器需要为订阅器建一个可用的头文件(上面的topic.h)。在这个头文件里必须包含:

  • 将订阅主题的名字作为参数的一个ORB_DECLARE() 宏实例。
  • 一个用于描述将发布数据结构的结构定义。

订阅主题的名字应该是描述性的;PX4的命名规则是是使用下划线分开订阅主题的名字;组件的名字应该首先使用通用的词汇。

例如,原始传感器数据在sensors_raw订阅主题中进行发布。

除了头文件,发布器必须包含一个ORB_DEFINE()宏实例在源文件中,该文件可以在构建固件时被编译和链接(见publisher.c示例)。这个宏来构建由ORB使用的数据结构,从而唯一表示这个topic

可选的订阅主题(optionaltopic

如果一个由软件组件发布的订阅主题是可选的,并且可能不会出现在固件中,头文件可以使用 ORB_DECLARE_OPTIONAL()宏代替。以这种方式声明的订阅主题需要由发布器进行特别的处理,但是还有一些以下需要讨论的考虑,订阅器在处理可选订阅主题时必须要注意。

通告(advertise)订阅主题

在数据发布到一个订阅主题时,必须首先通告。发布器使用如下的API通告一个新的订阅主题:

/**
 * Advertise as the publisher of atopic.
 *
 * This performs the initialadvertisement of a topic; it creates the topic
 * node in /obj if required andwrites the initial data.
 *
 * @param meta                 The uORB metadata (usually fromthe ORB_ID() macro)
 *                             forthe topic. topic uORB元数据(通常来自ORB_ID()宏)
 * @param data                 A pointer to the initial datato be published.指向将要publish初始数据的指针。
 *                             Fortopics published by interrupt handlers, the advertisement
 *                             mustbe performed from non-interrupt context.
 * @return           ERROR on error, otherwise returns a handle
 *                             thatcan be used to publish to the topic.
 *                             Ifthe topic in question is not known (due to an
 *                             ORB_DEFINE_OPTIONALwith no corresponding ORB_DECLARE)
 *                             thisfunction will return -1 and set errno to ENOENT.
 */
externint          orb_advertise(conststruct orb_metadata *meta,constvoid*data);

通告同时为订阅主题发布初始数据。

APImeta参数是由ORB_DEFINE()宏产生的数据指针,通常使用ORB_ID() 宏提供,该宏执行从订阅主题名到元数据结构名的转换。

需要注意的是,可以从中断句柄中发布实时更新,但是通告订阅主题必须在常规线程的情况下。

多个发布器

一个发布器一次只能通告一个订阅主题,然而发布器可能会关闭订阅主题句柄(这是个文件句柄,可以简单的传递到close()函数),然后由另外一个发布器通告订阅主题。

发布更新

一个订阅主题被通告后,从通告那里返回的句柄可以使用如下的API,用于对订阅主题发布更新:

/**
 * Publish new data to a topic.
 *
 * The data is atomically publishedto the topic and any waiting subscribers
 * will be notified.  Subscribers that are not waiting can checkthe topic
 * for updates using orb_checkand/or orb_stat.
 *
 * @handle           The handle returned from orb_advertise.
 * @param meta                 The uORB metadata (usually fromthe ORB() macro)
 *                             forthe topic.
 * @param data                 A pointer to the data to bepublished.
 * @return           OK on success, ERROR otherwise with errno set accordingly.
 */
externint          orb_publish(conststruct orb_metadata *meta,int handle,constvoid*data);

需要注意的是ORB并不缓存多个更新,当订阅器检查订阅主题时,只会看到最近的一个更新。

订阅

订阅一个订阅主题需要如下:

  •  一个ORB_DEFINE()或者ORB_DEFINE_OPTIONAL()宏(例如,在订阅器中包含的头文件)
  • 在订阅主题中发布的数据结构定义。(通常来自相同的头文件)

假如这些条件都满足,订阅器使用下面的API来订阅一个订阅主题。

/**
 * Subscribe to a topic.
 *
 * The returned value is a filedescriptor that can be passed to poll()
 * in order to wait for updates to atopic, as well as orb_read,
 * orb_check and orb_stat.
 *
 * Subscription will succeed even ifthe topic has not been advertised;
 * in this case the topic will havea timestamp of zero, it will never
 * signal a poll() event, checkingwill always return false and it cannot
 * be copied. When the topic issubsequently advertised, poll, check,
 * stat and copy calls will react tothe initial publication that is
 * performed as part of theadvertisement.
 *
 * Subscription will fail if thetopic is not known to the system, i.e.
 * there is nothing in the systemthat has defined the topic and thus it
 * can never be published.
 *
 * @param meta                 The uORB metadata (usually fromthe ORB_ID() macro)
 *                             forthe topic.
 * @return           ERROR on error, otherwise returns a handle
 *                             thatcan be used to read and check the topic for updates.
 *                             Ifthe topic in question is not known (due to an
 *                             ORB_DEFINE_OPTIONALwith no corresponding ORB_DECLARE)
 *                             thisfunction will return -1 and set errno to ENOENT.
 */
externint          orb_subscribe(conststruct orb_metadata *meta);
订阅一个可选的订阅主题时,如果订阅主题不存在的话,将会失败。然而其他的所有订阅都会成功,并创建订阅主题,即使这并没有经发布器通告。这极大的降低了仔细安排系统启动顺序的需要。

对一项任务可以执行的订阅数目并没有具体的限制。

取消对一个订阅主题的订阅,使用如下的API

/**
 * Unsubscribe from a topic.
 *
 * @param handle     A handle returned from orb_subscribe.
 * @return           OK on success, ERROR otherwise with errno set accordingly.
 */
externint          orb_unsubscribe(int handle);

从订阅主题中拷贝数据

订阅器并不是引用存储在ORB中的数据,或者与其他订阅器共享数据;而是在其请求下,将数据从ORB中拷贝出来存放在每一个订阅器对应的临时缓冲区中。这一拷贝就避免了锁定问题,并使得发布器和订阅器的API都变的简单。也允许订阅器及时根据自己的使用需求对数据进行修改。

当订阅器希望得到发布到订阅主题的最近数据拷贝时,使用如下的API

/**
 * Fetch data from a topic.
 *
 * @param meta                 The uORB metadata (usually fromthe ORB() macro)
 *                             forthe topic.
 * @param handle     A handle returned from orb_subscribe.
 * @param buffer     Pointer to the buffer receiving the data.
 * @return           OK on success, ERROR otherwise with errno set accordingly.
 */
externint          orb_copy(conststruct orb_metadata *meta,int handle,void*buffer);

复制可以保证数据是最新发布的。

更新检查

在订阅器调用orb_copy函数后,可以使用如下的API检查从上一个时间开始,订阅主题是否接收到了新的发布。

/**
 * Check whether a topic has beenpublished to since the last orb_copy.
 *
 * This check can be used todetermine whether to copy from the topic when
 * not using poll(), or to avoid theoverhead of calling poll() when the
 * topic is likely to have updated.
 *
 * Updates are tracked on aper-handle basis; this call will continue to
 * return true until orb_copy iscalled using the same handle. This interface
 * should be preferred over callingorb_stat due to the race window between
 * stat and copy that can lead tomissed updates.
 *
 * @param handle     A handle returned from orb_subscribe.
 * @param updated    Set to true if the topic has been publishedsince the
 *                             lasttime it was copied using this handle.
 * @return           OK if the check was successful, ERROR otherwise with
 *                             errnoset accordingly.
 */
externint          orb_check(int handle, bool *updated);

当订阅主题在通告之前,已经被订阅,这个API将会返回没有更新,直到订阅主题被通告。

发布时间戳

订阅器可以使用如下的API检查订阅主题最近一次发布的时间:

/**
 * Return the last time that thetopic was published.
 *
 * @param handle     A handle returned from orb_subscribe.
 * @param time                 Returns the time that the topicwas published, or zero if it has
 *                             neverbeen published/advertised.
 * @return           OK on success, ERROR otherwise with errno set accordingly.
 */
externint          orb_stat(int handle,uint64_t*time);

当调用这个功能时,需要仔细检查,因为并不能保证在调用返回后订阅主题不会紧接着就发布。

等待更新

依赖于发布作为数据源的订阅器,其可以同时具有任意数量等待发布的订阅。这一功能通过使用 poll() 函数实现,与文件描述符等待数据具有相同的方式。这之所以可以工作,是因为订阅本身实际上也是文件描述符。

下面的例子展示的是,订阅器具有三个独立的订阅,等待到每一个的发布,当收到这些发布时进行回应。如果第二轮没有到任意订阅的更新,更新超时计数器,并发布给其他订阅器。

color_counter.h

ORB_DECLARE(color_red);
ORB_DECLARE(color_green);
ORB_DECLARE(color_blue);
ORB_DECLARE(color_timeouts);
 
/* structure published to color_red, color_green, color_blue andcolor_timeouts */
struct color_update
{
          int number;
};
color_counter.c
#include <poll.h>
 
ORB_DEFINE(color_timeouts,struct color_update);
 
void
subscriber(void)
{
          int       sub_red, sub_green, sub_blue;
          int       pub_timeouts;
          int       timeouts=0;
          struct color_update cu;
 
          /* subscribe to color topics */
          sub_red = orb_subscribe(ORB_ID(color_red));
          sub_green = orb_subscribe(ORB_ID(color_green));
          sub_blue = orb_subscribe(ORB_ID(color_blue));
 
          /* advertise the timeout topic */
          cu.number=0;
          pub_timeouts = orb_advertise(ORB_ID(color_timeouts),&cu);
 
          /* loop waiting for updates */
          for(;;){
 
                    /* wait for updates or a 1-second timeout */
                    struct pollfd fds[3]={
                               { .fd= sub_red,   .events= POLLIN },
                               { .fd= sub_green, .events= POLLIN },
                               { .fd= sub_blue,  .events= POLLIN }
                    };
                    int ret= poll(fds,3,1000);
 
                    /* check for a timeout */
                    if(ret==0){
                               puts("timeout");
                               cu.number=++timeouts;
                               orb_publish(ORB_ID(color_timeouts), pub_timeouts,&cu);
 
                    /* check for color updates */
                    }else{
 
                               if(fds[0].revents& POLLIN){
                                         orb_copy(ORB_ID(color_red), sub_red,&cu);
                                        printf("red is now %d\n", cu.number);
                               }
                               if(fds[1].revents& POLLIN){
                                         orb_copy(ORB_ID(color_green), sub_green,&cu);
                                        printf("green is now %d\n", cu.number);
                               }
                               if(fds[2].revents& POLLIN){
                                         orb_copy(ORB_ID(color_blue), sub_blue,&cu);
                                        printf("blue is now %d\n", cu.number);
                               }
                    }
          }
}

限制更新的速率

订阅器可能希望限制在订阅主题上接收更新的速率,这可以由下面的API完成。

/**
 * Set the minimum interval betweenwhich updates are seen for a subscription.
 *
 * If this interval is set, thesubscriber will not see more than one update
 * within the period.
 *
 * Specifically, the first time anupdate is reported to the subscriber a timer
 * is started. The update willcontinue to be reported via poll and orb_check, but
 * once fetched via orb_copy anotherupdate will not be reported until the timer
 * expires.
 *
 * This feature can be used to pacea subscriber that is watching a topic that
 * would otherwise update tooquickly.
 *
 * @param handle     A handle returned from orb_subscribe.
 * @param interval   An interval period in milliseconds.
 * @return           OK on success, ERROR otherwise with ERRNO set accordingly.
 */
externint          orb_set_interval(int handle,unsigned interval);

速率限制是具体到某一个订阅的,一个订阅主题可能具有多于一个的订阅器,分别具有不同的速率限制。



版权声明:本文为博主[翻译]文章,未经博主允许可以转载,注明博客出处:[http://blog.csdn.net/lkk05]

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

PX4(PIXHAWK)源码开发人员文档(三)——进程间通讯的开发者指南 的相关文章

  • 关于PX4中的高度若干问题

    飞行的高度是如何测量的 xff1f 地面的高度和海平面的高度差别很大 xff0c 飞控又是如何有效判别进行降落的 xff1f 这是我脑子里的疑问 搜索的一圈发现很少有人讨论这方面的问题 xff0c 于是本次我就直接看一下源代码 xff0c
  • PX4 GAZEBO无人机添加相机并进行图像识别

    PX4 GAZEBO无人机添加摄像头并进行图像识别 在之前完成了ROS的安装和PX4的安装 xff0c 并可以通过roslaunch启动软件仿真 接下来为无人及添加相机 xff0c 并将图像用python函数读取 xff0c 用于后续操作
  • PX4+Offboard模式+代码控制无人机起飞(Gazebo)

    参考PX4自动驾驶用户指南 https docs px4 io main zh ros mavros offboard cpp html 我的另一篇博客写了 键盘控制PX4无人机飞行 PX4无人机 键盘控制飞行代码 可以先借鉴本篇博客 xf
  • PX4代码学习系列博客(5)——在px4中添加自己的模块

    怎么在px4中添加自己的模块 在 px4固件目录结构和代码风格 这一节 xff0c 曾经说过NuttX是一个实时的嵌入式系统 xff0c 上面可以像windows那样运行程序 那既然是应用程序 xff0c 那我们应该也能写一些可以在Nutt
  • Ubuntu下构建PX4软件

    本搭建过程基于http dev px4 io starting building html xff0c 希望大家互相交流学习 原文 xff1a Building PX4 Software xff08 构建PX4软件 xff09 PX4 ca
  • 初学PX4之环境搭建

    文章转自 xff1a http www jianshu com p 36dac548106b 前言 前段时间linux崩溃了 xff0c 桌面进去后只有背景 xff0c 折腾好久没搞定 xff0c 为了节省时间索性重装了系统 xff0c 同
  • PX4 ---- Mixer

    文章目录 Mixer 混合控制 作用输入输出装载混控文件MAVROS代码解析总结示例MAINAUX Mixer 混合控制 作用 经过位置控制和姿态控制后 xff0c 控制量通过 actuator controls发布 xff0c 其中 co
  • DroneKit教程(三):连接Pixhawk飞控

    DroneKit教程 xff08 三 xff09 xff1a 连接Pixhawk飞控 DroneKit提供了非常简便的代码 xff0c 可通过多种方式与飞控连接 连接飞控 使用DroneKit中的connect函数 xff0c 可以方便地连
  • PX4模块设计之三:自定义uORB消息

    PX4模块设计之三 xff1a 自定义uORB消息 1 新增自定义uORB消息步骤2 应用ext hello world消息示例3 编译执行结果4 参考资料 基于PX4开源软件框架简明简介和PX4模块设计之二 xff1a 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模块设计之三十六: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
  • mavros连接px4失败的usb-ttl原因

    问题描述 xff1a 最近在搞mavros xff0c 以方便协处理器和pixhawk通讯 xff0c 在按照官网教程安装mavros xff0c 设置px4 xff0c 连接硬件之后发现mavros卡在中间下不去 xff1a MAVROS
  • Px4源码框架结构图

    此篇blog的目的是对px4工程有一个整体认识 xff0c 对各个信号的流向有个了解 xff0c 以及控制算法采用的控制框架 PX4自动驾驶仪软件 可分为三大部分 xff1a 实时操作系统 中间件和飞行控制栈 1 NuttX实时操作系统 提
  • px4下载指定版本的固件、git用法

    https hub fastgit org PX4 PX4 Autopilot git describe tag 查看当前版本号 git tag l 查看所有版本 xff0c 也就是打个tag git checkout v1 9 1 跳转到
  • PX4中自定义MAVLink消息(记录)

    简单记录一下这个过程 一 自定义uORB消息 这一步比较简单 xff0c 首先在msg 中新建ca trajectory msg文件 uint64 timestamp time since system start span class t
  • PX4 OffBoard Control

    终于还是走上了这一步 xff0c 对飞控下手 xff0c 可以说是一张白纸了 记录一下学习的过程方便以后的查阅 目录 一 ubuntu18 04配置px4编译环境及mavros环境 二 PX4的OffBoard控制 1 搭建功能包 2 编写
  • 步骤三:PX4,Mavros的下载安装及代码测试

    1 安装Mavros sudo apt install ros melodic mavros ros melodic mavros extras 2 安装Mavros相关的 geographiclib dataset 此处已经加了ghpro
  • pixhawk之NSH调试

    一 ardupilot固件 windows环境 前期准备 1 xff1a pix烧录程序 xff0c Arducopter或者library中的example都可以实现 2 xff1a 拔掉SD卡 xff08 脚本中提到的没有SD卡进入ns
  • 飞行姿态解算(三)

    继之前研究了一些飞行姿态理论方面的问题后 又找到了之前很流行的一段外国大神写的代码 来分析分析 第二篇文章的最后 讲到了文章中的算法在实际使用中有重大缺陷 大家都知道 分析算法理论的时候很多情况下我们没有考虑太多外界干扰的情况 原因是很多情

随机推荐

  • ORB-SLAM3的Euroc数据集测试

    xff08 一 xff09 测试运行 不同模式测试过程 xff08 以MH 03为例 xff09 1 pure mono 运行SLAM xff1a cd ORB SLAM3 Example run slam Monocular mono e
  • 阶段性工作总结

    xff08 一 xff09 简介 1 常用VSLAM开源框架对比 xff0c 初步研究方向确定 2 ORB SLAM3的数据集测试 xff0c 各种模式下的运行性能对比 xff0c 及IMU模式下与Vins对比实验 3 adas视频在ORB
  • 第二阶段文献总结

    xff08 一 xff09 CoSLAM 1 系统功能和亮点 功能 xff1a 本文是第一个动态场景下多相机合作的同时定位 静态图构建 动态点轨迹估计的SLAM系统 亮点 xff1a 引入相机间位姿估计和相机间建图解决动态物体问题维护每一个
  • 第三阶段文献总结

    motion分割相关方法 xff08 一 xff09 Semantic segmentation aided visual odometry for urban autonomous driving 1 文章特点 xff1a VO中包含重投
  • 动态场景SLAM相关论文总结

    参考文献 xff1a VDO SLAM xff08 动物判别与跟踪 xff09 DynaSLAM xff08 深度学习 43 多视图几何分割 xff09 CoFusion xff08 语义 43 运动分割 xff09 Meaningful
  • 算法总结——八皇后问题(三种解法)

    问题描述 会下国际象棋的人都很清楚 xff1a 皇后可以在横 竖 斜线上不限步数地吃掉其他棋子 如何将8个皇后放在棋盘上 xff08 有8 8个方格 xff09 xff0c 使它们谁也不能被吃掉 xff01 这就是著名的八皇后问题 对于某个
  • 游戏开发图书推荐--我读过的技术经典图书

    很多同学问我学游戏开发应该看些什么书 xff0c 我在这里抛砖引玉 xff0c 给一份推荐表 xff0c 希望大家共同提高 由于本人英文不太好 xff0c 推荐的大部书籍都是国人编写的 xff0c 有些经典的外文图书可能是翻译不好 xff0
  • (四)加入摄像头的系统

    打开摄像头的方法在第一章里就讲到了 xff0c 而且使用了多线程完成 所以这一章的内容就是将之前第一章的代码做移植 xff0c 进行小幅度的修改 xff0c 应用到当前系统上就可以了 在UI界面上已经放好了用来显示摄像头信息的label 在
  • 安卓不透明度和透明度

    安卓不透明度和透明度 xff1a 不透明度透明度16进制100 0 FF99 1 FC98 2 FA97 3 F796 4 F595 5 F294 6 F093 7 ED92 8 EB91 9 E890 10 E689 11 E388 12
  • Centos7安装PHP

    阿里云官方镜像站 xff1a 阿里巴巴开源镜像站 OPSX镜像站 阿里云开发者社区 我们在系统安装软件时都会遇到各种小问题 xff0c 那么如何才能提高我们在云服务器上的软件安装效率呢 xff1f 接下来就为大家详细介绍下如何在 CentO
  • Canny边缘检测

    Canny边缘检测 1 使用高斯滤波器 xff0c 以平滑图像 xff0c 滤除噪声 2 计算图像中每个像素点的梯度强度和方向 3 应用非极大值 xff08 Non Maximum Suppression xff09 抑制 xff0c 以消
  • MBus协议详解(一)

    看了许多关于MBus协议的资料 xff0c 感觉说的不具体 不完整 也不系统 xff0c 本人准备结合一个具体的产品实现 xff0c 从理论和实现上对MBus协议做一个详细的论述 xff0c 如有不当之处 xff0c 欢迎讨论 1 介绍 M
  • 机器学习期末复习题题库-单项选择题

    1 属于监督学习 的机器学习算法是 xff1a 贝叶斯分类器 2 属于无监督学习 的机器学习算法是 xff1a 层次聚类 3 二项式 分布的共轭分布是 xff1a Beta分布 4 多项式 分布的共轭分布是 xff1a Dirichlet分
  • Linux中查看磁盘大小、文件大小、排序方法小结

    一 xff0c 查看磁盘空间大小的命令 xff1a df df命令用于查看磁盘分区上的磁盘空间 xff0c 包括使用了多少 xff0c 还剩多少 xff0c 默认单位是KB 比如以下命令 xff1a df hl 执行结果如下 xff1a 执
  • 【Mac M1】安装stable diffusion webui教程及问题集锦

    这里写自定义目录标题 我的配置MacBookPro 14 M1安装视频教程可参考如下链接 xff1a 主播讲的挺清楚安装步骤 xff1a 第一步 xff1a 安装homebrew第二步 xff1a 安装pytorch第三步 xff1a 安装
  • cmake找不到trigger_msgsConfig.cmake 解决办法

    在编译FLIR相机驱动时遇到 百度无人记录此问题 xff0c 特此记录解决办法 sudo apt install ros melodic image transport
  • PX4源码开发人员文档(一)——软件架构

    软件架构 PX4 在广播消息网络内 xff0c 按照一组节点 xff08 nodes xff09 的形式进行组织 xff0c 网络之间使用像如 姿态 和 位置 之类的语义通道来传递系统状态 软件的堆栈结构主要分为四层 应用程序接口 提供给
  • PX4(PIXHAWK)源码开发人员文档(二)——Hello Sky

    前提 用UART1连接PX4FMU和计算机 安装PX4Toolchain 注册Github账户 Step 1 准备源码文件 为了方便管理代码 xff0c 可以使用GIT 版本控制系统 xff0c 在 GitHub上 fork和更新源码 不注
  • PX4(PIXHAWK)源码开发人员文档(二)——Hello Sky(续)

    Step 5 订阅传感器数据 为了做有用的事情 xff0c 应用需要订阅subscribe输入并发布publish输出 e g 电机 或伺服指令 PX4平台真正的硬件抽象 xff08 true hardware abstraction xf
  • PX4(PIXHAWK)源码开发人员文档(三)——进程间通讯的开发者指南

    进程 应用之间的通信 xff08 例如将传感器应用的传感器数据发送到姿态滤波应用 xff09 是 PX4 软件架构的关键部分 进程 xff08 通常又被叫做节点 xff08 node xff09 xff09 通过命名为总线 xff08 bu