23 #include "cartographer_ros_msgs/StatusCode.h" 24 #include "cartographer_ros_msgs/SubmapQuery.h" 29 const ::cartographer::mapping::SubmapId& submap_id,
31 ::cartographer_ros_msgs::SubmapQuery srv;
32 srv.request.trajectory_id = submap_id.trajectory_id;
33 srv.request.submap_index = submap_id.submap_index;
34 if (!client->
call(srv) ||
35 srv.response.status.code != ::cartographer_ros_msgs::StatusCode::OK) {
38 if (srv.response.textures.empty()) {
42 ::cartographer::common::make_unique<::cartographer::io::SubmapTextures>();
43 response->version = srv.response.submap_version;
44 for (
const auto& texture : srv.response.textures) {
45 const std::string compressed_cells(texture.cells.begin(),
48 ::cartographer::io::UnpackTextureData(compressed_cells, texture.width,
50 texture.width, texture.height, texture.resolution,
Rigid3d ToRigid3d(const geometry_msgs::TransformStamped &transform)
bool call(MReq &req, MRes &res)
std::unique_ptr<::cartographer::io::SubmapTextures > FetchSubmapTextures(const ::cartographer::mapping::SubmapId &submap_id, ros::ServiceClient *client)
const std::string response