Task submission client
Submit a task JSON file to the orchestrator and report its progress and final ROS action status.
src.beambot.scripts.beambot_client · Source
Clients and integrations · Guide · Symbol index
How it is used
Use the CLI entry point to send an existing task JSON file to /beambot_execution. main() reads the file and checks JSON syntax; TaskGoalSender.send_goal() submits its full text and waits for the final action status while feedback is logged. Task validation and execution belong to the orchestrator.
This client executes the task; it is not a JSON preview tool. On Ctrl+C it requests cancellation when it has an accepted goal handle. Its exit status follows the ROS action status rather than a separate result.success check.
Start here
Callable |
Purpose |
|---|---|
Read and syntax-check the requested JSON file, initialize the sender and submit it. On Ctrl+C, request cancellation if a handle was received and allow up to two seconds for the cancel future. |
|
Submit task JSON and wait synchronously for acceptance and the final action result. Allow ten seconds for the orchestrator to become available. |
Functions
main()
Read and syntax-check the requested JSON file, initialize the sender and submit it. On Ctrl+C, request cancellation if a handle was received and allow up to two seconds for the cancel future.
Entry point · Source
main()
Returns: Exits process with 0 on action success, 1 for ordinary input/action failure, or 130 after KeyboardInterrupt.
Errors: JSON/I/O errors exit 1 before ROS initialization; runtime errors can propagate after finally cleanup. A second interrupt during cancel is ignored, and ROS shutdown Exceptions are suppressed.
Side effects: Reads task file, commands orchestrator execution and prints/logs output; destroys node and shuts down ROS.
TaskGoalSender
A synchronous MTCExecution action client that retains the active goal for cancellation and logs task progress.
Inherits from: Node.
TaskGoalSender.send_goal()
Submit task JSON and wait synchronously for acceptance and the final action result. Allow ten seconds for the orchestrator to become available.
Method · Source
send_goal(self, json_content: str) -> bool
Parameter |
Meaning |
|---|---|
|
JSON string copied verbatim into MTCExecution.Goal.full_json; this method does not parse it. |
Returns: True only for STATUS_SUCCEEDED; False for unavailable server, rejection, cancellation or other status.
Errors: Acceptance/result waits have no timeout. Unexpected future/None-result errors propagate. Result payload success is not separately inspected.
Side effects: Submits robot task execution, processes ROS callbacks and logs progress/results.
TaskGoalSender.__init__()
Create task_goal_sender with an MTCExecution client and empty active-goal handle.
Lifecycle · Source
__init__(self)
Errors: ROS node/action-client construction errors propagate.
Side effects: Registers a ROS node/client.
Referenced in source (1)
main— src.beambot.scripts.beambot_client
Internal callbacks and helpers
TaskGoalSender._feedback_callback()
Log percent progress, step/action, current gripper and server status message from the action feedback.
Callback · Source
_feedback_callback(self, feedback_msg)
Parameter |
Meaning |
|---|---|
|
MTCExecution feedback wrapper with feedback.progress_percentage/current_step/current_action/current_gripper/status_message. |
Returns: None.
Errors: Malformed feedback/logger failures propagate.
Side effects: Writes an INFO ROS log.
Referenced in source (1)
TaskGoalSender.send_goal— src.beambot.scripts.beambot_client