Work in progress: this documentation is still being written and reviewed. Check details against the source code.

Demo print server

Thin message logging action server using the demo BaseActionServer lifecycle and PrintStages.

src.demos.hello_orchestrator_py.scripts.print_server · Source

Examples and demos · Guide · Symbol index

How it is used

main() runs PrintActionServer through the demo server lifecycle. The subclass serves PrintMessage goals on print_message_py and installs a logging-only stage. initialize_stages() is called during construction; inherited callbacks handle accepted requests.

Start here

Callable

Purpose

main

Run PrintActionServer through the shared initialize/spin/cleanup helper.

PrintActionServer.initialize_stages

Assign a PrintStages instance bound to this server node so the base execute callback can call run().

Functions

main()

Run PrintActionServer through the shared initialize/spin/cleanup helper.

Entry point · Source

main(args=None)

Parameter

Meaning

args

Optional ROS argument list forwarded to run_server.

Returns: None after server stops.

Errors: Follows run_server: spin interrupt is swallowed, constructor errors can bypass cleanup.

Side effects: Starts a ROS action server that logs requested messages.

PrintActionServer

Bind the demo action-server base to message logging through PrintStages.

Inherits from: BaseActionServer.

PrintActionServer.initialize_stages()

Assign a PrintStages instance bound to this server node so the base execute callback can call run().

Extension hook · Source

initialize_stages(self)

Returns: None; sets self._stages.

Errors: Stage constructor/logger errors propagate.

Side effects: Allocates stage state.

PrintActionServer.__init__()

Configure the base action server with PrintMessage on print_message_py and its specialized stages.

Lifecycle · Source

__init__(self)

Errors: Base server/stage/ROS initialization errors propagate.

Side effects: Creates ROS node/action endpoint.