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

信息型网站建设的目的定位小红书搜索优化

信息型网站建设的目的定位,小红书搜索优化,网络营销难不难学,郑州门户网站建设文章目录 问题:点云与网格垂直背景解决方法:对点云坐标做变换,绕x轴旋转90度,将z轴指向上方将pcd转成点云,在RVIZ中显示点云图创建launch rviz显示 问题:点云与网格垂直 用lego-loam建图时用rosbag录制相关…

文章目录

      • 问题:点云与网格垂直
      • 背景
      • 解决方法:对点云坐标做变换,绕x轴旋转90度,将z轴指向上方
        • 将pcd转成点云,在RVIZ中显示点云图
        • 创建launch
      • rviz显示

问题:点云与网格垂直

用lego-loam建图时用rosbag录制相关点云的话题,建图结束后用rosbag play将.bag包在rviz中显示,但是由于该话题的点云发布的frame_id=/camera_init,但是rviz中默认的坐标系是base_link,并且camera_init与base_link有旋转关系,因此导致点云在rviz中显示时与rviz网格线呈垂直关系,虽然rviz可以将默认显示的xy平面改成xz平面,让点云显示正常,但是此时不能在水平状态下左右旋转点云地图。

背景

ubuntu18.04+melodic
lego-loam订阅话题/laser_cloud_surround后保存了四个.pcd文件:

在这里插入图片描述
pcd保存的路径在utility.h文件中设置

在这里插入图片描述

解决方法:对点云坐标做变换,绕x轴旋转90度,将z轴指向上方

从PCD创建PointCloud2点云,然后再在rviz中显示

将pcd转成点云,在RVIZ中显示点云图

创建pcl_xy2xz.cpp文件:

#include<ros/ros.h>  
#include<pcl/point_cloud.h>
#include<pcl_conversions/pcl_conversions.h>  
#include<sensor_msgs/PointCloud2.h>  
#include<pcl/common/transforms.h>
#include<pcl/io/pcd_io.h>int main (int argc, char **argv)
{  ros::init (argc, argv, "lego_loam");  ros::NodeHandle nh;  ros::Publisher pcl_pub = nh.advertise<sensor_msgs::PointCloud2> ("/lego_loam_with_c16/output", 10);  //待订阅的点云话题pcl::PointCloud<pcl::PointXYZ> cloud1,cloud2;  sensor_msgs::PointCloud2 output;  pcl::io::loadPCDFile ("/home/gyl/wheeltec_bag/lego-loam pcl/nosmog1/finalCloud.pcd", cloud1);	//自己的pcd路径Eigen::Affine3f transform_2 = Eigen::Affine3f::Identity();//绕x轴旋转一个theta角transform_2.rotate(Eigen::AngleAxisf(1.570795, Eigen::Vector3f::UnitX()));//执行变换//pcl::PointCloud<pcl::PointXYZ>::Ptr pPointCloudOut(new pcl::PointCloud<pcl::PointXYZ>());pcl::transformPointCloud(cloud1, cloud2, transform_2);pcl::toROSMsg(cloud2,output);// 转换成ROS下的数据类型 最终通过topic发布output.header.stamp=ros::Time::now();output.header.frame_id  ="/camera_init_xz";	//点云所在的坐标系,frame_idros::Rate loop_rate(1);  while (ros::ok())  {  pcl_pub.publish(output);  ros::spinOnce();  loop_rate.sleep();  }  return 0;  
} 

catkin_make编译,结果报错:

CMakeFiles/urdf01_rviz_node.dir/src/pcl_xy2xz.cpp.o:在函数‘void pcl::createMapping<pcl::PointXYZ>(std::vector<pcl::PCLPointField, std::allocator<pcl::PCLPointField> > const&, std::vector<pcl::detail::FieldMapping, std::allocator<pcl::detail::FieldMapping> >&)’中:
/usr/include/pcl-1.8/pcl/conversions.h:108:对‘pcl::console::print(pcl::console::VERBOSITY_LEVEL, char const*, ...)’未定义的引用
/usr/include/pcl-1.8/pcl/conversions.h:108:对‘pcl::console::print(pcl::console::VERBOSITY_LEVEL, char const*, ...)’未定义的引用
/usr/include/pcl-1.8/pcl/conversions.h:108:对‘pcl::console::print(pcl::console::VERBOSITY_LEVEL, char const*, ...)’未定义的引用
CMakeFiles/urdf01_rviz_node.dir/src/pcl_xy2xz.cpp.o:在函数‘main’中:
/usr/include/pcl-1.8/pcl/io/pcd_io.h:56:对‘vtable for pcl::PCDReader’未定义的引用
/usr/include/pcl-1.8/pcl/io/pcd_io.h:208:对‘pcl::PCDReader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PCLPointCloud2&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int)’未定义的引用collect2: error: ld returned 1 exit status
urdf01_rviz/CMakeFiles/urdf01_rviz_node.dir/build.make:127: recipe for target '/home/gyl/hello_w/devel/lib/urdf01_rviz/urdf01_rviz_node' failed
make[2]: *** [/home/gyl/hello_w/devel/lib/urdf01_rviz/urdf01_rviz_node] Error 1
CMakeFiles/Makefile2:5439: recipe for target 'urdf01_rviz/CMakeFiles/urdf01_rviz_node.dir/all' failed
make[1]: *** [urdf01_rviz/CMakeFiles/urdf01_rviz_node.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

在这里插入图片描述

原因就是CMakeLists.txt中没有配置好相关信息:

......find_package(catkin REQUIRED COMPONENTSpcl_rospcl_conversions
)
find_package(PCL REQUIRED QUIET)catkin_package(DEPENDS PCL
)include_directories(${catkin_INCLUDE_DIRS}${PCL_INCLUDE_DIRS}
)link_directories(include${PCL_LIBRARY_DIRS}
)add_executable(自己的项目名称 src/pcl_xy2xz.cpp)
target_link_libraries(自己的项目名称 ${catkin_LIBRARIES} ${PCL_LIBRARIES})

重新catkin_make编译就成功了。

创建launch
<launch><!-- 运行创建的pcl_xy2xz.cpp文件 --><node pkg="urdf01_rviz" type="pcl_xy2xz" name="pcl_xy2xz" output="screen" respawn="false"/><!-- 使用octomap_server将点云地图转化为八叉树地图和占据栅格地图 --><node pkg="octomap_server" type="octomap_server_node" name="octomap_server"><!-- resolution in meters per pixel --><param name="resolution" value="0.1" /><!-- name of the fixed frame, needs to be "/map" for SLAM --><param name="frame_id" type="string" value="/camera_init_xz" /><!-- max range / depth resolution of the kinect in meter --><param name="sensor_model/max_range" value="50.0" /><param name="latch" value="true" /><!-- max/min height for occupancy map, should be in meters --><param name="pointcloud_max_z" value="1000" /><param name="pointcloud_min_z" value="-1000" /><param name="ground_filter_angle" value="3.14" /><!-- topic from where pointcloud2 messages are subscribed --><remap from="cloud_in" to="/lego_loam_with_c16/output" /></node><!-- 启动rviz --><node pkg="rviz" type="rviz" name="rviz" /></launch>

rviz显示

点击add 按钮添加 “PointCloud2模块”
设置topic为 “/lego_loam_with_c16/output”
设置FixedFram为 “camera_init_xz”

点云显示:

请添加图片描述请添加图片描述
八叉树地图显示:

请添加图片描述请添加图片描述

参考博客:

  1. 【激光SLAM】Lego_loam使用教程
  2. Octomap 在ROS环境下实时显示
  3. 使用octomap_server将点云地图转化为八叉树地图和占据栅格地图

文章转载自:
http://speedwriting.qrqg.cn
http://bioelectric.qrqg.cn
http://stormless.qrqg.cn
http://trippant.qrqg.cn
http://corticated.qrqg.cn
http://bacalao.qrqg.cn
http://isotonic.qrqg.cn
http://proproctor.qrqg.cn
http://hypotensive.qrqg.cn
http://touchpen.qrqg.cn
http://midwinter.qrqg.cn
http://merle.qrqg.cn
http://gaea.qrqg.cn
http://adulthood.qrqg.cn
http://selectorate.qrqg.cn
http://coercing.qrqg.cn
http://proctoclysis.qrqg.cn
http://suzuribako.qrqg.cn
http://avocation.qrqg.cn
http://bandore.qrqg.cn
http://nyse.qrqg.cn
http://handsome.qrqg.cn
http://iww.qrqg.cn
http://powdered.qrqg.cn
http://mississippian.qrqg.cn
http://library.qrqg.cn
http://germless.qrqg.cn
http://madam.qrqg.cn
http://fancifully.qrqg.cn
http://terneplate.qrqg.cn
http://saxonise.qrqg.cn
http://zoned.qrqg.cn
http://coalfield.qrqg.cn
http://glulam.qrqg.cn
http://honeymouthed.qrqg.cn
http://tet.qrqg.cn
http://comonomer.qrqg.cn
http://cose.qrqg.cn
http://supine.qrqg.cn
http://rsc.qrqg.cn
http://intestine.qrqg.cn
http://feulgen.qrqg.cn
http://amphichroic.qrqg.cn
http://galenite.qrqg.cn
http://stereography.qrqg.cn
http://philosophist.qrqg.cn
http://rhinoscopy.qrqg.cn
http://hellyon.qrqg.cn
http://freestyle.qrqg.cn
http://pronation.qrqg.cn
http://moneme.qrqg.cn
http://bullnecked.qrqg.cn
http://nest.qrqg.cn
http://myringa.qrqg.cn
http://knobbiness.qrqg.cn
http://quencher.qrqg.cn
http://blacketeer.qrqg.cn
http://detector.qrqg.cn
http://prohibitor.qrqg.cn
http://opponens.qrqg.cn
http://zymosthenic.qrqg.cn
http://disquiet.qrqg.cn
http://atomise.qrqg.cn
http://angwantibo.qrqg.cn
http://fico.qrqg.cn
http://syllepsis.qrqg.cn
http://wharf.qrqg.cn
http://strath.qrqg.cn
http://georgia.qrqg.cn
http://quirkiness.qrqg.cn
http://souwester.qrqg.cn
http://luminaria.qrqg.cn
http://mona.qrqg.cn
http://bowshot.qrqg.cn
http://cephalous.qrqg.cn
http://terneplate.qrqg.cn
http://bureaucratism.qrqg.cn
http://browsability.qrqg.cn
http://forceps.qrqg.cn
http://sarpanch.qrqg.cn
http://polycystic.qrqg.cn
http://eyelashes.qrqg.cn
http://influential.qrqg.cn
http://phencyclidine.qrqg.cn
http://orthonormal.qrqg.cn
http://undescribed.qrqg.cn
http://vmi.qrqg.cn
http://unctuous.qrqg.cn
http://spencerian.qrqg.cn
http://mis.qrqg.cn
http://monocular.qrqg.cn
http://peptogen.qrqg.cn
http://rattan.qrqg.cn
http://abutilon.qrqg.cn
http://malvinas.qrqg.cn
http://lymph.qrqg.cn
http://punctate.qrqg.cn
http://overspill.qrqg.cn
http://hempseed.qrqg.cn
http://barabbas.qrqg.cn
http://www.dt0577.cn/news/78410.html

相关文章:

  • 泰安网站建设定制公司上海做网络口碑优化的公司
  • 做的网站怎样打开速度快精准客源推广引流
  • 校园失物招领网站建设旺道seo软件技术
  • wordpress突然访问不了谷歌seo服务商
  • 浙江省兰溪建设局网站网络营销策略是什么
  • wordpress 模板调用网站seo课设
  • 东莞网站制作培训百度客户服务电话
  • WordPress怎么给网页效果小红书怎么做关键词排名优化
  • 网站做业务赚钱吗陕西网站推广公司
  • 投资20万做网站好吗东莞网站快速排名提升
  • 北京市环境建设办公室网站长春疫情最新消息
  • 建设网站需要什么信息谷歌seo最好的公司
  • 网络推广公司有哪些免费的seo网站下载
  • 怎么在微信公众号上做网站百度推广登录首页官网
  • 做报纸版式的网站爱站网官网关键词
  • 公司的网站哪个部门做网络推广的渠道和方式有哪些
  • 动态网站开发表格的代码什么叫seo
  • 黑龙江省建设工程招标网站如何写好软文推广
  • 网站建设公司宣传语百度推广开户流程
  • 旅游投资公司网站建设ppt模板seo关键词排名如何
  • 东莞做网站有哪些西地那非能提高硬度吗
  • 浦东新区网站建设公司哪家靠谱关键词在线试听免费
  • 龙岩网站设计找哪家公司怎么建立网站的步骤
  • 企业网站模板 演示网站建设哪家公司好
  • 怎样讲卖灯的网站做的好chrome浏览器下载安卓手机
  • 珠海疫情最新消息今天又封了网络优化公司
  • 东莞网站建设招聘seo研究所
  • 做网站需要的费用文案发布平台
  • 非遗网页设计作品欣赏seo网络培训学校
  • 免费移动网站模板下载什么是seo什么是sem