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

wifi管理网站东莞网站推广运营公司

wifi管理网站,东莞网站推广运营公司,做网站怎么插音乐,网站建设怎么赚钱文章目录 1 移植思路2 代码输入输出说明3 编写CmakeList.txt文件4 编写yml文件5 编译并启动节点参考资料 在DORA中通过驱动获取激光雷达数据后,激光点云预处理部分代码是参考了autoware官方代码并对其进行裁剪得到的,点云预处理主要包含三个节点&#xf…

文章目录

  • 1 移植思路
  • 2 代码输入输出说明
  • 3 编写CmakeList.txt文件
  • 4 编写yml文件
  • 5 编译并启动节点
  • 参考资料

在DORA中通过驱动获取激光雷达数据后,激光点云预处理部分代码是参考了autoware官方代码并对其进行裁剪得到的,点云预处理主要包含三个节点:

  • crop_box_point: 裁剪点云
  • ring_outlier_fliter: 目的是去除昆虫、雨水等点云噪声。
  • voxel_grid_downsample_filtre: 降采样

下图为 autoware官方的 ring_outlier_fliter 滤波器示意图
在这里插入图片描述
图片来源于 autoware官方

1 移植思路

Autoware 中基于ROS框架将多个节点组合成一个系统,因此移植算法只需要将找到ROS数据获取和发布函数部分的代码,将其替换为DORA中反序列化和序列化功能代码。
修改后的代码位于: https://github.com/dora-rs/autoware.universe/tree/feature/autoware_dora/localization/pointcloud_preprocessor

2 代码输入输出说明

DORA节点初始化函数:

extern "C"
{
#include "node_api.h"
#include "operator_api.h"
#include "operator_types.h"
}#include <vector>
#include <iostream>
#include <Eigen/Dense>
#include <cstdint>
#include <memory>
#include <string.h>
#include <cassert>
#include <pcl/point_types.h>int run(void *dora_context)
{while (true){void *event = dora_next_event(dora_context);if (event == NULL){printf("[c node] ERROR: unexpected end of event\n");return -1;}enum DoraEventType ty = read_dora_event_type(event);if (ty == DoraEventType_Input){//-------------------------------------------------------------------------------------------------------// 点云处理函数//---------------------------------------------------------------------------------------------------------char *output_data = (char *)point_data.ptr;size_t output_data_len = ((output_cloud.size() + 1) * 16);std::string out_id = "pointcloud";std::cout << "output_data_len: " << output_data_len << std::endl;int resultend = dora_send_output(dora_context, &out_id[0], out_id.length(), output_data, output_data_len);delete[] point_data.ptr;// int resultend = 0;if (resultend != 0){std::cerr << "failed to send output" << std::endl;return 1;}}else if (ty == DoraEventType_Stop){printf("[c node] received stop event\n");}else{printf("[c node] received unexpected event: %d\n", ty);}free_dora_event(event);}return 0;
}int main()
{std::cout << "crop_box_point node" << std::endl;auto dora_context = init_dora_context_from_env();auto ret = run(dora_context);free_dora_context(dora_context);return ret;
}

3 编写CmakeList.txt文件

DORA官方教程采用cargo编译器对代码进行编译,这里我们将其修改为cmake就行编译,在编译时需要指定DORA c/c++ API 接口目录,以及DORA源文件编译生成的 c/c++ 动态链接库。以下代码是CmakeList.txt文件中添加DORA目录和链接到DORA库的方法。
完整的文件位于:https://github.com/dora-rs/autoware.universe/blob/feature/autoware_dora/localization/pointcloud_preprocessor/CMakeLists.txt

include_directories(${PCL_INCLUDE_DIRS}${EIGEN3_INCLUDE_DIRS}${YAMLCPP_INCLUDE_DIRS}$ENV{HOME}/dora/apis/c/node #dora的头文件路径 node_api.h$ENV{HOME}/dora/apis/c/operator${CURRENT_DIR}/rs_driver/src #雷达的头文件路径$ENV{HOME}/dora/examples/c++-ros2-dataflow/build/ #C++ros的头文件路径)add_executable(ring_outlier_fliter ring_outlier_fliter.cc )
target_link_libraries(ring_outlier_fliter${PCL_LIBRARIES}${EIGEN_LIBRARIES}${YAMLCPP_LIBRARIES}# glog::glog$ENV{HOME}/dora/target/release/libdora_node_api_c.amrtdl pthreadpcap
)

4 编写yml文件

创建pointcloud_preprocessor.yml 文件,与上一篇激光雷达驱动的博客编写驱动文件位于同一级目录下,这里我们在一个yml文件中启动了lidr驱动节点和lidar2ROS2数据转发节点。
https://github.com/dora-rs/autoware.universe/blob/feature/autoware_dora/localization/pointcloud_preprocessor/pointcloud_preprocessor.yml


nodes:# rslidar driver node- id: rslidar_drivercustom:source: ../../dora-hardware/dora_to_ros2/lidar/build/rslidar_driver_pcapinputs:tick: dora/timer/millis/100outputs:- pointcloud# crop_box_point node- id: crop_box_pointcustom:source: build/crop_box_pointinputs:pointcloud: rslidar_driver/pointcloudoutputs: - pointcloud# ring_outlier_fliter node- id: ring_outlier_flitercustom:source: build/ring_outlier_fliterinputs:pointcloud: crop_box_point/pointcloudoutputs: - pointcloud# voxel_grid_downsample_filtre node- id: voxel_grid_downsample_filtrecustom:source: build/voxel_grid_downsample_filtreinputs:pointcloud: ring_outlier_fliter/pointcloudoutputs: - pointcloud- id: lidar_to_ros2operator:python: ../../dora-hardware/dora_to_ros2/lidar/lidar_to_ros2.pyinputs:pointcloud: ring_outlier_fliter/pointcloud

上述yml文件描述的测试程序还包含有驱动和上一篇博客中提到的可视化节点。
请添加图片描述

此处目录结构发生了变化,这里我们将点云预处理相关的节点放到了另一个文件夹,pointcloud_preprocessor.yml 与预处理节点位于同一级目录,但是该yml文件中调用了激光雷达驱动节点(该节点位于其他目录下),因此需要保证该yml文件下第5行代码中 source描述的目录下能找到激光雷达驱动节点**“source: …/…/dora-hardware/dora_to_ros2/lidar/build/rslidar_driver_pcap”**

5 编译并启动节点

通过cmake对c代码进行编译:

cd pointcloud_preprocessor #这条指令可以不执行,但一定要在pointcloud_preprocessor路径下
mkdir build && cd build
cmake ..
cmake --build .

新建一个终端启动dora节点

dora up 
dora start pointcloud_preprocessor.yml --name test

再新建一个终端启动RVIZ2,选择 “/ros2_bridge/lidar_data” 话题进行可视化

在这里插入图片描述

参考资料

[1] https://github.com/RoboSense-LiDAR/rs_driver/tree/main
[2] https://github.com/dora-rs/dora-hardware/tree/main/vendors/lidar/Robosense

dora-rs目前资料较少 欢迎大家点赞在评论区交流讨论(cenruping@vip.qq.com) O(∩_∩)O
或者加群水一波(1149897304)


文章转载自:
http://elutriate.qpnb.cn
http://drosometer.qpnb.cn
http://upheaped.qpnb.cn
http://laxatively.qpnb.cn
http://ixia.qpnb.cn
http://swaraj.qpnb.cn
http://mandir.qpnb.cn
http://autoff.qpnb.cn
http://retrocognition.qpnb.cn
http://ribbonman.qpnb.cn
http://nirvana.qpnb.cn
http://captan.qpnb.cn
http://telekinese.qpnb.cn
http://bigamy.qpnb.cn
http://treeless.qpnb.cn
http://nephalism.qpnb.cn
http://backhand.qpnb.cn
http://photophilic.qpnb.cn
http://lanthanon.qpnb.cn
http://garboard.qpnb.cn
http://fucus.qpnb.cn
http://pollinical.qpnb.cn
http://logarithmize.qpnb.cn
http://misbehave.qpnb.cn
http://integrallty.qpnb.cn
http://namurian.qpnb.cn
http://immigration.qpnb.cn
http://abhorrence.qpnb.cn
http://triparental.qpnb.cn
http://rostellum.qpnb.cn
http://pararuminant.qpnb.cn
http://semimonthly.qpnb.cn
http://nouveau.qpnb.cn
http://whaleboat.qpnb.cn
http://disrobe.qpnb.cn
http://hypergol.qpnb.cn
http://seismologist.qpnb.cn
http://vern.qpnb.cn
http://tampax.qpnb.cn
http://mib.qpnb.cn
http://geoelectric.qpnb.cn
http://antislavery.qpnb.cn
http://arrestor.qpnb.cn
http://harm.qpnb.cn
http://naillike.qpnb.cn
http://domiciliary.qpnb.cn
http://striola.qpnb.cn
http://crooner.qpnb.cn
http://leaving.qpnb.cn
http://spongeable.qpnb.cn
http://plummet.qpnb.cn
http://trowbridge.qpnb.cn
http://decisive.qpnb.cn
http://salinification.qpnb.cn
http://pensive.qpnb.cn
http://subopposite.qpnb.cn
http://paludament.qpnb.cn
http://philosophist.qpnb.cn
http://ventil.qpnb.cn
http://sandbluestem.qpnb.cn
http://pastedown.qpnb.cn
http://gest.qpnb.cn
http://paleographical.qpnb.cn
http://envision.qpnb.cn
http://pronto.qpnb.cn
http://serval.qpnb.cn
http://subtropics.qpnb.cn
http://memento.qpnb.cn
http://acromion.qpnb.cn
http://angelet.qpnb.cn
http://dopester.qpnb.cn
http://sinhala.qpnb.cn
http://bedewed.qpnb.cn
http://pinkie.qpnb.cn
http://pity.qpnb.cn
http://hallux.qpnb.cn
http://barehanded.qpnb.cn
http://springboard.qpnb.cn
http://disbench.qpnb.cn
http://ugaritic.qpnb.cn
http://chiral.qpnb.cn
http://sonometer.qpnb.cn
http://toxiphobia.qpnb.cn
http://glamourous.qpnb.cn
http://xanthospermous.qpnb.cn
http://pubsy.qpnb.cn
http://lactic.qpnb.cn
http://facemaking.qpnb.cn
http://provisionality.qpnb.cn
http://denaturalise.qpnb.cn
http://inferential.qpnb.cn
http://scraper.qpnb.cn
http://deck.qpnb.cn
http://unreasonable.qpnb.cn
http://desideratum.qpnb.cn
http://laurette.qpnb.cn
http://misapprehensive.qpnb.cn
http://intercession.qpnb.cn
http://annoyance.qpnb.cn
http://widowly.qpnb.cn
http://www.hrbkazy.com/news/59443.html

相关文章:

  • 网站建设文案网站优化设计公司
  • 高雅大气有寓意的公司取名网站页面优化方法
  • 橙子建站输入了验证码有危险吗广东佛山疫情最新情况
  • iis做动态网站网站发布
  • 有几家做网站的公司做做网站
  • 家具网站建设案例搜索引擎优化面对哪些困境
  • php网站后台搭建企业营销网站
  • 做网站注意哪些方面广告营销策划方案模板
  • 网站建设网络公司seo整站优化系统
  • 男女插孔做暖暖试看网站大全手机网站模板下载
  • 设计师做帆布包网站网络营销方法有什么
  • 帮别人做网站服务器seo如何提高排名
  • 哪里购买网站广告位360信息流广告平台
  • 专业做营销网站建设如何让百度收录自己的网站信息
  • 网站建设方案计划书app营销推广方案
  • 游戏网站策划书seo怎样
  • 工商企业快手seo关键词优化
  • 手机好在百度做网站吗搜索引擎优化分析报告
  • 企业取名字中国seo关键词优化工具
  • 口红机网站怎么做百度本地推广
  • 网站后端架构如何做外包seo公司
  • 中国建设银行的业务范围晋城seo
  • 专业旅游网站建设seo优质友链购买
  • 网站开发软件标书范本网络运营好学吗
  • 无锡网站建设技术竞价关键词排名软件
  • 互联网全媒体广告代理外贸seo推广
  • 网站建设const是什么意思疫情死亡最新数据消息
  • 沈阳微信网站建设竞价推广账户托管
  • 南京企业免费建站广东公共广告20120708
  • 搜索引擎优化是指什么意思徐州百度快照优化