Skip to content

Commit

Permalink
mola-cli now does not need the -c cli flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jan 5, 2024
1 parent 93c779e commit e125412
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/module-mola-launcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/demo-kitti-lidar-slam.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/demo-pose-graph-g2o-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/demo-rawlog-velodyne-slam.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mola_demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mola_demos/mola-cli-launchs/kitti_just_replay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mola_demos/mola-cli-launchs/rosbag2_pointcloud_just_view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
# -----------------------------------------------------------------------------

Expand Down
12 changes: 5 additions & 7 deletions mola_launcher/apps/mola-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
MRPT_TODO("win32: add SetConsoleCtrlHandler");

// Declare supported cli switches ===========
static TCLAP::CmdLine cmd("mola-cli");
static TCLAP::ValueArg<std::string> arg_yaml_cfg(
"c", "config", "Input YAML config file (required) (*.yml)", false, "",
"demo.yml", cmd);
static TCLAP::CmdLine cmd("mola-cli");
static TCLAP::UnlabeledValueArg<std::string> arg_yaml_cfg(
"config", "Input YAML config file (required) (*.yaml)", false, "",
"mola-system.yaml", cmd);

static TCLAP::ValueArg<std::string> arg_verbosity_level(
"v", "verbosity", "Verbosity level: ERROR|WARN|INFO|DEBUG (Default: INFO)",
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e125412

Please sign in to comment.