Skip to content

Commit

Permalink
Commets
Browse files Browse the repository at this point in the history
  • Loading branch information
b-Tomas committed Nov 26, 2024
1 parent da253d1 commit cb4fbc1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions mir_connector/inorbit_mir_connector/src/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ def _inorbit_command_handler(self, command_name, args, options):
self.mission_tracking.waiting_for_text = script_args[1]
elif script_name == "localize":
# The localize command sets the robot's position and current map
# The expected arguments are "x" and "y" in meters and "orientation" in degrees,
# as in MiR Fleet, and "map_id" as the target map in MiR Fleet, which matches
# the uploaded "frame_id" in InOrbit
# The expected arguments are "x" and "y" in meters and "orientation" in degrees, as
# in MiR Fleet, and "map_id" as the target map in MiR Fleet, which matches the
# uploaded "frame_id" in InOrbit
if (
len(script_args) == 8
and script_args[0] == "--x"
Expand All @@ -184,13 +184,11 @@ def _inorbit_command_handler(self, command_name, args, options):
self.mir_api.set_status(status)
else:
self._logger.error("Invalid arguments for 'localize' command")
options["result_function"](
"1", execution_status_details="Invalid arguments"
)
options["result_function"]("1", execution_status_details="Invalid arguments")
return
else:
# Other kind if custom commands may be handled by the edge-sdk
# (e.g.user_scripts) and not by the connector code itself
# Other kind if custom commands may be handled by the edge-sdk (e.g. user_scripts)
# and not by the connector code itself
# Do not return any result and leave it to the edge-sdk to handle it
return
# Return '0' for success
Expand Down

0 comments on commit cb4fbc1

Please sign in to comment.