Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

---

## [0.1.10] - 2025-08-20

### Added
- Add a default plugin directory in case nothing is passed

## [0.1.9] - 2025-08-12

### Added
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "launchmap",
"displayName": "LaunchMap",
"description": "Visualize ROS2 Launch Files",
"version": "0.1.9",
"version": "0.1.10",
"publisher": "kodorobotics",
"icon": "assets/launchmap-logo.png",
"bugs": {
Expand Down
7 changes: 5 additions & 2 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import sys
import json
import argparse
from parser.entrypoint.user_interface import parse_and_format_launch_file
from parser.plugin_loader import load_user_handlers_from_directory

DEFAULT_PLUGIN_DIR = os.path.join(os.path.dirname(__file__), "parser", "custom_handler")

def main():
parser = argparse.ArgumentParser(description="Parse a ROS2 launch file.")
parser.add_argument("launch_file", help="Path to launch file to parse.")
parser.add_argument(
"--plugin-dir", help="Directory containing user-defined custom handlers."
"--plugin-dir", help="Directory containing user-defined custom handlers.",
default = DEFAULT_PLUGIN_DIR
)

args = parser.parse_args()

if args.plugin_dir:
if os.path.isdir(args.plugin_dir):
load_user_handlers_from_directory(args.plugin_dir)

try:
Expand Down
2 changes: 1 addition & 1 deletion parser/tests/real_cases/launch_files/.launchmap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"pluginDir": "/Users/sakshaymahna/Documents/Robotics/ROSDocker/launchmap/parser/tests/real_cases/launch_files/custom_handlers"
"pluginDir": "/Users/sakshaymahna/Documents/Robotics/ROSDocker/launchmap/parser/custom_handlers"
}
2 changes: 1 addition & 1 deletion parser/tests/test_real_launch_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
BASE_DIR = os.path.dirname(__file__)
INPUT_DIR = os.path.join(BASE_DIR, "real_cases/launch_files")
OUTPUT_DIR = os.path.join(BASE_DIR, "real_cases/expected_outputs")
PLUGIN_DIR = os.path.join(BASE_DIR, "real_cases/launch_files/custom_handlers")
PLUGIN_DIR = os.path.join(BASE_DIR, "../custom_handlers")


@pytest.mark.parametrize("filename", [f for f in os.listdir(INPUT_DIR) if f.endswith(".py")])
Expand Down