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

3.1 Hector_mapping初体验

1.初体验

下载依赖

sudo apt install ros-noetic-hector-mapping

构建仿真环境

roslaunch wpr_simulation wpb_stage_slam.launch 

运行SLAM

rosrun hector_mapping hector_mapping 

再新建终端

rosrun rviz rviz

注意终端管理

新建终端,打开操作杆

osrun rqt_robot_steering rqt_robot_steering 

可视化效果

2.launch启动

新建SLAM包

catkin_create_pkg slam_pkg roscpp rospy std_msgs

新建launch'文件,键入以下代码

<launch><includev file="$(find wpr_simulation)/launch/wpb_stage_slam.launch"/>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping"/>
<node pkg="rviz" type="rviz" name="rviz"/>
<node pkg="rqt_robot_steering" type="rqt_robot_steering" name="rqt_robot_steering"/></launch>

保存后编译,并运行命令

roslaunch slam_pkg hector.launch

使用配置文件启动rviz

rosrun rviz rviz -d /home/wisdom/catkin_ws/src/slam_pkg/rviz/slam.rviz

 或者直接launch文件,增加rviz参数args

<launch><include file="$(find wpr_simulation)/launch/wpb_stage_slam.launch"/>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping"/>
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find slam_pkg)/rviz/slam.rviz"/>
<node pkg="rqt_robot_steering" type="rqt_robot_steering" name="rqt_robot_steering"/></launch>

实现一条指令实现所有平台加载对应参数启动

3.参数设置

<launch><include file="$(find wpr_simulation)/launch/wpb_stage_slam.launch"/>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen"><param name="map_update_distance_thresh" value="0.1"/><param name="map_update_angle_thresh" value="0.1"/><param name="map_pub_period" value="0.1"/>
</node><node pkg="rviz" type="rviz" name="rviz" args="-d $(find slam_pkg)/rviz/slam.rviz"/>
<node pkg="rqt_robot_steering" type="rqt_robot_steering" name="rqt_robot_steering"/></launch>

文件结构

相关文章:

  • langchain框架中各种Agent(LLMSingleAgent ReactAgent Plan-and-Execute Agent)原理方式对比
  • Spring Boot 虚拟线程 vs WebFlux:谁更胜一筹?
  • Ascend上如何进行带宽测试
  • Spring Boot + MyBatis + Vue:构建高效全栈应用的实战指南
  • px4仿真使用fastlio的定位数据飞行
  • 用流行民族戏腔三种方式打开国风爆款《闲人填梦》,邓超予的跨界演绎引领文化传播新高度!
  • QSqlDatabase: QSQLITE driver not loaded
  • 小孙学变频学习笔记(三)变频器的逆变器件—IGBT管(上)
  • 16.大数据监控
  • Kafka Broker处理消费者请求源码深度解析:从请求接收到数据返回
  • WHAT - React Native 开发 App 从 0 到上线全流程周期
  • React 新框架的一些实践心得(关注业务的话,框架的设计封装思路)
  • 【研发工具】.Net创建多项目模板(Visual Studio)
  • 设计模式 | 单例模式——饿汉模式 懒汉模式
  • 从零开始的云计算生活——第二十天,脚踏实地,SSH与Rsync服务
  • uni-app总结5-UTS插件开发
  • Axios 拦截器实现原理深度剖析:构建优雅的请求处理管道
  • Vue-11-前端框架Vue之应用基础父组件传值到子组件props的使用
  • TDengine 集群超能力:超越 InfluxDB 的水平扩展与开源优势
  • 具身机器人
  • 利于优化的网站模板/新塘网站seo优化
  • wap建站系统/怎么关闭seo综合查询
  • 移动端网站怎么做seo/销售找客户最好的app
  • 中央人民政府网投诉平台电话/海淀区seo引擎优化
  • 前端旅游网站行程怎么做/湖南搜索引擎推广平台
  • pycharm 做网站哪个好/今日头条关键词排名优化