From e125412e2374b75cd5476d412330b3b0f2cbf84c Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Fri, 5 Jan 2024 16:52:30 +0100 Subject: [PATCH] mola-cli now does not need the -c cli flag --- docs/module-mola-launcher.rst | 2 +- docs/source/demo-kitti-lidar-slam.rst | 2 +- docs/source/demo-pose-graph-g2o-file.rst | 2 +- docs/source/demo-rawlog-velodyne-slam.rst | 2 +- mola_demos/README.md | 2 +- mola_demos/mola-cli-launchs/kitti_just_replay.yaml | 2 +- .../rosbag2_pointcloud_just_view.yaml | 4 ++-- mola_launcher/apps/mola-cli.cpp | 12 +++++------- 8 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/module-mola-launcher.rst b/docs/module-mola-launcher.rst index 17790e1c..5cf86e9b 100644 --- a/docs/module-mola-launcher.rst +++ b/docs/module-mola-launcher.rst @@ -85,7 +85,7 @@ Example: Launching a SLAM system with performance details at end: .. code-block:: none - mola-cli -c kitti_lidar_slam.yml -p + mola-cli kitti_lidar_slam.yml -p Example: To list all known ICP algorithms: diff --git a/docs/source/demo-kitti-lidar-slam.rst b/docs/source/demo-kitti-lidar-slam.rst index cb782924..7c1e0a8a 100644 --- a/docs/source/demo-kitti-lidar-slam.rst +++ b/docs/source/demo-kitti-lidar-slam.rst @@ -14,7 +14,7 @@ Usage export KITTI_BASE_DIR=$HOME/dataset-kitti/ # set to your local copy! cd mola/demos - mola-cli -c kitti_lidar_slam.yml -p + mola-cli kitti_lidar_slam.yml -p Configuration file, explained diff --git a/docs/source/demo-pose-graph-g2o-file.rst b/docs/source/demo-pose-graph-g2o-file.rst index 38409674..cea6e2a8 100644 --- a/docs/source/demo-pose-graph-g2o-file.rst +++ b/docs/source/demo-pose-graph-g2o-file.rst @@ -21,7 +21,7 @@ Usage .. code-block:: bash cd mola/demos - mola-cli -c pose_graph_g2o_file.yml + mola-cli pose_graph_g2o_file.yml diff --git a/docs/source/demo-rawlog-velodyne-slam.rst b/docs/source/demo-rawlog-velodyne-slam.rst index 7a49de3b..55d6643b 100644 --- a/docs/source/demo-rawlog-velodyne-slam.rst +++ b/docs/source/demo-rawlog-velodyne-slam.rst @@ -17,7 +17,7 @@ Usage .. code-block:: bash cd mola/demos - MOLA_INPUT_RAWLOG=map1_test1.rawlog mola-cli -c rawlog_odom_and_lidar.yml -p + MOLA_INPUT_RAWLOG=map1_test1.rawlog mola-cli rawlog_odom_and_lidar.yml -p .. _sample_rawlog1: https://ingmec.ual.es/datasets/lidar3d-pf-benchmark/map1_test1_cut.rawlog diff --git a/mola_demos/README.md b/mola_demos/README.md index 68194f50..7b3ee861 100644 --- a/mola_demos/README.md +++ b/mola_demos/README.md @@ -9,7 +9,7 @@ Note that there are launch files for both, ROS 2 and standalone builds of MOLA. ```bash # In one terminal -mola-cli -c $(ros2 pkg prefix --share mola_demos)/launch/ros2_ouster_just_view.yaml +mola-cli $(ros2 pkg prefix --share mola_demos)/launch/ros2_ouster_just_view.yaml # In another terminal: ros2 bag play my_lidar_dataset.mcap diff --git a/mola_demos/mola-cli-launchs/kitti_just_replay.yaml b/mola_demos/mola-cli-launchs/kitti_just_replay.yaml index 1e5fa8c7..06d19057 100644 --- a/mola_demos/mola-cli-launchs/kitti_just_replay.yaml +++ b/mola_demos/mola-cli-launchs/kitti_just_replay.yaml @@ -11,7 +11,7 @@ modules: - type: mola::KittiOdometryDataset name: kitti_input execution_rate: 20 # Hz - #export_to_rawlog: kitti_${KITTI_SEQ}.rawlog + export_to_rawlog: kitti_${KITTI_SEQ}.rawlog #verbosity_level: INFO gui_preview_sensors: - raw_sensor_label: lidar diff --git a/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml b/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml index 74b6d7e8..d023d97d 100644 --- a/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml +++ b/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml @@ -6,13 +6,13 @@ # Examples of usage: # - Use all defaults (will expose all 2D/3D lidars, odometry, imus, etc.). # Visualizer assumes point cloud topic is '/ouster/points': -# mola-cli -c src/mola/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml +# mola-cli src/mola/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml # # - RACECAR_DATA dataset: # ROSBAG2_STORAGE_ID=sqlite3 \ # POINTCLOUD_TOPIC=/vehicle_8/luminar_front_points \ # ROSBAG2_FILE=/mnt/storage/RACECAR_DATA/M-MULTI-SLOW-KAIST.db3 \ -# mola-cli -c src/mola/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml +# mola-cli src/mola/mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml # # ----------------------------------------------------------------------------- diff --git a/mola_launcher/apps/mola-cli.cpp b/mola_launcher/apps/mola-cli.cpp index 65936f30..ff81acee 100644 --- a/mola_launcher/apps/mola-cli.cpp +++ b/mola_launcher/apps/mola-cli.cpp @@ -30,10 +30,10 @@ MRPT_TODO("win32: add SetConsoleCtrlHandler"); // Declare supported cli switches =========== -static TCLAP::CmdLine cmd("mola-cli"); -static TCLAP::ValueArg arg_yaml_cfg( - "c", "config", "Input YAML config file (required) (*.yml)", false, "", - "demo.yml", cmd); +static TCLAP::CmdLine cmd("mola-cli"); +static TCLAP::UnlabeledValueArg arg_yaml_cfg( + "config", "Input YAML config file (required) (*.yaml)", false, "", + "mola-system.yaml", cmd); static TCLAP::ValueArg arg_verbosity_level( "v", "verbosity", "Verbosity level: ERROR|WARN|INFO|DEBUG (Default: INFO)", @@ -86,9 +86,7 @@ static int mola_cli_launch_slam() // Load YAML config file: if (!arg_yaml_cfg.isSet()) { - TCLAP::ArgException e( - "-c xxx.yaml (or --config xxx.yml) is required to launch a SLAM " - "system."); + TCLAP::ArgException e("x.yaml is required to launch a SLAM system."); cmd.getOutput()->failure(cmd, e); return 1; }