You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

需要:

软件平台:

硬件平台:

(以下任选其一)

  • Slamware SDP mini 
  • Slamware SDP
  • Slamware 套装 (基于Slamware导航方案的用户机器人系统)
  • Zeus/Apollo等底盘系统

编译运行:

  1. 右键composite_map_demo, 打开属性选项,将Slamware SDK 的include目录和lib目录添加到工程
  2. 右键composite_map_demo, 将此工程设置成StartUp project
  3. 点击F5 运行
  4. 在debug目录下用命令行运行composite_map_demo, 用法如下:

    composite_map_demo  [OPTS]  [filename]  <SDP IP Address>
    SDP IP Address           The ip address string of the SLAMWARE SDP
    getstcm filename          download compositeMap
                                         If not specified, the default name map.stms will be used
    setstcm filename          upload compositeMap
    -h                                  Show this message

  5. 从slamware里面读取composite map(此操作会在桌面上生成一个test.stcm的地图文件,并在console中输出地图数据信息):

    可以用Robostudio的地图编辑器来查看生成的地图:

  6. 将本地的composite map上传至slamware
    可以先在Robostudio里面查看将要上传的地图:

    将此底图上传至slamware:

    可以在Robostudio中连上机器人,可以看到地图已经上传成功


描述:

代码功能说明:从slamware模块下载composite map到客户端, 从客户端上传composite map至slamware模块,从composite map中读取虚拟轨道,虚拟墙等信息。

获取composite map
bool StcmMapWriter(const std::string file_name, SlamwareCorePlatform platform) {
	CompositeMap composite_map = platform.getCompositeMap();
    CompositeMapWriter composite_map_writer;
    std::string error_message;
    bool result = composite_map_writer.saveFile(error_message, file_name, composite_map);
    return result;
}









  • No labels