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
2 changes: 1 addition & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt update && \
RUN mkdir -p /colcon_ws/src
COPY . /colcon_ws/src/moco
#TODO fix package name once release is up
RUN pip3 install --break-system-packages /colcon_ws/src/moco[dev]
RUN pip3 install --break-system-packages /colcon_ws/src/moco[dev]


# Make ROS workspace and build it
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ MigrationBackup/
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
rev: 25.1.0
hooks:
- id: black
language_version: python3.10
language_version: python3.12
# - repo: https://github.com/pycqa/pylint
# rev: v3.3.5
# hooks:
Expand Down
9 changes: 6 additions & 3 deletions src/moco/roaml_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ def main_roaml_to_scxml(_args: Optional[Sequence[str]] = None) -> None:
:param args: The arguments to parse. If None, sys.argv is used.
:return: None
"""
parser = argparse.ArgumentParser(description="Convert RoaML robot system models to plain SCXML.")
parser = argparse.ArgumentParser(
description="Convert RoaML robot system models to plain SCXML."
)
parser.add_argument(
"--generated-scxml-dir",
type=str,
default="./output",
help="Path to the folder containing the generated plain-SCXML files.",
)

parser.add_argument("main_xml", type=str, help="The path to the main XML file to interpret.")
args = parser.parse_args(_args)

Expand All @@ -55,14 +57,15 @@ def main_roaml_to_scxml(_args: Optional[Sequence[str]] = None) -> None:
# Process additional, optional parameters
scxml_out_dir = args.generated_scxml_dir
scxml_out_dir = None if len(scxml_out_dir) == 0 else scxml_out_dir

print("MOCO - RoAML to SCXML.\n")
print(f"Loading model from {main_xml_file}.")

interpret_top_level_xml(main_xml_file, scxmls_dir=scxml_out_dir)

print(f"SCXML model saved to {scxml_out_dir}")


if __name__ == "__main__":
# for testing purposes only
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/moco/roaml_generator/ros_helpers/ros_action_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from typing import Callable, Dict, List, Tuple

from moco.roaml_generator.ros_helpers.ros_communication_handler import RosCommunicationHandler
from moco.roaml_converter.scxml_entries import (
ScxmlAssign,
ScxmlData,
Expand Down Expand Up @@ -51,6 +50,7 @@
PLAIN_SCXML_EVENT_DATA_PREFIX,
ROS_FIELD_PREFIX,
)
from moco.roaml_generator.ros_helpers.ros_communication_handler import RosCommunicationHandler


class RosActionHandler(RosCommunicationHandler):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from typing import Dict, List

from moco.roaml_generator.ros_helpers.ros_communication_handler import RosCommunicationHandler
from moco.roaml_converter.scxml_entries import (
ScxmlAssign,
ScxmlDataModel,
Expand All @@ -38,6 +37,7 @@
sanitize_ros_interface_name,
)
from moco.roaml_converter.scxml_entries.utils import PLAIN_FIELD_EVENT_PREFIX, ROS_FIELD_PREFIX
from moco.roaml_generator.ros_helpers.ros_communication_handler import RosCommunicationHandler


class RosServiceHandler(RosCommunicationHandler):
Expand Down
8 changes: 4 additions & 4 deletions src/moco/roaml_generator/scxml_helpers/scxml_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
from dataclasses import dataclass
from typing import Dict, List, MutableSequence, Optional, Type, Union

from moco.roaml_generator.ros_helpers.ros_timer import (
ROS_TIMER_RATE_EVENT_PREFIX,
is_global_timer_event,
)
from moco.roaml_converter.scxml_entries.bt_utils import (
is_bt_halt_event,
is_bt_halt_response_event,
Expand All @@ -37,6 +33,10 @@
is_action_thread_event,
is_srv_event,
)
from moco.roaml_generator.ros_helpers.ros_timer import (
ROS_TIMER_RATE_EVENT_PREFIX,
is_global_timer_event,
)


class EventSender:
Expand Down
149 changes: 0 additions & 149 deletions src/moco/roaml_generator/scxml_helpers/scxml_event_processor.py

This file was deleted.

Loading
Loading