如何在真实地图上显示SLAM输出的运动轨迹

代码链接:https://github.com/zhanghanduo/ROS_leaflet_gps
此应用程序旨在连接到ROS的同时在浏览器中显示带有Leaflet的OSM map,因此它可以使用标记显示GPS(/ NavSatFix)的位置和轨迹。该软件包还能够以geometry_msgs / PoseStamped格式集成视觉里程计结果在左侧,您可以看到标尺之类的按钮。 您可以使用它来测量公制距离。
具体操作:
以kinetic版本为例:
安装:

sudo apt-get install ros-kinetic-rosbridge-suite
git clone https://github.com/zhanghanduo/ROS_leaflet_gps.git

文件结构:

 .
    ├── assets                  # Pictures and icons.
    ├── launch                  # Demo launch files
    ├── lib                     # All important js libraries, including leaflet, leaflet plugins, three 3D lib.
    ├── index.html              # Demo html page for displaying the map.
    ├── script_pose.js          # Demo js script to display `geometry_msgs/PoseStampedWithCovariance` message.
    ├── script_fix.js           # Demo js script to display `NavSatFix` for GPS 
                                # and `rds_msgs/msg_novatel_bestpos` for self defined pose.
    ├── script_reuse_path.js    # Demo js script to display `PoseStampedWithCovariance` message
                                # for GPS and `nav_msgs/Path` for self defined pose.
    └── README.md

配置文件

只需更改script.js文件顶部的值即可修改模块的配置。

CONFIG_tile_source:设置地图图块的来源。 如果您下载了要移动的区域的地图,则可以将其设置为`local`。 否则,将其设置为`server`。
CONFIG_tile_local_path:已下载图块的路径
CONFIG_ROS_server_URI:路由到ROS服务器。 它可以是localhost或IP。

参数:
在实验室中,我们正在使用两个不同的GPS,这两个GPS的发布主题和频率不同。 因此可以设置两个参数:

/panel/gps_topic for the GPS topic's name. Example : /gps
/panel/pose_topic for the VO topic's name. Example : /slam/pose
/panel/nb_cycles for the number of cycles between each refreshing. Example : 20

您可以在ROS启动文件中进行设置,也可以使用rosparam set进行设置,然后通过单击刷新按钮在浏览器中刷新页面。

分别在两个终端下执行:
Open index_pose.html with a browser

 roslaunch ./launch/novatel_pose.launch
 rosbag play demo.bag


效果非常完美,作者非常良心,有测试数据,欢迎大家测试!!!
如何在真实地图上显示SLAM输出的运动轨迹_第1张图片
nav_msgs / Path相对于geometry_msgs / PoseStampedWithCovariance的优势在于它不是固定的。 姿势图优化和回环检测可能会更新您的SLAM轨迹。 novatel_path能够更新您估计的位姿的绘制路径。

你可能感兴趣的:(手写VIO)