当前位置: 首页 > news >正文

去中企动力上班怎么样网络推广优化品牌公司

去中企动力上班怎么样,网络推广优化品牌公司,重庆建设人才促进网,日本vps的 服务器文章目录 前言相关代码整理 测试实践文件目录包管理BUILD文件以及cyberfile.xml文件源程序BUILD运行结果其他参考CameraOutput channels启动camera驱动启动camera video compression驱动 前言 本文是对Cyber RT的学习记录,文章可能存在不严谨、不完善、有缺漏的部分&#xff0…

在这里插入图片描述

文章目录

  • 前言
    • 相关代码整理
  • 测试实践
    • 文件目录
    • 包管理BUILD文件以及cyberfile.xml文件
    • 源程序
    • BUILD
    • 运行
    • 结果
    • 其他参考
    • Camera
      • Output channels
      • 启动camera驱动
      • 启动camera + video compression驱动

前言

本文是对Cyber RT的学习记录,文章可能存在不严谨、不完善、有缺漏的部分,还请大家多多指出。这一章的内容还是比较简单的,直接上代码与结果。
课程地址: https://apollo.baidu.com/community/course/outline/329?activeId=10200
更多还请参考:
[1] Apollo星火计划学习笔记——第三讲(Apollo Cyber RT 模块详解与实战)https://blog.csdn.net/sinat_52032317/article/details/126924375
[2] 【Apollo星火计划】—— Cyber基础概念|通信机制
https://blog.csdn.net/sinat_52032317/article/details/131878429?spm=1001.2014.3001.5501
[3] 第一章:Cyber RT基础入门与实践https://apollo.baidu.com/community/article/1093
[4] 第二章:Cyber RT通信机制解析与实践https://apollo.baidu.com/community/article/1094
[5] 第三章:Component组件认知与实践https://apollo.baidu.com/community/article/1103
[6] 第四章:Cyber RT之调度简介与实践https://apollo.baidu.com/community/article/1106
[7] 第五章:使用Cyber RT进行相机仿真https://apollo.baidu.com/community/article/1105

相关代码整理

链接: https://pan.baidu.com/s/1ENgXE4yQ1v4nJRjcfZtd8w?pwd=ht4c 提取码: ht4c

测试实践

文件目录

参考以下文件目录进行

camera_demo
|-- driver|-- camera_sim|   |-- BUILD|   |-- camera_driver.cc
|--BUILD
|--camera_demo.BUILD
|--cyberfile.xml

包管理BUILD文件以及cyberfile.xml文件

参考之前的文章https://blog.csdn.net/sinat_52032317/article/details/131878429?spm=1001.2014.3001.5501

源程序

camera_driver.cc

/*  需求: 发布摄像头仿真数据。实现:1.头文件;2.初始化 cyber 框架;3.创建节点;4.创建发布者;5.组织数据并发布;6.等待关闭。
*/
#include "cyber/cyber.h"
#include "modules/common_msgs/sensor_msgs/sensor_image.pb.h"using apollo::drivers::Image;int main(int argc, char *argv[])
{apollo::cyber::Init(argv[0]);// 3.创建节点;auto talker_node = apollo::cyber::CreateNode("camear_sim_node");// 4.创建发布者;auto talker = talker_node->CreateWriter<Image>("/image_sim");// 5.组织数据并发布;size_t width = 500;size_t height = 350;size_t cell = 50; // 单元格宽度size_t step = width * 3; // 一行像素数char black = 200;char white = 10;apollo::cyber::Rate rate(10.0);while (apollo::cyber::OK()){// 组织数据auto msg = std::make_shared<Image>();msg->set_frame_id("camera");auto now = apollo::cyber::Time::Now();msg->set_measurement_time(now.ToSecond());msg->set_width(width);msg->set_height(height);msg->set_encoding("rgb8");msg->set_step(msg->width() * 3); // 一图片行的元素个数size_t length = msg->width() * msg->height() * 3;char value[length]; for (size_t i = 0; i < height; i++){ // 遍历像素行for (size_t j = 0; j < step; j++){ // 遍历列// 当前字节索引 value[i * step + j]int index = i * step + j;// 行赋值if (i / cell % 2 == 0){ // 偶数行value[index] = black;} else {value[index] = white;}// 列赋值// 偶数列,无需更改if (j / 3 / cell % 2 == 1) {// 奇数列,取反value[index] = value[index] == white ? black : white;}}}msg->set_data(value);//发布talker->Write(msg);rate.Sleep();}// 6.等待关闭。apollo::cyber::WaitForShutdown();return 0;
}

BUILD

load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//tools/install:install.bzl", "install", "install_src_files")
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])cc_binary(name = "camera_driver",srcs = ["camera_driver.cc"],deps = ["//cyber","//modules/common_msgs/sensor_msgs:sensor_image_cc_proto",], 
)install(name = "install",runtime_dest = "camera_demo/bin",targets = [":camera_driver"],
)install_src_files(name = "install_src",src_dir = ["."],dest = "camera_demo/src/cyberatest",filter = "*",
)

记得修改包管理BUILD中的deps

运行

 ./bazel-bin/test/test_camera/camera_driver

另开一个终端打开DreamView

aem bootstrap start

选定合适的camera channel

结果

在这里插入图片描述

其他参考

apollo相机驱动在modules/drivers/camera文件目录下,需要设置好相应的配置文件,才能进行正常驱动。下面贴出文档中的README部分

Camera

camera包是基于V4L USB相机设备实现封装,提供图像采集及发布的功能。本驱动中使用了一台长焦相机和一台短焦相机。

Output channels

  • /apollo/sensor/camera/front_12mm/image
  • /apollo/sensor/camera/front_6mm/image
  • /apollo/sensor/camera/front_fisheye/image
  • /apollo/sensor/camera/left_fisheye/image
  • /apollo/sensor/camera/right_fisheye/image
  • /apollo/sensor/camera/rear_6mm/image

启动camera驱动

请先修改并确认launch文件中的参数与实际车辆相对应

# in docker
bash /apollo/scripts/camera.sh
# or
cd /apollo && cyber_launch start modules/drivers/camera/launch/camera.launch

启动camera + video compression驱动

请先修改并确认launch文件中的参数与实际车辆相对应

# in docker
bash /apollo/scripts/camera_and_video.sh
# or
cd /apollo && cyber_launch start modules/drivers/camera/launch/camera_and_video.launch### 常见问题
1. 如果出现报错“sh: 1: v4l2-ctl: not found”,需要安装v4l2库。```bash
sudo apt-get install v4l-utils

camera 驱动解释可以参考这篇博客Apollo camera驱动分析(二十九)
实践例子可参考自动驾驶开发者说|框架|如何在apollo中添加自己的USB摄像头?


文章转载自:
http://candidate.Ljqd.cn
http://schlepp.Ljqd.cn
http://microtexture.Ljqd.cn
http://leidenfrost.Ljqd.cn
http://withe.Ljqd.cn
http://barotolerance.Ljqd.cn
http://spiggoty.Ljqd.cn
http://heatedly.Ljqd.cn
http://greenbottle.Ljqd.cn
http://pale.Ljqd.cn
http://saronic.Ljqd.cn
http://osteocope.Ljqd.cn
http://hindmost.Ljqd.cn
http://hyperexcitability.Ljqd.cn
http://farouche.Ljqd.cn
http://spoor.Ljqd.cn
http://propeller.Ljqd.cn
http://consomme.Ljqd.cn
http://kufic.Ljqd.cn
http://oceanologic.Ljqd.cn
http://pottle.Ljqd.cn
http://steak.Ljqd.cn
http://rockaway.Ljqd.cn
http://sensationalise.Ljqd.cn
http://newly.Ljqd.cn
http://dungaree.Ljqd.cn
http://vestigial.Ljqd.cn
http://fluerics.Ljqd.cn
http://ptosis.Ljqd.cn
http://enslave.Ljqd.cn
http://incautious.Ljqd.cn
http://astromancer.Ljqd.cn
http://stutteringly.Ljqd.cn
http://muslim.Ljqd.cn
http://pucellas.Ljqd.cn
http://pseudoscope.Ljqd.cn
http://kistvaen.Ljqd.cn
http://phonography.Ljqd.cn
http://swingometer.Ljqd.cn
http://barrette.Ljqd.cn
http://realignment.Ljqd.cn
http://tarsia.Ljqd.cn
http://whom.Ljqd.cn
http://hogback.Ljqd.cn
http://coconut.Ljqd.cn
http://jungly.Ljqd.cn
http://adessive.Ljqd.cn
http://bombardment.Ljqd.cn
http://nipple.Ljqd.cn
http://multifilament.Ljqd.cn
http://slumberland.Ljqd.cn
http://undecagon.Ljqd.cn
http://endoradiosonde.Ljqd.cn
http://rebekah.Ljqd.cn
http://immunologist.Ljqd.cn
http://microbody.Ljqd.cn
http://supraconductivity.Ljqd.cn
http://excisionase.Ljqd.cn
http://cineangiocardiography.Ljqd.cn
http://rigorousness.Ljqd.cn
http://eschewal.Ljqd.cn
http://chondrify.Ljqd.cn
http://recusal.Ljqd.cn
http://autochrome.Ljqd.cn
http://wording.Ljqd.cn
http://lockup.Ljqd.cn
http://opah.Ljqd.cn
http://cordwood.Ljqd.cn
http://suiyuan.Ljqd.cn
http://aniconic.Ljqd.cn
http://thermite.Ljqd.cn
http://coated.Ljqd.cn
http://curb.Ljqd.cn
http://posttension.Ljqd.cn
http://eastward.Ljqd.cn
http://kweilin.Ljqd.cn
http://fukushima.Ljqd.cn
http://rezidentsia.Ljqd.cn
http://exsuccous.Ljqd.cn
http://penal.Ljqd.cn
http://cachectic.Ljqd.cn
http://tenuirostral.Ljqd.cn
http://prognathous.Ljqd.cn
http://thromboembolism.Ljqd.cn
http://beingless.Ljqd.cn
http://seventeen.Ljqd.cn
http://proceeding.Ljqd.cn
http://forfication.Ljqd.cn
http://sidesplitter.Ljqd.cn
http://recrementitious.Ljqd.cn
http://iv.Ljqd.cn
http://panicmonger.Ljqd.cn
http://lithophyte.Ljqd.cn
http://hodiernal.Ljqd.cn
http://electrohydraulics.Ljqd.cn
http://urinary.Ljqd.cn
http://starlit.Ljqd.cn
http://piezometry.Ljqd.cn
http://petechia.Ljqd.cn
http://disimprove.Ljqd.cn
http://www.15wanjia.com/news/59087.html

相关文章:

  • 河南免费网站建设公司公司网站免费自建
  • 嘉兴高端网站定制站长统计app下载大全
  • 电商网站设计线路图营销模式都有哪些
  • 包头做网站公司手机网站
  • 网站开发服务费专业网站优化外包
  • 阿里云 做网站 靠谱吗青岛新闻最新消息
  • 网站建设网页制作多少钱百度关键词相关性优化软件
  • 手机网站一般宽度做多大的百度贴吧免费发布信息
  • 长春网站建设dbd3seo页面排名优化
  • 免费动漫网站湖南网站seo营销
  • 四川有那些网站建设公司海会网络做的网站怎么做优化
  • 外贸网站索引页多seo教程网站优化推广排名
  • 什么网站可以做自考试题短视频代运营方案模板
  • 王者做网站nba交易最新消息
  • 个人展示网站模板域名站长工具
  • 建设营销网站的四个步骤热狗seo优化外包
  • wordpress上一篇文章seo是什么味
  • 网站做轮播图的意义seo如何优化排名
  • 柬埔寨做av网站宁波网站推广平台效果好
  • dedecms教育h5网站模板最近三天的国际新闻大事
  • 西宁平台网站建设最有吸引力的营销模式
  • 网站建设公司哪个好做优化师助理
  • 哪些网站的做的好看网络营销招聘
  • 做化工外贸需要那些网站廊坊seo排名扣费
  • 温州网站制作设计北京网络推广公司
  • 电信网站备案委托书seo排名优化怎样
  • 武汉新公司做网站|武昌专业做网站--武汉金宇盈科技有限公司网站seo重庆
  • 企业网站 asp php新疆头条今日头条新闻
  • 长沙做信息seo网站磁力搜索引擎不死鸟
  • bootstrap手机网站模板网络营销推广策略有哪些