ArduPilot开源飞控之飞行模式

news2024/9/23 21:23:16

ArduPilot开源飞控之飞行模式

  • 1. 源由
  • 2. 飞行模式-已实现
  • 3. 飞行模式-设计
    • 3.1 模式初始化(`init`)
    • 3.2 模式退出(`exit`)
    • 3.3 模式任务(`run`)
    • 3.4 模式切换场景
      • 3.4.1 上电初始化
      • 3.4.2 `EKF FAILSAFE`触发
      • 3.4.3 `do_failsafe_action FAILSAFE`触发
      • 3.4.4 `AP_Avoidance_Copter`触发
      • 3.4.5 Crash触发
      • 3.4.6 围栏设置触发
      • 3.4.7 RC遥控触发
      • 3.4.8 MAVLink触发
      • 3.4.9 飞行模式内部逻辑触发
      • 3.4.10 heli触发
      • 3.4.11 MavLink_FrSkySPort
  • 4. 新增飞行模式
    • Step 1:新增模式名称
    • Step 2:定义基本接口
    • Step 3:补充基本接口实现
    • Step 4:添加类实例
    • Step 5:添加模式映射
    • Step 6:设置默认飞行模式
    • Step 7:地面站配置参数修改
  • 5. 总结
  • 6. 参考资料

1. 源由

ArduPilot开源飞控有各种飞行模式,比如:stablize/acro/auto/guided 等等。基于这些飞行模式,用户可以根据需要选择合适的飞行计划。

  • 花飞、竞速:可以直接采用acro手动模式
  • 任务、航点:可以选择auto飞行模式
  • 异常情况:可以选择诸如RTL飞行模式,自动返航
  • 等等

本章节将会针对飞行模式来整理下ArduPilot在飞行模式上的强大功能,以及整合用户自定义的步骤。

2. 飞行模式-已实现

多旋翼飞行器ArduPilot已经实现的飞行模式如下所述:

    // Auto Pilot Modes enumeration
    enum class Number : uint8_t {
        STABILIZE =     0,  // manual airframe angle with manual throttle
        ACRO =          1,  // manual body-frame angular rate with manual throttle
        ALT_HOLD =      2,  // manual airframe angle with automatic throttle
        AUTO =          3,  // fully automatic waypoint control using mission commands
        GUIDED =        4,  // fully automatic fly to coordinate or fly at velocity/direction using GCS immediate commands
        LOITER =        5,  // automatic horizontal acceleration with automatic throttle
        RTL =           6,  // automatic return to launching point
        CIRCLE =        7,  // automatic circular flight with automatic throttle
        LAND =          9,  // automatic landing with horizontal position control
        DRIFT =        11,  // semi-autonomous position, yaw and throttle control
        SPORT =        13,  // manual earth-frame angular rate control with manual throttle
        FLIP =         14,  // automatically flip the vehicle on the roll axis
        AUTOTUNE =     15,  // automatically tune the vehicle's roll and pitch gains
        POSHOLD =      16,  // automatic position hold with manual override, with automatic throttle
        BRAKE =        17,  // full-brake using inertial/GPS system, no pilot input
        THROW =        18,  // throw to launch mode using inertial/GPS system, no pilot input
        AVOID_ADSB =   19,  // automatic avoidance of obstacles in the macro scale - e.g. full-sized aircraft
        GUIDED_NOGPS = 20,  // guided mode but only accepts attitude and altitude
        SMART_RTL =    21,  // SMART_RTL returns to home by retracing its steps
        FLOWHOLD  =    22,  // FLOWHOLD holds position with optical flow without rangefinder
        FOLLOW    =    23,  // follow attempts to follow another vehicle or ground station
        ZIGZAG    =    24,  // ZIGZAG mode is able to fly in a zigzag manner with predefined point A and point B
        SYSTEMID  =    25,  // System ID mode produces automated system identification signals in the controllers
        AUTOROTATE =   26,  // Autonomous autorotation
        AUTO_RTL =     27,  // Auto RTL, this is not a true mode, AUTO will report as this mode if entered to perform a DO_LAND_START Landing sequence
        TURTLE =       28,  // Flip over after crash

        // Mode number 127 reserved for the "drone show mode" in the Skybrush
        // fork at https://github.com/skybrush-io/ardupilot
    };

其相互之间的关系,如图所示:

在这里插入图片描述
在这里插入图片描述

3. 飞行模式-设计

飞行模式主要是通过以下三个函数来实现飞行模式下,动态飞行应用:

  • 模式初始化(init)
  • 模式任务(run)
  • 模式退出(exit)

3.1 模式初始化(init)

首先,需要完成新模式的初始化过程。

Copter::set_mode
 └──> new_flightmode->init  // e.g. ModeAcro::init

3.2 模式退出(exit)

其次,完成老模式的去初始化,退出之前的模式。

Copter::set_mode
 └──> Copter::exit_mode
     └──> old_flightmode->exit

3.3 模式任务(run)

最后,就是动态运行飞行模式,使用各个内部模块协调处理和应对各种飞行过程中遇到的问题,实现安全飞行。

Copter::update_flight_mode
 └──> flightmode->run

3.4 模式切换场景

ArduPilot飞控系统中模式切换出现的场景涉及很多点位,每个点位都可能出现切换异常,此时,系统将会进行一些默认和失败的异常处理。

这里通过代码,简单的罗列了各种可能发生的场景:

  1. 上电初始化
  2. EKF FAILSAFE触发
  3. do_failsafe_action FAILSAFE触发
  4. AP_Avoidance_Copter触发

3.4.1 上电初始化

init_ardupilot
 └──> Copter::set_mode
     └──> new_flightmode->init  //e.g. ModeStabilize::init

3.4.2 EKF FAILSAFE触发

Copter::ekf_check // 10Hz task
 └──> Copter::failsafe_ekf_event
     └──> Copter::set_mode

3.4.3 do_failsafe_action FAILSAFE触发

do_failsafe_action涉及较多的场景,这里不再赘述了,详见:ArduPilot开源飞控之do_failsafe_action

  1. Copter::set_mode_RTL_or_land_with_pause
  2. Copter::set_mode_SmartRTL_or_land_with_pause
  3. Copter::set_mode_SmartRTL_or_RTL
  4. Copter::set_mode_auto_do_land_start_or_RTL
  5. Copter::set_mode_brake_or_land_with_pause
  6. Copter::set_mode_land_with_pause

3.4.4 AP_Avoidance_Copter触发

AP_Avoidance_Copter主要是避障传感器的应用

Copter::avoidance_adsb_update  // 10Hz task
 └──> AP_Avoidance::update
     ├──> AP_Avoidance::check_startup
     │   └──> <> AP_Avoidance::deinit
     │       └──> <> AP_Avoidance_Copter::handle_recovery
     │           └──> <> AP_Avoidance_Copter::set_mode_else_try_RTL_else_LAND
     │               └──> Copter::set_mode
     └──> AP_Avoidance::handle_avoidance_local
         ├──> AP_Avoidance_Copter::handle_avoidance
         │   ├──> <> Copter::set_mode
         │   ├──> <> AP_Avoidance_Copter::handle_avoidance_vertical
         │   │   └──> AP_Avoidance_Copter::check_flightmode
         │   │       └──> Copter::set_mode
         │   ├──> <> AP_Avoidance_Copter::handle_avoidance_horizontal
         │   │   └──> AP_Avoidance_Copter::check_flightmode
         │   │       └──> Copter::set_mode
         │   └──> <> AP_Avoidance_Copter::handle_avoidance_perpendicular
         │       └──> AP_Avoidance_Copter::check_flightmode
         │           └──> Copter::set_mode
		 │
         └──> <> AP_Avoidance_Copter::handle_recovery
             └──> AP_Avoidance_Copter::set_mode_else_try_RTL_else_LAND
                 └──> Copter::set_mode

3.4.5 Crash触发

当发生Crash时,直接设置飞行模式为LAND。

Copter::motors_output // FAST_TASK
 └──> <> AP_AdvancedFailsafe_Copter::terminate_vehicle
     └──> <g2.afs.should_crash_vehicle()> copter.set_mode(Mode::Number::LAND, ModeReason::TERMINATE)

3.4.6 围栏设置触发

当满足围栏设置条件时,根据围栏触发设置,变更飞行模式。

Copter::fence_check
 └──> <> Copter::set_mode

3.4.7 RC遥控触发

根据遥控器设置,触发飞行模式变更。

  1. RC_Channel_Copter::mode_switch_changed
  2. RC_Channel_Copter::do_aux_function_change_mode
  3. RC_Channel_Copter::do_aux_function

3.4.8 MAVLink触发

MAVLink命令触发飞行模式的变更。

  1. GCS_MAVLINK::_set_mode_common
  2. GCS_MAVLINK_Copter::handle_command_int_do_reposition
  3. GCS_MAVLINK_Copter::handle_command_long_packet

3.4.9 飞行模式内部逻辑触发

由于飞行模式可以认为是一种应用,根据应用场景,有些模式会根据需要进行模式切换。

比如:

  1. ModeBrake::run
  2. ModeFlip::run
  3. ModeLand::nogps_run
  4. ModeRTL::climb_start
  5. ModeRTL::descent_run
  6. ToyMode::update
  7. ToyMode::set_and_remember_mode

3.4.10 heli触发

FRAME_CONFIG == HELI_FRAME 直升机模型作为多旋翼是一种特殊的情况,这里单独有一个类对应处理。

Copter::heli_update_autorotation //  FAST_TASK
 └──> <> Copter::set_mode

3.4.11 MavLink_FrSkySPort

MavLink_FrSkySPort遥控有一个MAVLink的API接口,参考:ArduPilot开源代码之RCInput

注:这部分内容尚不太明朗,目前没有发现遥控器可以通过该协议设置飞控模式。如果有对此了解的朋友,请留言,谢谢!

4. 新增飞行模式

梳理下关于新增一个飞行模式的步骤,详细可参考:Adding a New Flight Mode to Copter

在这里插入图片描述

注:请注意,接下去的描述将会以RTL模式为例。

Step 1:新增模式名称

为新模式选择一个名称,并将其添加到modes.h中control_mode_t枚举的底部。这里以RTL为例。

// Auto Pilot Modes enumeration
enum class Number {
    STABILIZE =     0,  // manual airframe angle with manual throttle
    ACRO =          1,  // manual body-frame angular rate with manual throttle
    ALT_HOLD =      2,  // manual airframe angle with automatic throttle
    AUTO =          3,  // fully automatic waypoint control using mission commands
    GUIDED =        4,  // fully automatic fly to coordinate or fly at velocity/direction using GCS immediate commands
    LOITER =        5,  // automatic horizontal acceleration with automatic throttle
    RTL =           6,  // automatic return to launching point
    CIRCLE =        7,  // automatic circular flight with automatic throttle
    LAND =          9,  // automatic landing with horizontal position control
    DRIFT =        11,  // semi-automous position, yaw and throttle control
    SPORT =        13,  // manual earth-frame angular rate control with manual throttle
    FLIP =         14,  // automatically flip the vehicle on the roll axis
    AUTOTUNE =     15,  // automatically tune the vehicle's roll and pitch gains
    POSHOLD =      16,  // automatic position hold with manual override, with automatic throttle
    BRAKE =        17,  // full-brake using inertial/GPS system, no pilot input
    THROW =        18,  // throw to launch mode using inertial/GPS system, no pilot input
    AVOID_ADSB =   19,  // automatic avoidance of obstacles in the macro scale - e.g. full-sized aircraft
    GUIDED_NOGPS = 20,  // guided mode but only accepts attitude and altitude
    SMART_RTL =    21,  // SMART_RTL returns to home by retracing its steps
    FLOWHOLD  =    22,  // FLOWHOLD holds position with optical flow without rangefinder
    FOLLOW    =    23,  // follow attempts to follow another vehicle or ground station
    ZIGZAG    =    24,  // ZIGZAG mode is able to fly in a zigzag manner with predefined point A and point B
    SYSTEMID  =    25,  // System ID mode produces automated system identification signals in the controllers
    AUTOROTATE =   26,  // Autonomous autorotation
};

Step 2:定义基本接口

为mode.h中的模式定义一个新的类。复制类似的现有模式的类定义并更改类名可能是最简单的(即复制并重命名“class ModeStabilize”为“class ModeNewMode”)。新类应该继承自Mode类,并实现run()、name()和name4()以及可选的init()。

public:
   // inherit constructor
   using Mode::Mode;
   bool init(bool ignore_checks) override;
   void run() override;

protected:
   const char *name() const override { return "NEWMODE"; }
   const char *name4() const override { return "NEWM"; }

注:其他需要的接口,请根据需求自行添加,建议参考已有的飞行模式代码。

Step 3:补充基本接口实现

基于类似的模式(如mode_stabilize.cpp或mode_loiter.cpp)创建一个新的mode_.cpp文件。这个新文件可能会实现init()方法,该方法将在首次进入该模式时调用。如果可以进入模式,则此功能应返回true,如果不能,则返回false。

  • mode_rtl.cpp的initrun方法。
// rtl_init - initialise rtl controller
bool ModeRTL::init(bool ignore_checks)
{
    if (!ignore_checks) {
        if (!AP::ahrs().home_is_set()) {
            return false;
        }
    }
    // initialise waypoint and spline controller
    wp_nav->wp_and_spline_init(g.rtl_speed_cms);
    _state = SubMode::STARTING;
    _state_complete = true; // see run() method below
    terrain_following_allowed = !copter.failsafe.terrain;
    // reset flag indicating if pilot has applied roll or pitch inputs during landing
    copter.ap.land_repo_active = false;

    // this will be set true if prec land is later active
    copter.ap.prec_land_active = false;

#if AC_PRECLAND_ENABLED
    // initialise precland state machine
    copter.precland_statemachine.init();
#endif

    return true;
}
// rtl_run - runs the return-to-launch controller
// should be called at 100hz or more
void ModeRTL::run(bool disarm_on_land)
{
    if (!motors->armed()) {
        return;
    }

    // check if we need to move to next state
    if (_state_complete) {
        switch (_state) {
        case SubMode::STARTING:
            build_path();
            climb_start();
            break;
        case SubMode::INITIAL_CLIMB:
            return_start();
            break;
        case SubMode::RETURN_HOME:
            loiterathome_start();
            break;
        case SubMode::LOITER_AT_HOME:
            if (rtl_path.land || copter.failsafe.radio) {
                land_start();
            } else {
                descent_start();
            }
            break;
        case SubMode::FINAL_DESCENT:
            // do nothing
            break;
        case SubMode::LAND:
            // do nothing - rtl_land_run will take care of disarming motors
            break;
        }
    }

    // call the correct run function
    switch (_state) {

    case SubMode::STARTING:
        // should not be reached:
        _state = SubMode::INITIAL_CLIMB;
        FALLTHROUGH;

    case SubMode::INITIAL_CLIMB:
        climb_return_run();
        break;

    case SubMode::RETURN_HOME:
        climb_return_run();
        break;

    case SubMode::LOITER_AT_HOME:
        loiterathome_run();
        break;

    case SubMode::FINAL_DESCENT:
        descent_run();
        break;

    case SubMode::LAND:
        land_run(disarm_on_land);
        break;
    }
}

Step 4:添加类实例

通过搜索“ModeAcro”,然后在下面的某个地方添加新模式,在Copter.h中实例化新模式类。

#if MODE_ACRO_ENABLED == ENABLED
#if FRAME_CONFIG == HELI_FRAME
    ModeAcro_Heli mode_acro;
#else
    ModeAcro mode_acro;
#endif
#endif
    ModeAltHold mode_althold;
#if MODE_AUTO_ENABLED == ENABLED
    ModeAuto mode_auto;
#endif
#if AUTOTUNE_ENABLED == ENABLED
    ModeAutoTune mode_autotune;
#endif
#if MODE_BRAKE_ENABLED == ENABLED
    ModeBrake mode_brake;
#endif
#if MODE_CIRCLE_ENABLED == ENABLED
    ModeCircle mode_circle;
#endif
#if MODE_DRIFT_ENABLED == ENABLED
    ModeDrift mode_drift;
#endif
#if MODE_FLIP_ENABLED == ENABLED
    ModeFlip mode_flip;
#endif
#if MODE_FOLLOW_ENABLED == ENABLED
    ModeFollow mode_follow;
#endif
#if MODE_GUIDED_ENABLED == ENABLED
    ModeGuided mode_guided;
#endif
    ModeLand mode_land;
#if MODE_LOITER_ENABLED == ENABLED
    ModeLoiter mode_loiter;
#endif
#if MODE_POSHOLD_ENABLED == ENABLED
    ModePosHold mode_poshold;
#endif
#if MODE_RTL_ENABLED == ENABLED
    ModeRTL mode_rtl;
#endif

Step 5:添加模式映射

在mode.cpp中,将新模式添加到mode_from_mode_num()函数中,以创建模式编号和类实例之间的映射。

// return the static controller object corresponding to supplied mode
Mode *Copter::mode_from_mode_num(const Mode::Number mode)
{
    Mode *ret = nullptr;

    switch (mode) {
#if MODE_ACRO_ENABLED == ENABLED
        case Mode::Number::ACRO:
            ret = &mode_acro;
            break;
#endif

        case Mode::Number::STABILIZE:
            ret = &mode_stabilize;
            break;

        case Mode::Number::ALT_HOLD:
            ret = &mode_althold;
            break;

#if MODE_AUTO_ENABLED == ENABLED
        case Mode::Number::AUTO:
            ret = &mode_auto;
            break;
#endif

#if MODE_CIRCLE_ENABLED == ENABLED
        case Mode::Number::CIRCLE:
            ret = &mode_circle;
            break;
#endif

#if MODE_LOITER_ENABLED == ENABLED
        case Mode::Number::LOITER:
            ret = &mode_loiter;
            break;
#endif

#if MODE_GUIDED_ENABLED == ENABLED
        case Mode::Number::GUIDED:
            ret = &mode_guided;
            break;
#endif

        case Mode::Number::LAND:
            ret = &mode_land;
            break;

#if MODE_RTL_ENABLED == ENABLED
        case Mode::Number::RTL:
            ret = &mode_rtl;
            break;
#endif

#if MODE_DRIFT_ENABLED == ENABLED
        case Mode::Number::DRIFT:
            ret = &mode_drift;
            break;
#endif

Step 6:设置默认飞行模式

将新飞行模式添加到config.h中FLIGHT_MODE_1~FLIGHT_MODE_6,使用新模式的编号,如:RTL。

//
// FLIGHT_MODE
//

#ifndef FLIGHT_MODE_1
 # define FLIGHT_MODE_1                  Mode::Number::STABILIZE
#endif
#ifndef FLIGHT_MODE_2
 # define FLIGHT_MODE_2                  Mode::Number::STABILIZE
#endif
#ifndef FLIGHT_MODE_3
 # define FLIGHT_MODE_3                  Mode::Number::STABILIZE
#endif
#ifndef FLIGHT_MODE_4
 # define FLIGHT_MODE_4                  Mode::Number::STABILIZE
#endif
#ifndef FLIGHT_MODE_5
 # define FLIGHT_MODE_5                  Mode::Number::STABILIZE
#endif
#ifndef FLIGHT_MODE_6
 # define FLIGHT_MODE_6                  Mode::Number::RTL
#endif

Step 7:地面站配置参数修改

选择将飞行模式添加到mavlink/ardupilotmega.xml中的COPTER_mode枚举中,因为一些地面站可能会使用此枚举自动填充可用飞行模式列表。

    <enum name="COPTER_MODE">
      <description>A mapping of copter flight modes for custom_mode field of heartbeat.</description>
      <entry value="0" name="COPTER_MODE_STABILIZE"/>
      <entry value="1" name="COPTER_MODE_ACRO"/>
      <entry value="2" name="COPTER_MODE_ALT_HOLD"/>
      <entry value="3" name="COPTER_MODE_AUTO"/>
      <entry value="4" name="COPTER_MODE_GUIDED"/>
      <entry value="5" name="COPTER_MODE_LOITER"/>
      <entry value="6" name="COPTER_MODE_RTL"/>
      <entry value="7" name="COPTER_MODE_CIRCLE"/>
      <entry value="9" name="COPTER_MODE_LAND"/>
      <entry value="11" name="COPTER_MODE_DRIFT"/>
      <entry value="13" name="COPTER_MODE_SPORT"/>
      <entry value="14" name="COPTER_MODE_FLIP"/>
      <entry value="15" name="COPTER_MODE_AUTOTUNE"/>
      <entry value="16" name="COPTER_MODE_POSHOLD"/>
      <entry value="17" name="COPTER_MODE_BRAKE"/>
      <entry value="18" name="COPTER_MODE_THROW"/>
      <entry value="19" name="COPTER_MODE_AVOID_ADSB"/>
      <entry value="20" name="COPTER_MODE_GUIDED_NOGPS"/>
      <entry value="21" name="COPTER_MODE_SMART_RTL"/>
      <entry value="22" name="COPTER_MODE_FLOWHOLD"/>
      <entry value="23" name="COPTER_MODE_FOLLOW"/>
      <entry value="24" name="COPTER_MODE_ZIGZAG"/>
      <entry value="25" name="COPTER_MODE_SYSTEMID"/>
      <entry value="26" name="COPTER_MODE_AUTOROTATE"/>
      <entry value="27" name="COPTER_MODE_AUTO_RTL"/>
    </enum>

5. 总结

本章重点讨论了:

  1. 梳理了当前ArduPilot已经实现的飞行模式,给出了飞行模式之间的类继承关系。
  2. 通过飞行模式的设计,从类实现原理上给出了重要的框架实现接口。
  3. 从切换场景角度阐述了飞行模式复杂性,从而更好的解释了类继承关系的重要性。
  4. 最后,给出了新增自定义飞行模式的方法。

希望,能够通过初步的研读内容,能为后续新增自定义飞控飞行模式带来便捷性。

6. 参考资料

【1】ArduPilot开源飞控系统之简单介绍
【2】ArduPilot之开源代码Task介绍
【3】ArduPilot飞控启动&运行过程简介
【4】ArduPilot开源代码之AP_RCProtocol_CRSF
【5】无人机跟随一维高度避障场景–逻辑分析
【6】ArduPilot开源飞控之do_failsafe_action
【7】ArduPilot开源代码之RCInput

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/900942.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

03_缓存双写一致性

03——缓存双写一致性 一、缓存双写一致性 如果redis中有数据&#xff0c;需要和数据库中的值相同如果redis中无数据&#xff0c;数据库中的值要是最新值&#xff0c;且准备回写redis 缓存按照操作来分&#xff0c;可以分为两种&#xff1a; 只读缓存 读写缓存 同步直写操作…

《游戏编程模式》学习笔记(七)状态模式 State Pattern

状态模式的定义 允许对象在当内部状态改变时改变其行为&#xff0c;就好像此对象改变了自己的类一样。 举个例子 在书的示例里要求你写一个人物控制器&#xff0c;实现跳跃功能 直觉上来说&#xff0c;我们代码会这么写&#xff1a; void Heroine::handleInput(Input input…

js简介以及在html中的2种使用方式(hello world)

简介 javascript &#xff1a;是一个跨平台的脚本语言&#xff1b;是一种轻量级的编程语言。 JavaScript 是 Web 的编程语言。所有现代的 HTML 页面都使用 JavaScript。 HTML&#xff1a; 结构 css&#xff1a; 表现 JS&#xff1a; 行为 HTMLCSS 只能称之为静态网页&#xff0…

ajax-axios-url-form-serialize 插件

AJAX AJAX 概念 1.什么是 AJAX ? mdn 使用浏览器的 XMLHttpRequest 对象 与服务器通信 浏览器网页中&#xff0c;使用 AJAX技术&#xff08;XHR对象&#xff09;发起获取省份列表数据的请求&#xff0c;服务器代码响应准备好的省份列表数据给前端&#xff0c;前端拿到数据数…

面试百问:Redis常见的故障以及发生场景

作为一个测试同学&#xff0c;被测系统架构中有使用到redis吗&#xff1f;对redis常见的故障有了解吗&#xff1f;又是如何进行测试的呢&#xff1f; 针对常见的redis面试问题&#xff0c;怎样才算一个高质量的回答呢&#xff0c;回答思路一般包括 问题的类型是什么&#xff…

Qt应用开发(基础篇)——高级纯文本窗口 QPlainTextEdit

一、前言 QPlainTextEdit类继承于QAbstractScrollArea&#xff0c;QAbstractScrollArea继承于QFrame&#xff0c;是Qt用来显示和编辑纯文本的窗口。 滚屏区域基类https://blog.csdn.net/u014491932/article/details/132245486?spm1001.2014.3001.5501框架类QFramehttps://blo…

使用IDM下载视频出现“由于法律原因,IDM无法下载...

一、问题描述 由于法律原因,IDM无法下载..,如图: 二、原因分析 下载该IDM抓取的M3U8文件,查看其中的内容发现 : #EXT-X-KEY 字段已经写明了加密方式是AES-128,包含一个URI和IV值 #EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:8 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-KEY:…

【机器学习】处理不平衡的数据集

一、介绍 假设您在一家给定的公司工作&#xff0c;并要求您创建一个模型&#xff0c;该模型根据您可以使用的各种测量来预测产品是否有缺陷。您决定使用自己喜欢的分类器&#xff0c;根据数据对其进行训练&#xff0c;瞧&#xff1a;您将获得96.2%的准确率&#xff01; …

分析了下内网穿透技术,都在这了

内网穿透是一种将位于内网中的计算机或设备暴露给公网的技术&#xff0c;以便可以从外部网络访问这些设备。这在许多场景中非常有用&#xff0c;例如远程访问内网中的服务器、搭建本地 Web 服务器、共享文件等。 目前内网穿透一般都以下五种方案 目录 方案一&#xff1a;使用…

Cesium加载ArcGIS Server4490且orgin -400 400的切片服务

Cesium在使用加载Cesium.ArcGisMapServerImageryProvider加载切片服务时&#xff0c;默认只支持wgs84的4326坐标系&#xff0c;不支持CGCS2000的4490坐标系。 如果是ArcGIS发布的4490坐标系的切片服务&#xff0c;如果原点在orgin X: -180.0Y: 90.0的情况下&#xff0c;我们可…

若依的使用(token补充、HTTPS(网络安全)、分页前后端配置)

本文章转载于公众号&#xff1a;王清江唷,仅用于学习和讨论&#xff0c;如有侵权请联系 QQ交流群&#xff1a;298405437 本人QQ&#xff1a;4206359 具体视频地址:8 跑后端_哔哩哔哩_bilibili 1、HTTP&#xff1f; 曾经我们在讲JWT的时候&#xff0c;当时JWT需要配合https…

企业信息化过程----应用管理平台的构建过程

1.信息化的概念 信息化是一个过程&#xff0c;与工业化、现代化一样&#xff0c;是一个动态变化的过程。信息化已现代通信&#xff0c;网络、数据库技术为基础&#xff0c;将所有研究对象各个要素汇总至数据库&#xff0c;供特定人群生活、工作、学习、辅助决策等&#xff0c;…

前端基础(Vue的模块化开发)

目录 前言 响应式基础 ref reactive 学习成果展示 Vue项目搭建 总结 前言 前面学习了前端HMTL、CSS样式、JavaScript以及Vue框架的简单适用&#xff0c;接下来运用前面的基础继续学习Vue&#xff0c;运用前端模块化编程的思想。 响应式基础 ref reactive 关于ref和react…

linux:Temporary failure in name resolutionCouldn’t resolve host

所有域名无法正常解析。 ping www.baidu.com 等域名提示 Temporary failure in name resolution错误。 rootlocalhost:~# ping www.baidu.com ping: www.baidu.com: Temporary failure in name resolution rootlocalhost:~# 一、ubuntu/debian&#xff08;emporary failure i…

提升大数据技能,不再颓废!这6家学习网站是你的利器!

随着国家数字化转型&#xff0c;大数据领域对人才的需求越来越多。大数据主要研究计算机科学和大数据处理技术等相关的知识和技能&#xff0c;从大数据应用的三个主要层面&#xff08;即数据管理、系统开发、海量数据分析与挖掘&#xff09;出发&#xff0c;对实际问题进行分析…

学习笔记230810--get请求的两种传参方式

问题描述 今天写了一个对象方式传参的get请求接口方法&#xff0c;发现没有载荷&#xff0c;ip地址也没有带查询字符串&#xff0c;数据也没有响应。 代码展示 错误分析 实际上这里的query是对象方式带参跳转的参数名&#xff0c;而get方法对象方式传参的参数名是parmas 解…

华为OD机试 - 秘钥格式化 - 双指针(Java 2023 B卷 100分)

目录 专栏导读一、题目描述二、输入描述三、输出描述四、解题思路五、Java算法源码六、效果展示1、输入2、输出3、说明 华为OD机试 2023B卷题库疯狂收录中&#xff0c;刷题点这里 专栏导读 本专栏收录于《华为OD机试&#xff08;JAVA&#xff09;真题&#xff08;A卷B卷&#…

条件判断语句

二、判断语句 # 判断语句result10>15 print("10>5的结果是&#xff1a;%s"% result,type(result))eq"yl""yl" print("\"ylyl\" %s"% eq,type(eq))bool_1True bool_2False print(f"打印出类型,{bool_1},类型是{ty…

【论文笔记】MetaBEV: Solving Sensor Failures for BEV Detection and Map Segmentation

原文链接&#xff1a;https://arxiv.org/abs/2304.09801 1. 引言 目前&#xff0c;多模态融合感知中的一大问题在于忽视了传感器失效带来的影响。之前工作的主要问题包括&#xff1a; 特征不对齐&#xff1a;通常使用CNN处理拼接后的特征图&#xff0c;存在几何噪声时可能导致…

2023-8-14 前缀和

原题链接&#xff1a;前缀和 #include <iostream> using namespace std;const int N 100010;int n, m;int a[N], s[N];int main () {scanf("%d%d", &n, &m);for(int i 1; i < n; i ) scanf("%d", &a[i]);for(int i 1; i < n;…