Qualcomm Robotics RB5 平台软件用户指南(7)

150 篇文章 7 订阅
25 篇文章 0 订阅


4.5 Recorder:五流并发用例

有关上游 GStreamer 插件和元素的信息,请参阅 GStreamer 文档,网址为 https://gstreamer.freedesktop.org/documentation/plugins_doc.html。

4.5.1 五个启用 SHDR 的 H.264 (AVC) 编码流

先决条件:如果/etc/camera/camxoverridesettings.txtdisableAFDStatsProcessing中不存在 ,请运行以下命令以确保存在 SHDR 的相机覆盖设置。

adb shell "echo disableAFDStatsProcessing=TRUE >>
/etc/camera/camxoverridesettings.txt"
adb shell pkill qmmf-server

以下gst-launch管道提供启用 SHDR 的同步五流视频记录用例:

  • 一台 4K、两台 720p、一台 480p 和一台 240p,带 SHDR。

    gst-launch-1.0 -e qtiqmmfsrc video_2::source-index=1 video_3::source-index=1 video_4::source-index=1 name=qmmf shdr=TRUE ! video/x-h264,format=NV12,width=3840,height=2160,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=15/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux3.mp4" qmmf. ! video/x-h264,format=NV12,width=720, height=480, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux4.mp4" qmmf. ! video/x-h264,format=NV12,width=320, height=240, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux5.mp4"
    
  • 一台 1080p、两台 720p、一台 480p 和一台 240p,带 SHDR。

    gst-launch-1.0 -e qtiqmmfsrc video_2::source-index=1 video_3::source-index=1 video_4::source-index=1 name=qmmf shdr=TRUE ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=15/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux3.mp4" qmmf. ! video/x-h264,format=NV12,width=720, height=480, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux4.mp4" qmmf. ! video/x-h264,format=NV12,width=320, height=240, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux5.mp4"
    
  1. 该qtiqmmfsrc元件捕获并编码来自摄像机的一个 4K 分辨率和两个 720p 分辨率流,并从中生成剩余的 480p 和 240p 视频流。
  2. h264parse,元素mp4mux处理缓冲区并准备存储。
  3. 队列元素确保每个路径/轨道独立于另一个运行。
  4. 这些filesink元素将缓冲区存储在相应的文件中。
  5. 播放设备上的内容。
  6. 要停止用例,请按CTRL + C,使用以下命令从设备中提取录制的内容adb pull ,然后在主机 PC 上播放该内容。
adb pull /data/mux1.mp4
adb pull /data/mux2.mp4
adb pull /data/mux3.mp4
adb pull /data/mux4.mp4
adb pull /data/mux5.mp4

在这里插入图片描述

4.5.2 五个启用 SHDR 和 LDC 的 H.264/AVC 编码流

先决条件:如果/etc/camera/camxoverridesettings.txtdisableAFDStatsProcessing中不存在,请运行以下命令以确保存在SHDR 设置。 cameraoverride

adb shell "echo disableAFDStatsProcessing=TRUE >> 
/etc/camera/camxoverridesettings.txt" 
adb shell pkill qmmf-server 

以下gst-launch管道提供启用 SHDR 和 LDC 的同步 5 流视频录制用例。

1 个 4K、2 个 720p、1 个 480p 和 1 个 240p,具有 SHDR 和 LDC

gst-launch-1.0 -e qtiqmmfsrc video_2::source-index=1 video_3::source-index=1 video_4::source-index=1 name=qmmf shdr=TRUE ! video/x-h264,format=NV12,width=3840,height=2160,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=15/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux3.mp4" qmmf. ! video/x-h264,format=NV12,width=720, height=480, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux4.mp4" qmmf. ! video/x-h264,format=NV12,width=320, height=240, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux5.mp4"
  1. 该qtiqmmfsrc元件捕获并编码来自摄像机的一个 4K 分辨率和两个 720p 分辨率流,并从中生成剩余的 480p 和 240p 视频流。

  2. h264parse,元素mp4mux处理缓冲区并准备存储。

  3. 队列元素确保每个路径/轨道独立于其他路径/轨道运行。

  4. 这些filesink元素将缓冲区存储在相应的文件中。

  5. 播放设备上的内容。

  6. 要停止用例,请按CTRL + C,使用以下命令从设备中提取录制的内容adb pull ,然后在主机 PC 上播放该内容。

    adb pull /data/mux1.mp4 
    adb pull /data/mux2.mp4 
    adb pull /data/mux3.mp4 
    adb pull /data/mux4.mp4 
    adb pull /data/mux5.mp4 
    

1 个 4K、2 个 720p、1 个 480p 和 1 个 240p,具有 SHDR 和 LDC

gst-launch-1.0 -e qtiqmmfsrc video_2::source-index=1 video_3::source-index=1 video_4::source-index=1 name=qmmf shdr=TRUE ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=15/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1280,height=720, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux3.mp4" qmmf. ! video/x-h264,format=NV12,width=720, height=480, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux4.mp4" qmmf. ! video/x-h264,format=NV12,width=320,height=240, framerate=10/1 ! h264parse ! mp4mux ! queue ! filesink async=true location="/data/mux5.mp4"

GST 管道应用程序

QTIgst-pipeline-app是一个辅助工具,具有以下功能:

  • 提供与 GStreamer gst-launch-1.0工具相同的功能。
  • 提供一个选项来为管道中的任何 GST 元素设置运行时属性,从而允许在 PLAYING 状态下更改属性。

语法是gst-pipeline-app [OPTION?] DESCRIPTION.

  • [OPTION?]:支持的选项是-e或–eos-on-exit,在关闭管道之前发送 EOS 事件。
  • DESCRIPTION:由感叹号 (!) 分隔的元素列表。属性可以以属性 = 值的形式附加到元素。

当管道运行时,gst-pipeline-app会列出管道中的所有元素。如果指定了元素名称,则该元素会以该名称出现。否则,该元素将以默认名称显示。

  1. 运行视频编码管道以列出所有元素。

    gst-pipeline-app -e qtiqmmfsrc name=qmmf camera=0 ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink location=/data/output/mux.mp4
    
  2. 选择应修改属性的元素。
    所有可以更新的属性均列出并附有说明。对于上述示例,如果qtic2venc-qtic2venc0选择 ,则会列出图中所示的选项。

  3. 要选择属性,请键入选项编号和当前值。

4.6 相机静态参数用例:LDC 和 SHDR

本主题介绍相机静态参数的用例。

镜头畸变校正 (LDC)

  1. 针对 LDC 用例运行以下命令。

    gst-launch-1.0 -e qtiqmmfsrc name=qmmf ldc=TRUE qmmf.video_0 ! video/x-h264,format=NV12,width=3840,height=2160,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux.mp4"
    
  2. 播放设备上的内容。

  3. 要停止用例,请按CTRL + C,使用以下命令从设备中提取录制的内容adb pull ,然后在主机 PC 上播放该内容。

    adb pull /data/mux.mp4
    

交错高动态范围 (SHDR)

  1. 如果/etc/camera/camxoverridesettings.txt中不存在, 请运行以下命令以确保cameraoverride为 SHDR 启用。disableAFDStatsProcessing

    adb shell "echo disableAFDStatsProcessing=TRUE >>/etc/camera/camxoverridesettings.txt" 
    
    adb shell pkill qmmf-server 
    
  2. 运行以下gst-launch命令以从 qtiqmmfsrc元素启用 SHDR。

    gst-launch-1.0 -e qtiqmmfsrc name=qmmf shdr=TRUE qmmf.video_0 ! video/x-h264,format=NV12,width=3840,height=2160,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux.mp4"
    
  • 15
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要使用Robotics Toolbox创建ur5机械臂模型,您需要遵循以下步骤: 1. 安装MATLAB Robotics Toolbox。 2. 下载Universal Robots URDF文件。 3. 将URDF文件导入MATLAB中并使用robotics.URDF类读取。 4. 使用robotics.RigidBodyTree类创建机器人模型。 5. 添加所有关节和链接。 6. 定义机器人末端执行器(End Effector)。 7. 设置机器人的关节角度和末端执行器位置。 这里是一个示例代码,可以帮助您进一步了解如何使用Robotics Toolbox创建ur5机械臂模型: ``` % 安装Robotics Toolbox % 下载URDF文件 urdf = 'ur5.urdf'; ur5 = robotics.URDF(urdf); % 创建RigidBodyTree对象 robot = robotics.RigidBodyTree; % 添加链接 link1 = robotics.RigidBody('link1'); joint1 = robotics.Joint('joint1', 'revolute'); setFixedTransform(joint1, trvec2tform([0 0 0])); joint1.JointAxis = [0 0 1]; link1.Joint = joint1; addBody(robot, link1, 'base'); link2 = robotics.RigidBody('link2'); joint2 = robotics.Joint('joint2', 'revolute'); setFixedTransform(joint2, trvec2tform([0 0 0.163])); joint2.JointAxis = [1 0 0]; link2.Joint = joint2; addBody(robot, link2, 'link1'); % ... 添加更多链接和关节 % 添加末端执行器 eeBody = robotics.RigidBody('EndEffector'); setFixedTransform(eeBody.Joint, trvec2tform([0 0 0.09])); addBody(robot, eeBody, 'tool0'); % 设置关节角度和末端执行器位置 q = zeros(1,6); eePos = [0.4 0.1 0.3]; eeOri = [pi/2 0 pi/2]; tform = eul2tform(eeOri); tform(1:3, 4) = eePos; q = ik(eeBody, tform, [1 1 1 0 0 0]); show(robot, q); ``` 这个示例代码将创建一个ur5机械臂模型,并设置关节角度和末端执行器位置。您可以通过修改关节角度和末端执行器位置来控制机器人的运动。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值