cartographer_ros 命令行参数解析和日志打印

/*
 * Copyright 2016 The Cartographer Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "absl/memory/memory.h"
#include "cartographer/mapping/map_builder.h"
#include "cartographer_ros/node.h"
#include "cartographer_ros/node_options.h"
#include "cartographer_ros/ros_log_sink.h"
#include "gflags/gflags.h"
#include "tf2_ros/transform_listener.h"

DEFINE_bool(collect_metrics, false,
            "Activates the collection of runtime metrics. If activated, the "
            "metrics can be accessed via a ROS service.");
DEFINE_string(configuration_directory, "",
              "First directory in which configuration files are searched, "
              "second is always the Cartographer installation to allow "
              "including files from there.");
DEFINE_string(configuration_basename, "",
              "Basename, i.e. not containing any directory prefix, of the "
              "configuration file.");
DEFINE_string(load_state_filename, "",
              "If non-empty, filename of a .pbstream file to load, containing "
              "a saved SLAM state.");
DEFINE_bool(load_frozen_sta
ros2 launch fishbot_cartographer cartographer.launch.py [INFO] [launch]: All log files can be found below /home/jian/.ros/log/2025-06-13-16-16-40-873567-jian-desktop-142958 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [cartographer_node-1]: process started with pid [142960] [INFO] [occupancy_grid_node-2]: process started with pid [142962] [INFO] [rviz2-3]: process started with pid [142964] [cartographer_node-1] [INFO] [1749802601.096533376] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/home/jian/map_ws/install/fishbot_cartographer/share/fishbot_cartographer/config/fishbot_2d.lua' for 'fishbot_2d.lua'. [cartographer_node-1] [INFO] [1749802601.097094912] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'. [cartographer_node-1] [INFO] [1749802601.097142560] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'. [cartographer_node-1] [INFO] [1749802601.097449568] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/pose_graph.lua' for 'pose_graph.lua'. [cartographer_node-1] [INFO] [1749802601.097484864] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/pose_graph.lua' for 'pose_graph.lua'. [cartographer_node-1] [INFO] [1749802601.097745408] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/trajectory_builder.lua' for 'trajectory_builder.lua'. [cartographer_node-1] [INFO] [1749802601.097785824] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/trajectory_builder.lua' for 'trajectory_builder.lua'. [cartographer_node-1] [INFO] [1749802601.098087424] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/trajectory_builder_2d.lua' for 'trajectory_builder_2d.lua'. [cartographer_node-1] [INFO] [1749802601.098130304] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/trajectory_builder_2d.lua' for 'trajectory_builder_2d.lua'. [cartographer_node-1] [INFO] [1749802601.098339872] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/trajectory_builder_3d.lua' for 'trajectory_builder_3d.lua'. [cartographer_node-1] [INFO] [1749802601.098373632] [cartographer_ros]: I0613 16:16:41.000000 142960 configuration_file_resolver.cc:41] Found '/opt/ros/foxy/share/cartographer/configuration_files/trajectory_builder_3d.lua' for 'trajectory_builder_3d.lua'. [cartographer_node-1] [INFO] [1749802601.598864000] [cartographer_ros]: I0613 16:16:41.000000 142960 submap_2d.cc:187] Added submap 1 [cartographer_node-1] [INFO] [1749802601.598990720] [cartographer_ros]: I0613 16:16:41.000000 142960 map_builder_bridge.cc:132] Added trajectory with ID '0'. [occupancy_grid_node-2] [WARN] [1749802602.096275008] [occupancy_grid_node]: submap_slices and last_frame_id is empty [rviz2-3] [INFO] [1749802602.787882976] [rviz2]: Stereo is NOT SUPPORTED [rviz2-3] [INFO] [1749802602.788471200] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) [rviz2-3] [INFO] [1749802602.880118944] [rviz2]: Stereo is NOT SUPPORTED
最新发布
06-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值