diff --git a/cartographer_ros/cartographer_ros/node_main.cc b/cartographer_ros/cartographer_ros/node_main.cc index b51f57f..0f897a9 100644 --- a/cartographer_ros/cartographer_ros/node_main.cc +++ b/cartographer_ros/cartographer_ros/node_main.cc @@ -333,7 +333,6 @@ bool Node::HandleSubmapQuery( response.height = response_proto.height(); response.resolution = response_proto.resolution(); - auto pose = carto::transform::ToRigid3(response_proto.slice_pose()); response.slice_pose.position.x = response_proto.slice_pose().translation().x(); response.slice_pose.position.y = diff --git a/cartographer_rviz/cartographer_rviz/submaps_display.cc b/cartographer_rviz/cartographer_rviz/submaps_display.cc index c7495dd..169b253 100644 --- a/cartographer_rviz/cartographer_rviz/submaps_display.cc +++ b/cartographer_rviz/cartographer_rviz/submaps_display.cc @@ -91,7 +91,7 @@ void SubmapsDisplay::reset() { void SubmapsDisplay::processMessage( const ::cartographer_ros_msgs::SubmapList::ConstPtr& msg) { ::cartographer::common::MutexLocker locker(&mutex_); - for (int trajectory_id = 0; trajectory_id < msg->trajectory.size(); + for (size_t trajectory_id = 0; trajectory_id < msg->trajectory.size(); ++trajectory_id) { if (trajectory_id >= trajectories_.size()) { trajectories_.emplace_back(); @@ -99,7 +99,7 @@ void SubmapsDisplay::processMessage( auto& trajectory = trajectories_[trajectory_id]; const std::vector<::cartographer_ros_msgs::SubmapEntry>& submap_entries = msg->trajectory[trajectory_id].submap; - for (int submap_id = 0; submap_id < submap_entries.size(); ++submap_id) { + for (size_t submap_id = 0; submap_id < submap_entries.size(); ++submap_id) { if (submap_id >= trajectory.size()) { trajectory.push_back( ::cartographer::common::make_unique( diff --git a/cartographer_rviz/cartographer_rviz/submaps_display.h b/cartographer_rviz/cartographer_rviz/submaps_display.h index 98b4e35..eda4a53 100644 --- a/cartographer_rviz/cartographer_rviz/submaps_display.h +++ b/cartographer_rviz/cartographer_rviz/submaps_display.h @@ -53,6 +53,7 @@ class SubmapsDisplay private: void CreateClient(); + // These are called by RViz and therefore do not adhere to the style guide. void onInitialize() override; void reset() override; void processMessage(