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

网站关键词优化怎么做的湖南住房和城乡建设网站

网站关键词优化怎么做的,湖南住房和城乡建设网站,wordpress新闻动态不显示作者,邢台信息港房产出租1.Introduction 近期正在做全局规划局部动态规划的项目#xff0c;目前遇到的问题是#xff0c;我们如何利用C处理pgm地图文件。即将地图信息要与像素点结合起来。所以我们需要知道地图读取和处理的底层原理#xff0c;这样更好地在非ROS平台下移植。 2.Main 如下几条信息…1.Introduction 近期正在做全局规划局部动态规划的项目目前遇到的问题是我们如何利用C处理pgm地图文件。即将地图信息要与像素点结合起来。所以我们需要知道地图读取和处理的底层原理这样更好地在非ROS平台下移植。 2.Main 如下几条信息需要了解 1data[]是按照那张地图图片的自底向上自左至右逐个像素点存储的. (2) 在使用二维地图定位导航时建好的地图文件中包括 m a p . p g m map.pgm map.pgm和 m a p . y a m l map.yaml map.yaml.其中.yaml文件如下: image: map.pgm  #文件名 resolution: 0.050000  #地图分辨率 单位米/像素 origin: [-49.0286, -107.401, 0.0] #图像左下角在地图坐标下的坐标 negate: 0 #是否应该颠倒 白自由/黑的语义(阈值的解释不受影响) occupied_thresh: 0.65 #占用概率大于此阈值的像素被认为已完全占用 free_thresh: 0.196 #用率小于此阈值的像素被认为是完全空闲的需要注意的是origin: [-49.0286, -107.401, 0.0] #图像左下角在地图坐标下的坐标我们后续利用这条信息建立像素与世界坐标系之间的关系。 (3)实际上我们在路径规划实施过程中是接收到地图像素信息data[],(一维数组)然后将其复原为原来的像素坐标再进行路径规划处理。 data[]复原成地图图片像素坐标关系为 for(int i 0; imap_info_width*map_info_height; i){x i%map_info_width; //还原为像素坐标y i/map_info_width; //还原为像素坐标if(data[i] ! 0){ coutobstacle:endl;//PG.map_generator_.addCollision({x, y}, 3);PG.map_generator_.addCollision({x, y}, 3);}coutendl;} (4) 由地图坐标-图像像素坐标 基于地图的坐标转换到图像坐标系上 w x w y w_x w_y wx​wy​表示地图坐标系下的坐标resolution为分辨率,则: image_x (wx - origin_x) / resolution image_y (wy - origin_y) / resolution 5由图像像素坐标-地图坐标 image_x,image_y表示在图像像素坐标系中的坐标 w x w y w_x w_y wx​wy​表示地图坐标系下的坐标resolution为分辨率,则 wximage_x*resolutionorigin_x wyimage_y*resolutionorigin_y3.Examples 我们举了一个从地图pgm读取到处理成目标地图数据格式data[] 的例子。 int main(int argc, char **argv) {PathGenerator PG;//Read pgmcv::Mat m4 cv::imread(/home/juchunyu/20231013/globalPlanner/AStar-ROS/map/map.pgm,cv::IMREAD_GRAYSCALE);cout 图像宽为 m4.cols \t高度为 m4.rows \t通道数为 m4.channels() endl;/*for (int r 0; r m4.rows; r) {for (int c 0; c m4.cols; c) {int data m4.atunsigned char(r, c);}}cout0endl;*/// Round goal coordinatefloat goal_x 10;//round(goal_msg-pose.position.x*10)/10;float goal_y 10;//round(goal_msg-pose.position.y*10)/10;double origin[3] {-9.500000, -10.000000, 0.0};double occupied_thresh 0.65;double free_thresh 0.196;int Occupy 1;int NoOccupy 0;double map_resolution 0.05;/*vectorvectorint maze {{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },{ 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1 },{ 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1 },{ 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1 },{ 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1 },{ 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1 },{ 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1 },{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }};*/vectorvectorint maze {{ 0, 0, 0, 0, 0, 0, 0 },{ 0, 0, 0, 1, 0, 0, 0 },{ 0, 0, 0, 0, 0, 0, 0 },{ 0, 0, 0, 0, 0, 0, 0 },{ 0, 0, 0, 0, 0, 0, 0 },{ 0, 0, 0, 0, 0, 0, 0 }};vectorint data;for(int i m4.rows-1;i 0;i--){for(int j 0;j m4.cols;j){if(m4.atunsigned char(i,j)/255 free_thresh){data.push_back(Occupy);} else {data.push_back(NoOccupy);}}}/*int num 0;for(int i maze.size()-1;i 0;i--){for(int j 0;j maze[0].size();j){num;if(maze[i][j] free_thresh){data.push_back(Occupy);} else {data.push_back(NoOccupy);}}}coutcishunumendl;*/for(int i 0;idata.size();i){coutdata[i] ;}coutendl;//coutmaze.size()maze.size()endl;//coutmaze[0].size()maze[0].size()endl;//cv::imshow(res_mat, m4);//cv::waitKey(0);// map_exsit_ false;//map_info_ map_msg-info;//int map_info_width maze[0].size();//m4.cols;//int map_info_height maze.size();//m4.rows;int map_info_width m4.cols;int map_info_height m4.rows;// Generate Map, OptionsPG.map_generator_.setWorldSize({map_info_width, map_info_height}); //{x, y}PG.map_generator_.setHeuristic(AStar::Heuristic::manhattan);PG.map_generator_.setDiagonalMovement(true);cout-3endl;// Add Wallint x, y;for(int i 0; imap_info_width*map_info_height; i){x i%map_info_width;y i/map_info_width;coutiiendl;coutsum:map_info_width*map_info_heightendl;double v double(i/(map_info_width*map_info_height));coutv%endl;if(data[i] ! 0){ coutobstacle:endl;//PG.map_generator_.addCollision({x, y}, 3);PG.map_generator_.addCollision({x, y}, 3);cout(x,y) ;}coutendl;} cout-2endl; // Remmaping coordinateAStar::Vec2i target;target.x 162;//6;//2;//161;//(goal_x - origin[0]) / map_resolution;target.y 105;//3;//9;//112; //(goal_y - origin[1]) / map_resolution;AStar::Vec2i source;source.x 94;//0;//94;//(0 - origin[0]) / map_resolution;source.y 99;//99;//(0 - origin[1]) / map_resolution;cout1endl;// Find Pathauto path PG.map_generator_.findPath(source, target);cout2endl;//coutpath-x path-yendl;//nav_msgs::Path path_msg;if(path.empty()){cout\033[1;31mFail generate path!\033[0mendl;//ROS_INFO(\033[1;31mFail generate path!\033[0m);}for(auto coordinatepath.end()-1; coordinatepath.begin(); --coordinate){// geometry_msgs::PoseStamped point_pose;// Remmaping coordinate//point_pose.pose.position.x (coordinate-x map_info_.origin.position.x / map_info_.resolution) * map_info_.resolution;//point_pose.pose.position.y (coordinate-y map_info_.origin.position.y / map_info_.resolution) * map_info_.resolution;//path_msg.poses.push_back(point_pose);coutcoordinate-x coordinate-yendl;}//path_msg.header.frame_id map;// pub_robot_path_.publish(path_msg);//ROS_INFO(\033[1;36mSuccess generate path!\033[0m);// ros::spin();return 0; } 完整工程参见https://github.com/JackJu-HIT/A-star/tree/master. 4.Reference ROS-根据map.yaml进行像素坐标和map坐标的转换ROS中map、costmap数据格式
http://wiki.neutronadmin.com/news/187821/

相关文章:

  • 南昌网站建设哪家好薇网络门店管理系统
  • 手机网站制作 尺寸教你用模板做网站
  • 静态网站可以做留言板广州市住房与城乡建设厅网站
  • 龙岗开发公司网站建设有没有做兼职的网站吗
  • 免费网站建设模版云盘域名买好了怎么做网站
  • 网站建设需要的技术路线网站不同
  • 金华网站开发网站建设构造学习
  • 太原seo关键词排名哪里能搜索引擎优化
  • 网站模板编辑软件外贸网站建设定制
  • 做二手交易网站如何盈利竹子建站怎么赚钱
  • 做的好微信商城网站吗网页设计和ui设计有什么区别
  • 国外网站设计师网站一般如何做搜索功能
  • 网站建设技术网站建设新乡市红旗区建设局网站
  • 什么公司做的网站好电子商务项目策划书
  • 企业商城网站建设价格网站备案 图片大小
  • 揭阳商城网站建设建站公司分析
  • 东莞有哪些好的网站建设公司跨境电商服务
  • 潍坊奎文住房和城乡建设局网站wordpress用户名的要求
  • html企业网站系统中信建设有限责任公司深圳中信金融中心项目工期专业招标
  • 公司网站要备案吗注册资金100万的公司要多少钱
  • 福州网站定制公司做网站需要多少
  • 苏州好的做网站的公司泰安房产网签最新情况
  • 西安营销型网站网站建设开放的端口
  • linux 配置网站域名简单网页源代码
  • 竹中建设官方网站wordpress 注册验证码
  • 手机网站快速排名 软件网上做ps赚钱的网站
  • 网站的着陆页做网站和做网页的区别
  • 网站建设往年的高考题查看网站主机
  • 有什么公司建网站如何做微信小程序网站
  • 企业门户网站平台建设招标采购文件网站建设推广群