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

Apollo10.0学习——cyber常用指令

cyber常用指令

  • 简介
  • cyber_visualizer
  • cyber_monitor
  • cyber_channel
  • cyber_node
  • cyber_service
  • cyber_launch
  • cyber_recorder
  • cyber_performance
  • rosbag_to_record
  • cyber_bridge
  • 其他apollo常用的指令

数据集:

wget https://apollo-system.cdn.bcebos.com/dataset/6.0_edu/demo_sensor_data.tar.xz -P $HOME/.apollo/resources/records/
wget https://apollo-system.cdn.bcebos.com/dataset/6.0_edu/demo_3.5.record -P $HOME/.apollo/resources/records/

数据集需要放在$HOME/.apollo/resources/records/下进行播放。

简介

  • cyber_visualizer: 可视化工具,可以用来显示cyber RT的channel中的数据,一般用来作为激光点云和摄像头数据的可视化工具。
  • cyber_monitor: 该命令可以在terminal中实时显示cyber所有channel的信息。通道信息的默认显示为红色。但是,如果有数据流过通道,则通道的相应行显示为绿色。
  • cyber_node: 该命令行工具用于打印Cyber RT节点信息。
  • cyber_channel: 打印Cyber RT通道信息。
  • cyber_service: 打印cyber RT节点信息。
  • cyber_recorder: 数据的录制回放工具,它提供了许多有用的功能,包括记录文件、回放记录文件、分割记录文件、检查记录文件信息等。
  • cyber_launch: 该命令用于加载模块。
  • rosbag_to_record: 该命令行工具用于将ROS系统的rosbag工具记录的消息文件转换Apollo Cyber RT提供的记录文件。

cyber_visualizer

cyber_visualizer 是用于显示通道数据的可视化工具。可视化点云,地图等.

cyber_monitor

显示通道内容

// 帮助
cyber_monitor -h
// 监测一个指定的 channel 信息
cyber_monitor -c ChannelName
/*  
其它常用命令介绍:
ESC | q               ---- 退出
Backspace             ---- 后退
h | H                 ---- 显示帮助页
PageDown | Ctrl+d     ---- 上一页
PageUp | Ctrl+u       ---- 下一页
Up, down | w, s keys  ---- 上下移动当前的高亮行
Right arrow | d key   ---- 进入高亮行, 显示高亮行数据的详细信息
Left arrow | a key    ---- 从当前界面返回上一层界面
Enter key             ---- 与 d 键相同
f | F ---- 显示数据帧频率
t | T ---- 显示 channel 消息类型
Space ---- 关闭|开启 channel (仅在 channel 有数据到达时有效;channel 关闭后会变成黄色)
i | I ---- 显示 channel 的 Reader 和 Writer 信息
b | B ---- 显示 channel 消息内容
n | N ---- 显示消息中 RepeatedField 的下一条数据
m | M ---- 显示消息中 RepeatedField 的上一条数据
*/

cyber_channel

cyber_channel -h          # 全局帮助
cyber_channel [子命令] -h  # 特定子命令帮助(如 `cyber_channel info -h`)
# 显示当前系统中所有活跃的通道名称。
cyber_channel list
# 显示指定通道的详细元数据,包括消息类型、发布者节点、订阅者节点、消息频率**(Hz)与**带宽**(Bw)
cyber_channel info <channel_name>
# 实时输出指定通道的消息内容(需 ProtoBuf 消息类型支持)。
cyber_channel echo <channel_name>
# 仅显示前10条消息
cyber_channel echo -n 10 /apollo/sensor/camera/image  
# 计算并显示消息的实时发布频率(Hz)。
cyber_channel hz <channel_name>
# 统计通道消息的每秒数据传输量(带宽)。
cyber_channel bw <channel_name>
# 返回通道消息的 ProtoBuf 类型全称。
cyber_channel type <channel_name>
# 通过管道重定向输出至文件
cyber_channel hz /apollo/sensor/gnss/odometry > hz_log.txt

cyber_node

cyber_node -h          # 全局帮助
cyber_node list
cyber_node info

cyber_service

cyber_service -h          # 全局帮助
cyber_service list
cyber_service info

cyber_launch

cyber_launch  -h
cyber_launch    start    [launch file]  # 启动launch文件
cyber_launch    stop    [launch file]  # 停止launch文件

cyber_recorder

cyber_recorder    -h            # 帮助信息
cyber_recorder	info	        # 显示包信息
cyber_recorder	play	        # 播放包
cyber_recorder	record	        # 录制包
cyber_recorder	split	        # 拆分包数据
cyber_recorder	recover	        # 修复包数据

扩展

$ cyber_recorder record -h
usage: cyber_recorder record [options]-o, --output <file>			output record file-a, --all				record all-c, --white-channel <name>		only record the specified channel-k, --black-channel <name>		not record the specified channel-i, --segment-interval <seconds>	record segmented every n second(s)-m, --segment-size <MB>			record segmented every n megabyte(s)-h, --help				show help message-C, --cpu-profule				profile cpu info-H, --heap-profule				profile heap info
$ cyber_recorder play -h
usage: cyber_recorder play [options]-f, --file <file>			input record file-a, --all				play all-c, --white-channel <name>		only play the specified channel-k, --black-channel <name>		not play the specified channel-l, --loop				loop play-r, --rate <1.0>			multiply the play rate by FACTOR-b, --begin 2018-07-01-00:00:00	play the record begin at-e, --end 2018-07-01-00:01:00		play the record end at-s, --start <seconds>			play started at n seconds-d, --delay <seconds>			play delayed n seconds-p, --preload <seconds>			play after trying to preload n second(s)-h, --help				show help message
# 例如
cyber_recorder play -f sensor_rgb.record -loop
cyber_recorder play -f 20250521141500.record  -r 0.2 -loop
$ cyber_recorder split -h
usage: cyber_recorder split [options]-f, --file <file>			input record file-o, --output <file>			output record file-c, --white-channel <name>		only split the specified channel-k, --black-channel <name>		not split the specified channel-b, --begin 2018-07-01-00:00:00	split the record begin at-e, --end 2018-07-01-00:01:00		split the record end at-h, --help				show help message
$ cyber_recorder recover -h
usage: cyber_recorder recover [options]-f, --file <file>			input record file-o, --output <file>			output record file-h, --help				show help message

cyber_performance

性能分析
执行指令后再浏览器打开localhost:5000
参考链接

rosbag_to_record

该命令行工具用于将ROS系统的rosbag工具记录的消息文件转换Apollo Cyber RT提供的记录文件。

cyber_bridge

与ros通讯参考链接

其他指令

# 待定
cyber_benchmark         
cyber_benchmark_writer     
cyber_benchmark_reader 
cyber_record_parser   

其他apollo常用的指令

# 编译
./apollo.sh build cyber
# 或者
bazel build //cyber/examples/common_component_example/...# 设置环境变量,将log输出到终端
source cyber/setup.bash
export GLOG_alsologtostderr=1
# 启动组件
# 方法一(推荐):使用 Launch 文件启动
cyber_launch start cyber/examples/common_component_example/common.launch# 方法二:使用 DAG 文件启动
mainboard -d cyber/examples/common_component_example/common.dag
# 使用 DAG 文件启动
# 再打开两个终端,分别运行以下命令。
source cyber/setup.bash
export GLOG_alsologtostderr=1
bazel-bin/cyber/examples/common_component_example/channel_test_writer
# 终端二
source cyber/setup.bash
export GLOG_alsologtostderr=1
bazel-bin/cyber/examples/common_component_example/channel_prediction_writer
http://www.xdnf.cn/news/560953.html

相关文章:

  • windows7安装node18
  • DeepSeek源码解构:从MoE架构到MLA的工程化实现
  • 基于 Node.js 的 HTML 转 PDF 服务
  • 在C#中对List<T>实现多属性排序
  • PostgreSQL日常维护
  • FastAPI 支持文件下载和上传
  • Axure项目实战:智慧运输平台后台管理端-订单管理1(多级交互)
  • PDF 文档结构化工具对比:Marker 与 MinerU
  • 整除的进一步性质与最小公倍数
  • 【深度剖析】三一重工的数字化转型(上1)
  • 11-码蹄集600题基础python篇
  • 【Linux高级全栈开发】2.2.1 Linux服务器百万并发实现2.2.2 Posix API与网络协议栈
  • 智能指针RAII
  • springboot3+vue3融合项目实战-大事件文章管理系统-文章分类也表查询(条件分页)
  • 年会招标抽奖活动软件———仙盟创梦IDE
  • 【后端】【UV】【Django】 `uv` 管理的项目中搭建一个 Django 项目
  • Mysql索引实战1
  • 【人工智能发展史】从黎明到曙光01
  • 回溯法求解N皇后问题
  • 力扣-有效三角形的个数
  • 超低延迟音视频直播技术的未来发展与创新
  • (2025小白全踩坑版)【OpenHarmony】移植 3.1 版本系统到 STM32F407ZG开发板
  • 提问的艺术
  • 华为云Flexus+DeepSeek征文|Flexus云服务器Dify-LLM资源部署极致体验Agent
  • Linux云计算训练营笔记day13[CentOS 7 find、vim、vimdiff、ping、wget、curl、RPM、YUM]]
  • labview硬件部分——压力测量
  • labview——控制继电器模块
  • Tiny C 编译器中,如何实现宏展开和头文件包含的预处理逻辑?
  • 【HarmonyOS Next之旅】DevEco Studio使用指南(二十五) -> 端云一体化开发 -> 业务介绍(二)
  • 【深度学习】多目标融合算法(六):渐进式分层提取模型PLE(Progressive Layered Extraction)