pixhawk PX4FMU和PX4IO最底层启动过程分析

2023-05-16

首先,大体了解PX4IO 与PX4FMU各自的任务


PX4IO(STM32F100)为PIXHAWK 中专用于处理输入输出的部分,输入为支持的各类遥控器(PPM,SPKT/DSM,SBUS), 输出为电调的PWM 驱动信号, 它与PX4FMU(STM32F427)通过串口进行通信

PX4FMU :各种传感器数据读取、姿态解算、PWM控制量的计算、与PX4IO通信

进入主题

PX4IO 与PX4FMU 一样,在大的软件架构上分为Bootloader,OS 和APP 三个部分,OS 为Nuttx,如下图


根据自己理解画的流程图:(2016.05.19加)


1.Bootloader

       在嵌入式操作系统中,BootLoader是在操作系统内核运行之前运行。可以初始化硬件设备、建立内存空间映射图,从而将系统的软硬件环境带到一个合适状态,以便为最终调用操作系统内核准备好正确的环境。在嵌入式系统中,通常并没有像BIOS那样的固件程序(注,有的嵌入式CPU也会内嵌一段短小的启动程序),因此整个系统的加载启动任务就完全由BootLoader来完成。Bootloader是嵌入式系统在加电后执行的第一段代码,在它完成CPU和相关硬件的初始化之后,再将操作系统映像或固化的嵌入式应用程序装在到内存中然后跳转到操作系统所在的空间,启动操作系统运行。

因此进入px4/Bootloader可以看到main_f1、main_f4,分别对应着PX4IO、PX4FMU

主要是负责是否升级芯片,不升级则进入OS(具体的内容还没仔细看,读者结合注释应该能够看懂)

2.Nuttx

此部分摘自于pixhawk自学笔记之px4程序启动顺序

代码位置:Firmware/build_px4fmu-v2_default/px4fmu-v2/Nuttx/nuttx/arch/arm/src/stm32/stm32_start.c

__start--                                #处理器执行的第一条指令(px4使用的是stm32,入口在stm32_start.c中)

        |

        v

   stm32_clockconfig()------             #初始化时钟

                          |

                          v

                 rcc_reset()                            #复位rcc

                 stm32_stdclockconfig()       #初始化标准时钟

                rcc_enableperipherals()       #使能外设时钟

------------------------------------------------------------------

 

   stm32_fpuconfig()                         #配置fpu

                              |

                              v

               stm32_lowsetup()                    #基本初始化串口,之后可以使用up_lowputc()

               stm32_gpioinit()                      #初始化gpio,只是调用stm32_gpioremap()设置重映射

               up_earlyserialinit()                   #初始化串口,之后可以使用up_putc()

               stm32_boardinitialize()--          #板级初始化

                          |

                          v

                stm32_spiinitialize()        #初始化spi,只是调用stm32_configgpio()设置gpio

                stm32_usbinitialize()        #初始化usb,只是调用stm32_configgpio()设置gpio

                  up_ledinit();                  #初始化led,只是调用stm32_configgpio()设置gpio

                          |

   ----------------------------------------------------------------------------------------------

   在stm32_start.c文件中我们会看到这么一句话:


  os_start()---------------                         #初始化操作系统

                          |

                          v

                 dq_init()                                #初始化各种状态的任务列表(置为null)

                g_pidhash[i]=                        #初始化唯一可以确定的元素--进程ID

                g_pidhash[PIDHASH(0)]=      #分配空闲任务的进程ID为0

                 g_idletcb=                            #初始化空闲任务的任务控制块

                sem_initialize()--                   #初始化信号量

                                 |

                                 v

                      dq_init()                           #将信号量队列置为null

                      sem_initholders()             #初始化持有者结构以支持优先级继承

                                 |

                          --------

                          |

                          v

                up_allocate_heap()         #分配用户模式的堆(设置堆的起点和大小)

                kumm_initialize()            #初始化用户模式的堆

                up_allocate_kheap()        #分配内核模式的堆

                kmm_initialize()               #初始化内核模式的堆

                task_initialize()                #初始化任务数据结构

                irq_initialize()                  #将所有中断向量都指向同一个异常中断处理程序

                wd_initialize()                  #初始化看门狗数据结构

                clock_initialize()               #初始化rtc

                timer_initialize()               #配置POSIX定时器

                sig_initialize()                  #初始化信号

                mq_initialize()                  #初始化命名消息队列

                pthread_initialize()           #初始化线程特定的数据,空函数

                 fs_initialize()---                #初始化文件系统

                                 |

                                 v

                      sem_init()         #初始化节点信号量为1

                      files_initialize() #初始化文件数组,空函数

                                 |

                          --------

                          |

                          v

                net_initialize()--       #初始化网络

                                 |

                                 v

                      uip_initialize()       #初始化uIP层

                      net_initroute()        #初始化路由表

                      netdev_seminit()   #初始化网络设备信号量

                      arptimer_init()        #初始化ARP定时器

                                 |

                          --------

                          |

                          v

                up_initialize()---       #处理器特定的初始化

                                 |

                                 v

                      up_calibratedelay()           #校准定时器

                      up_addregion()                 #增加额外的内存段

                      up_irqinitialize()                #设置中断优先级,关联硬件异常处理函数

                      up_pminitialize()               #初始化电源管理

                      up_dmainitialize()              #初始化DMA

                      up_timerinit()                     #初始化定时器中断

                      devnull_register()               #注册/dev/null

                      devzero_register()              #注册/dev/zero

                      up_serialinit()                      #注册串口控制台/dev/console和串口/dev/ttyS0

                      up_rnginitialize()                #初始化并注册随机数生成器

                      up_netinitialize()                 #初始化网络,是arch/arm/src/chip/stm32_eth.c中的

                      up_usbinitialize()                 #初始化usb驱动

                      board_led_on()                     #打开中断使能led,但很快会被其它地方的led操作改变状态

                                 |

                          --------

                          |

                          v

                lib_initialize()                     #初始化c库,空函数

                group_allocate()                #分配空闲组

                group_setupidlefiles()        #在空闲任务上创建stdout、stderr、stdin

                group_initialize()               #完全初始化空闲组

                os_bringup()------              #创建初始任务

                                 |

                                 v

                      KEKERNEL_THREAD()    #启动内核工作者线程

                      board_initialize()           #最后一刻的板级初始化

                      TASK_CREATE()             #启动默认应用程序

                                 |

                          --------

                          |

                          v

                 forup_idle()                         #空闲任务循环

                          |

        --------------------

        |

        v

   for(;;)                               #不应该到达这里

__start 负责STM32 芯片的底层初始化,包括时钟,FPU,GPIO 等单元的初始化

os_start 负责OS 的底层初始化,包括各种队列和进程结构的初始化

os_bringup 负责OS 基本进程的启动以及用户进程的启动,用户启动入口由(CONFIG_USER_ENTRYPOINT)宏进行指定

3.APP

PX4FMU中   #define CONFIG_USER_ENTRYPOINT nsh_main

进入nsh_main

int nsh_main(int argc, char *argv[])
{
  int exitval = 0;
  int ret;

  /* Call all C++ static constructors */

#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
  up_cxxinitialize();
#endif

  /* Make sure that we are using our symbol take */

#if defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_EXECFUNCS_SYMTAB)
  exec_setsymtab(CONFIG_EXECFUNCS_SYMTAB, 0);
#endif

  /* Register the BINFS file system */

#if defined(CONFIG_FS_BINFS) && (CONFIG_BUILTIN)
  ret = builtin_initialize();
  if (ret < 0)
    {
     fprintf(stderr, "ERROR: builtin_initialize failed: %d\n", ret);
     exitval = 1;
   }
#endif

  /* Initialize the NSH library */

  nsh_initialize();

  /* If the Telnet console is selected as a front-end, then start the
   * Telnet daemon.
   */

#ifdef CONFIG_NSH_TELNET
  ret = nsh_telnetstart();
  if (ret < 0)
    {
     /* The daemon is NOT running.  Report the the error then fail...
      * either with the serial console up or just exiting.
      */

     fprintf(stderr, "ERROR: Failed to start TELNET daemon: %d\n", ret);
     exitval = 1;
   }
#endif

  /* If the serial console front end is selected, then run it on this thread */

#ifdef CONFIG_NSH_CONSOLE
  ret = nsh_consolemain(0, NULL);

  /* nsh_consolemain() should not return.  So if we get here, something
   * is wrong.
   */

  fprintf(stderr, "ERROR: nsh_consolemain() returned: %d\n", ret);
  exitval = 1;
#endif

  return exitval;
}
其中包含

#ifdef CONFIG_NSH_CONSOLE
  ret = nsh_consolemain(0, NULL);
进入nsh_consolemain

int nsh_consolemain(int argc, char *argv[])
{
  FAR struct console_stdio_s *pstate = nsh_newconsole();
  int ret;

  DEBUGASSERT(pstate);

  /* Execute the start-up script */

#ifdef CONFIG_NSH_ROMFSETC
  (void)nsh_initscript(&pstate->cn_vtbl);
#endif

  /* Initialize any USB tracing options that were requested */

#ifdef CONFIG_NSH_USBDEV_TRACE
  usbtrace_enable(TRACE_BITSET);
#endif

  /* Execute the session */

  ret = nsh_session(pstate);

  /* Exit upon return */

  nsh_exit(&pstate->cn_vtbl, ret);
  return ret;
}
其中包含
  /* Execute the start-up script */

#ifdef CONFIG_NSH_ROMFSETC
  (void)nsh_initscript(&pstate->cn_vtbl);
#endif
执行启动脚本也就是rcS,接下来根据自己版本分别看ardupilot和PX4原生码
  /* Execute the session */

  ret = nsh_session(pstate);
执行用户程序
跟踪pstate

FAR struct console_stdio_s *pstate = nsh_newconsole();
进入nsh_newconsole

FAR struct console_stdio_s *nsh_newconsole(void)
{
  struct console_stdio_s *pstate = (struct console_stdio_s *)zalloc(sizeof(struct console_stdio_s));
  if (pstate)
    {
      /* Initialize the call table */

#ifndef CONFIG_NSH_DISABLEBG
      pstate->cn_vtbl.clone      = nsh_consoleclone;
      pstate->cn_vtbl.release    = nsh_consolerelease;
#endif
      pstate->cn_vtbl.write      = nsh_consolewrite;
      pstate->cn_vtbl.output     = nsh_consoleoutput;
      pstate->cn_vtbl.linebuffer = nsh_consolelinebuffer;
      pstate->cn_vtbl.redirect   = nsh_consoleredirect;
      pstate->cn_vtbl.undirect   = nsh_consoleundirect;
      pstate->cn_vtbl.exit       = nsh_consoleexit;

      /* (Re-) open the console input device */

#ifdef CONFIG_NSH_CONDEV
      pstate->cn_confd           = open(CONFIG_NSH_CONDEV, O_RDWR);
      if (pstate->cn_confd < 0)
        {
          free(pstate);
          return NULL;
        }

      /* Create a standard C stream on the console device */

      pstate->cn_constream = fdopen(pstate->cn_confd, "r+");
      if (!pstate->cn_constream)
        {
          close(pstate->cn_confd);
          free(pstate);
          return NULL;
        }
#endif

      /* Initialize the output stream */

      pstate->cn_outfd           = OUTFD(pstate);
      pstate->cn_outstream       = OUTSTREAM(pstate);
    }
  return pstate;
}
应该是用户在console输入新的nsh命令吧

PX4IO中       #define CONFIG_USER_ENTRYPOINT user_start

进入user_start

int
user_start(int argc, char *argv[])
{
	/* configure the first 8 PWM outputs (i.e. all of them) */
	up_pwm_servo_init(0xff);

	/* run C++ ctors before we go any further */
	up_cxxinitialize();

	/* reset all to zero */
	memset(&system_state, 0, sizeof(system_state));

	/* configure the high-resolution time/callout interface */
	hrt_init();

	/* calculate our fw CRC so FMU can decide if we need to update */
	calculate_fw_crc();

	/*
	 * Poll at 1ms intervals for received bytes that have not triggered
	 * a DMA event.
	 */
#ifdef CONFIG_ARCH_DMA
	hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif

	/* print some startup info */
	lowsyslog("\nPX4IO: starting\n");

	/* default all the LEDs to off while we start */
	LED_AMBER(false);
	LED_BLUE(false);
	LED_SAFETY(false);
#ifdef GPIO_LED4
	LED_RING(false);
#endif

	/* turn on servo power (if supported) */
#ifdef POWER_SERVO
	POWER_SERVO(true);
#endif

	/* turn off S.Bus out (if supported) */
#ifdef ENABLE_SBUS_OUT
	ENABLE_SBUS_OUT(false);
#endif

	/* start the safety switch handler */
	safety_init();

	/* initialise the control inputs */
	controls_init();

	/* set up the ADC */
	adc_init();

	/* start the FMU interface */
	interface_init();

	/* add a performance counter for mixing */
	perf_counter_t mixer_perf = perf_alloc(PC_ELAPSED, "mix");

	/* add a performance counter for controls */
	perf_counter_t controls_perf = perf_alloc(PC_ELAPSED, "controls");

	/* and one for measuring the loop rate */
	perf_counter_t loop_perf = perf_alloc(PC_INTERVAL, "loop");

	struct mallinfo minfo = mallinfo();
	lowsyslog("MEM: free %u, largest %u\n", minfo.mxordblk, minfo.fordblks);

	/* initialize PWM limit lib */
	pwm_limit_init(&pwm_limit);

	/*
	 *    P O L I C E    L I G H T S
	 *
	 * Not enough memory, lock down.
	 *
	 * We might need to allocate mixers later, and this will
	 * ensure that a developer doing a change will notice
	 * that he just burned the remaining RAM with static
	 * allocations. We don't want him to be able to
	 * get past that point. This needs to be clearly
	 * documented in the dev guide.
	 *
	 */
	if (minfo.mxordblk < 600) {

		lowsyslog("ERR: not enough MEM");
		bool phase = false;

		while (true) {

			if (phase) {
				LED_AMBER(true);
				LED_BLUE(false);

			} else {
				LED_AMBER(false);
				LED_BLUE(true);
			}

			up_udelay(250000);

			phase = !phase;
		}
	}

	/* Start the failsafe led init */
	failsafe_led_init();

	/*
	 * Run everything in a tight loop.
	 */

	uint64_t last_debug_time = 0;
	uint64_t last_heartbeat_time = 0;

	for (;;) {

		/* track the rate at which the loop is running */
		perf_count(loop_perf);

		/* kick the mixer */
		perf_begin(mixer_perf);
		mixer_tick();
		perf_end(mixer_perf);

		/* kick the control inputs */
		perf_begin(controls_perf);
		controls_tick();
		perf_end(controls_perf);

		if ((hrt_absolute_time() - last_heartbeat_time) > 250 * 1000) {
			last_heartbeat_time = hrt_absolute_time();
			heartbeat_blink();
		}

		ring_blink();

		check_reboot();

		/* check for debug activity (default: none) */
		show_debug_messages();

		/* post debug state at ~1Hz - this is via an auxiliary serial port
		 * DEFAULTS TO OFF!
		 */
		if (hrt_absolute_time() - last_debug_time > (1000 * 1000)) {

			isr_debug(1, "d:%u s=0x%x a=0x%x f=0x%x m=%u",
				  (unsigned)r_page_setup[PX4IO_P_SETUP_SET_DEBUG],
				  (unsigned)r_status_flags,
				  (unsigned)r_setup_arming,
				  (unsigned)r_setup_features,
				  (unsigned)mallinfo().mxordblk);
			last_debug_time = hrt_absolute_time();
		}
	}
}
user_start 负责px4io 基础环境的初始化,包括PWM,串口,ADC 等资源的初始化,最后运行一个死循环,用于处理遥控器输入,与PX4FMU 通信的内容

controls_tick 负责处理遥控器的输入内容,包括SBUS 的处理sbus_input、 SPKT/DSM 的处理dsm_port_input、 PPM 的处理ppm_input

PX4IO 底层中断处理的内容如下图


(1)紫色为PX4IO 的底层串口IO 操作,流程为当PX4IO 收到PX4FMU 的串口数据后会运行serial_interrupt, serial_interrupt 负责收发DMA 的操作,如果收到一个完整的包,则调用rx_dma_callback 进行处理, rx_dma_callback 首先调用rx_handle_packet 解析包中的内容,判断为写寄存器还是读寄存器,处理完成后由rx_dma_callback 发送回包给PX4FMU

static int
serial_interrupt(int irq, void *context)
{
	static bool abort_on_idle = false;

	uint32_t sr = rSR;	/* get UART status register */
	(void)rDR;		/* required to clear any of the interrupt status that brought us here */

	if (sr & (USART_SR_ORE |	/* overrun error - packet was too big for DMA or DMA was too slow */
		  USART_SR_NE |		/* noise error - we have lost a byte due to noise */
		  USART_SR_FE)) {		/* framing error - start/stop bit lost or line break */

		perf_count(pc_errors);

		if (sr & USART_SR_ORE) {
			perf_count(pc_ore);
		}

		if (sr & USART_SR_NE) {
			perf_count(pc_ne);
		}

		if (sr & USART_SR_FE) {
			perf_count(pc_fe);
		}

		/* send a line break - this will abort transmission/reception on the other end */
		rCR1 |= USART_CR1_SBK;

		/* when the line goes idle, abort rather than look at the packet */
		abort_on_idle = true;
	}

	if (sr & USART_SR_IDLE) {

		/*
		 * If we saw an error, don't bother looking at the packet - it should have
		 * been aborted by the sender and will definitely be bad. Get the DMA reconfigured
		 * ready for their retry.
		 */
		if (abort_on_idle) {

			abort_on_idle = false;
			dma_reset();
			return 0;
		}

		/*
		 * The sender has stopped sending - this is probably the end of a packet.
		 * Check the received length against the length in the header to see if
		 * we have something that looks like a packet.
		 */
		unsigned length = sizeof(dma_packet) - stm32_dmaresidual(rx_dma);

		if ((length < 1) || (length < PKT_SIZE(dma_packet))) {

			/* it was too short - possibly truncated */
			perf_count(pc_badidle);
			dma_reset();
			return 0;
		}

		/*
		 * Looks like we received a packet. Stop the DMA and go process the
		 * packet.
		 */
		perf_count(pc_idle);
		stm32_dmastop(rx_dma);
		rx_dma_callback(rx_dma, DMA_STATUS_TCIF, NULL);
	}

	return 0;
}
static void
rx_dma_callback(DMA_HANDLE handle, uint8_t status, void *arg)
{
	/*
	 * We are here because DMA completed, or UART reception stopped and
	 * we think we have a packet in the buffer.
	 */
	perf_begin(pc_txns);

	/* disable UART DMA */
	rCR3 &= ~(USART_CR3_DMAT | USART_CR3_DMAR);

	/* handle the received packet */
	rx_handle_packet();

	/* re-set DMA for reception first, so we are ready to receive before we start sending */
	dma_reset();

	/* send the reply to the just-processed request */
	dma_packet.crc = 0;
	dma_packet.crc = crc_packet(&dma_packet);
	stm32_dmasetup(
		tx_dma,
		(uint32_t)&rDR,
		(uint32_t)&dma_packet,
		PKT_SIZE(dma_packet),
		DMA_CCR_DIR		|
		DMA_CCR_MINC		|
		DMA_CCR_PSIZE_8BITS	|
		DMA_CCR_MSIZE_8BITS);
	stm32_dmastart(tx_dma, NULL, NULL, false);
	rCR3 |= USART_CR3_DMAT;

	perf_end(pc_txns);
}
static void
rx_handle_packet(void)
{
	/* check packet CRC */
	uint8_t crc = dma_packet.crc;
	dma_packet.crc = 0;

	if (crc != crc_packet(&dma_packet)) {
		perf_count(pc_crcerr);

		/* send a CRC error reply */
		dma_packet.count_code = PKT_CODE_CORRUPT;
		dma_packet.page = 0xff;
		dma_packet.offset = 0xff;

		return;
	}

	if (PKT_CODE(dma_packet) == PKT_CODE_WRITE) {

		/* it's a blind write - pass it on */
		if (registers_set(dma_packet.page, dma_packet.offset, &dma_packet.regs[0], PKT_COUNT(dma_packet))) {
			perf_count(pc_regerr);
			dma_packet.count_code = PKT_CODE_ERROR;

		} else {
			dma_packet.count_code = PKT_CODE_SUCCESS;
		}

		return;
	}

	if (PKT_CODE(dma_packet) == PKT_CODE_READ) {

		/* it's a read - get register pointer for reply */
		unsigned count;
		uint16_t *registers;

		if (registers_get(dma_packet.page, dma_packet.offset, &registers, &count) < 0) {
			perf_count(pc_regerr);
			dma_packet.count_code = PKT_CODE_ERROR;

		} else {
			/* constrain reply to requested size */
			if (count > PKT_MAX_REGS) {
				count = PKT_MAX_REGS;
			}

			if (count > PKT_COUNT(dma_packet)) {
				count = PKT_COUNT(dma_packet);
			}

			/* copy reply registers into DMA buffer */
			memcpy((void *)&dma_packet.regs[0], registers, count * 2);
			dma_packet.count_code = count | PKT_CODE_SUCCESS;
		}

		return;
	}

	/* send a bad-packet error reply */
	dma_packet.count_code = PKT_CODE_CORRUPT;
	dma_packet.page = 0xff;
	dma_packet.offset = 0xfe;
}

(2) 蓝色为包操作,只提供registers_set 写操作和registers_get 读操作

(3)IOPacket 为协议包,包括以下几部分
    count_code 标记包的读写,错误,长度等信息
    crc 为包的效验码
    page 为数据页
    offset 为数据偏移量
    regs 为数据内容


如果您觉得此文对您的发展有用,请随意打赏。 
您的鼓励将是笔者书写高质量文章的最大动力^_^!!


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

pixhawk PX4FMU和PX4IO最底层启动过程分析 的相关文章

  • 【Pixhawk】PX4添加麦克纳姆轮车架

    PX4中提供了很多机架 xff0c 但要开发PX4不支持的机架类型 xff0c 需要我们自定义 比如麦克纳姆轮 1 在ROMFS px4fmu common init d airframes 下添加 hil机架文件 参考其他 命名为7000
  • pixhawk使用WiFi模块

    pixhawk使用WiFi 前期准备刷固件安装刷固件软件进入刷固件模式下载固件刷固件 使用接线飞控参数更改使用方法 在使用pixhawk的时候有时候在无人机上不方便搭载处理器 xff0c 这个时候进行外部控制 或者QGC有线方式连接无人机不
  • 【px4编译】make px4fmu-v3_default upload 不能使用

    今天遇到编译pixhawk2代固件无法upload的问题 xff0c 出现TypeError a bytes like object is required not str xff0c 在1代中是可以make upload的 ninja E
  • PIXHAWK飞行模式

    PIXHAWK飞行模式 从mission planner中设置pixhawk的飞行模式时 xff0c 一共给出了多种飞行模式 xff0c 分别为 xff1a MANUAL STABILIZED ACRO RATTITUDE ALTCTL P
  • APM、PIXHAWK、PX4的关系

  • Mavros读取PixHawk硬件的IMU数据

    Ubuntu18 04 读取PixHawk硬件的IMU数据 实现方式 使用mavros话题读取到Pixhawk飞控的IMU数据 实现步骤 安装ros 检查是否安装cmake xff08 未安装根据提示安装 xff09 cmake span
  • PIXHAWK 4 中文资料 文档 PCB

    最先进的PX4自动驾驶仪开发工具包 PixHawk 4是PixHawk飞行控制器家族中最新最成功的产品 它是由Holybro 和 Auterion合作开发 xff0c 优化PX4 它预装了最新的PX4原生固件 它采用了目前最先进的STMic
  • 我发现GAAS,阿木的SLAM无人机,XTDrone都是用的pixhawk !

    我发现 xff0c 七月的GAAS xff0c 阿木的SLAM无人机 xff0c 还有这个开课吧的智能无人机的课 xff0c 这三个都是用的pixhawk飞控 xff0c 对不对 xff0c 没有一个去用上面自己写的简单飞控啥的没有 xff
  • pixhawk日志ulg格式转matlab数据csv格式

    1 windows下打开Anconda Prompt xff0c 执行pip install pyulog安装pyulog包 2 在日志文件所在文件夹下执行ulog2csv 文件名 ulg即可生成相关的csv文件
  • PIXHAWK位置控制整体框架及期望推力向量转化成目标姿态旋转矩阵算法的深度解析

    万事开头难 xff0c 这是我的第一篇博客 谨以此将所学所悟记录下来 xff0c 以防遗失 xff0c 同时欢迎与大家进行技术交流 xff0c 共同学习 xff0c 共同进步 xff0c 玩的开心 xff01 这里的位置控制主要看PX4的m
  • pixhawk飞控中添加uORB主题

    本说明针对 Firmware v1 2 0 参考 xff1a https pixhawk org start id 61 zh dev shared object communication 1 添加流程说明 在Firmware msg下新
  • Pixhawk学习7——位置解算

    Pixhawk的位置解算分为两部分 xff0c 第一部分主要为传感器的数据获取 xff0c 而该部分最主要的就是GPS数据的提取 第二部分为与惯性器件之间的组合导航 组合导航的好处我就不用多说了 Pixhawk代码中目前主要有两处组合导航的
  • pixhawk ulg转csv

    ulg是目前最新版px4固件生成的log格式 xff0c 下载最新版的flightplot即可对内部数据进行预览分析 xff0c flightplot中支持部分函数和运算符操作 xff0c 但对带 数据的操作不支持 xff0c 如需要对某些
  • Pixhawk_bootloader简介

    Pixhawk Bootloader引导过程简介 自己结合网络上的资源总结的内容 有不对的地方请及时指出 有侵权的请指出 QQ 4862879 Pixhawk硬件使用STM32的芯片 Cortex M3的内核有三种启动方式 xff0c 其分
  • pixhawk飞控调试_px4飞控调试方法

    2 BRD SAFETYENABLE 0 禁用安全开关 1 启用安全开关 3 3 2 这个界面是正常工作的界面 xff0c 此时通过串口的数据是 2 进制数据 xff0c 所以看到的是 乱码 从 Open com port 之后就是乱码 可
  • PX4/Pixhawk---高速成为开发人员(Windows)

    1 高速成为开发人员新手教程 xff08 翻译 xff09 官方 1 1 编译环境之版本号控制系统 xff08 1 xff09 安装 MSysGIT 安装完毕后 xff0c 配置GIT 安装注意 安装过程中除了以下一步外 xff0c 其它的
  • PX4/PixHawk无人机飞控应用开发

    最近做的一个国防背景的field UAV项目 xff0c 细节不能多谈 xff0c 简单写点技术体会 1 PX4 Pixhawk飞控软件架构简介 PX4是目前最流行的开源飞控板之一 PX4的软件系统实际上就是一个firmware xff0c
  • pixhawk make文件分析

    由于笔者没学过Linux等系统 xff0c 对make文件所知甚少 xff0c 本节分析可能有大量错误 xff0c 只提供参考 xff0c 随着技术积累 xff0c 以后会回过头改正错误的地方 xff0c 也非常欢迎提出指导意见 其中分析大
  • 【Pixhawk】注册一个字符型驱动设备

    最近学习Pixhawk的SPI xff0c 本以为PX4是STM32单片机而已 xff0c 写个SPI驱动应该很简单 但是当我看到mpu9250的那些cpp文件 xff0c 我一下就蒙了 由于PX4用的NUTTX系统 xff0c 类似Lin
  • APM(pixhawk)飞控疑难杂症解决方法汇总(持续更新)

    原文链接 xff1a http www nufeichuiyun com p 61 28

随机推荐

  • 养老产业政策链接

    江西省养老政策文件 xff1a 江西省养老服务条例 http mzw ganzhou gov cn gzsmzjy c103172 202201 d238525b35bb47b49b3de312c9b63a60 shtml 南昌市养老服务体
  • 我多变的2013

    我多变的2013 第一篇 xff1a 回顾 回顾工作 首先简单的做个自我介绍吧 xff0c 我是87年的 xff0c 北漂已经是第5个年头了 xff0c 一直都从事java开发工作 前后只换过一家公司 xff0c 第一家待了近两年 xff0
  • 我花1200大洋所学的“元学习课”究竟学了些什么?

    我花1200大洋所学的 元学习课 究竟学了些什么 xff1f 讲课的是台湾的一位大牛名叫Xdite xff0c 以及亿万富豪李笑来 能够跟牛人学习怎么学习我想应该不会有错吧 xff0c 对我来说这次做的应该是一次正确的决定 xff0c 所谓
  • 成长记录-开启我的新生 (2016-12-06)

    真的是很惊险 xff0c 我差一点就错过了 获得新生 的机会 xff0c 我在蜻蜓音频中听到了逻辑思维 xff0c 从逻辑思维中了解到了 得到 xff0c 从 得到 中订阅了吴军博士的 硅谷来信 xff0c 却在过去的好几个月里 xff0c
  • 最新Java电子书

    最新Java电子书 JAVA参考大全 J2SE 5EDITION 世界级程序设计大师作品 Thinking in Java第三版 43 第四版 xff08 中文版 43 习题答案 xff09 Java数据库高级编程宝典 Java核心技术第八
  • ELK-ElasticSearch权威指南笔记

    ELK ElasticSearch笔记 文章目录 ELK ElasticSearch笔记 前言测试工具 语法索引 xff0c 文档和类型文档元数据检索索引里文档数据查看当前节点的所有 Index查看所有index的mapping 映射 查看
  • 关于JAVA中内存溢出的解决办法

    关于JAVA中内存溢出的解决办法 J2ee应用系统是运行在J2EE应用服务器上的 xff0c 而j2ee应用服务器又是运行在JVM上的 xff0c 生成环境中JVM参数的优化和设置对于J2EE应用系统性能有着决定性的作用 要优化系统 xff
  • ireport的使用总结

    ireport的使用总结 截图居然都没显示出来 xff0c 如有需要可以到 xff08 http download csdn net detail czp0608 4140640 xff09 下载 相信很多java程序员们 xff0c 在开
  • 卡尔曼滤波C代码分析

    文章下载地址 xff1a http wenku baidu com view 3c42b7733186bceb18e8bb29
  • 作为一个新人,怎样学习嵌入式Linux?

    作为一个新人 xff0c 怎样学习嵌入式Linux xff1f 被问过太多次 xff0c 特写这篇文章来回答一下 在学习嵌入式Linux之前 xff0c 肯定要有C语言基础 汇编基础有没有无所谓 就那么几条汇编指令 xff0c 用到了一看就
  • pixhawk启动脚本分析

    Nuttx系统启动是由ardupilot mk PX4 ROMFS init d里的rcS和rc APM完成的 笔者阅读了rcS和rc APM xff0c 该脚本类似C语言 xff0c 并做了相关注释 主要是一些设备自检 xff0c 启动各
  • pixhawk ArduPilot_main启动与运行分析

    上节分析 2 个系统启动脚本 xff0c 一个是 ardupilot mk PX4 ROMFS init d 里的 rcS xff0c 另一个是 rc APM xff0c 这个脚本在 rcS 里得到了调用 xff0c 也就是说 xff0c
  • pixhawk make文件分析

    由于笔者没学过Linux等系统 xff0c 对make文件所知甚少 xff0c 本节分析可能有大量错误 xff0c 只提供参考 xff0c 随着技术积累 xff0c 以后会回过头改正错误的地方 xff0c 也非常欢迎提出指导意见 其中分析大
  • pixhawk 从main开始分析传感器数据如何流动起来,以GPS为例

    void Copter loop scheduler run time available gt MAIN LOOP MICROS 0u time available 本文以GPS数据为代表 xff0c 分析数据如何从硬件驱动层慢慢的流到主
  • pixhawk uORB初步分析

    再次编辑 xff0c 因为发现大神的解析 xff0c 添加在最后 xff0c 若一般人我不告诉他 根据自己理解画的流程图 xff1a xff08 2016 05 29加 xff09 由于上节分析GPS涉及到AP GPS PX4 read函数
  • pixhawk硬件构架

    1 Phxhawk连接线路 2 Phxhawk硬件芯片列表 处理器 STM32F427 VIT6 168 Mhz 256 KB RAM 2 MB 闪存 100Pin 32位 STM32F100C8T6 xff08 48Pin xff09 故
  • ELK-日志收集工具nxlog

    ELK 日志收集工具nxlog 文章目录 ELK 日志收集工具nxlog 前言安装语法宏变量 通用模块指令格式Module 模块名FlowControlInputType 指定输入类型OutputType xff1a 指定输出类型Exec
  • pixhawk原生码rcS分析

    代码执行流程 1 编译时将 cmake configs nuttx px4fmu v2 default cmake 文件中配置的模块全部编译并烧写到固件中去 2 地面站的配置会在 flash 中生成 fs mtd params 文件 xff
  • pixhawk win编译环境搭建

    经过笔者亲自试验搭建win编译环境 xff0c 试验成功 xff0c 以下为具体步骤 问题和解决方案 其实Linux下编译会快很多 xff0c 对于后期开发会缩短等待编译的时间 xff0c 正在尝试搭建Linux编译环境 1 pixhawk
  • pixhawk PX4FMU和PX4IO最底层启动过程分析

    首先 xff0c 大体了解PX4IO 与PX4FMU各自的任务 PX4IO STM32F100 为PIXHAWK 中专用于处理输入输出的部分 输入为支持的各类遥控器 PPM SPKT DSM SBUS 输出为电调的PWM 驱动信号 它与PX