Demo motion server
Thin MTC named-state motion action server using the demo BaseActionServer lifecycle and MoveStages.
src.demos.hello_orchestrator_py.scripts.move_server · Source
Examples and demos · Guide · Symbol index
How it is used
main() runs MoveActionServer through the demo server lifecycle. The subclass binds MoveStages to the move_to_named_state_py endpoint; clients send MoveToNamedState goals. Robot bringup and a usable MoveIt configuration must already be available.
initialize_stages() is the subclass hook used during construction. Goal handling is inherited from the demo base.
Start here
Callable |
Purpose |
|---|---|
Run MoveActionServer through the shared initialize/spin/cleanup helper. |
|
Assign a MoveStages instance bound to this server node so the base execute callback can call run(). |
Functions
main()
Run MoveActionServer through the shared initialize/spin/cleanup helper.
Entry point · Source
main(args=None)
Parameter |
Meaning |
|---|---|
|
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 can execute motion.
MoveActionServer
Bind the demo action-server base to the named-state motion action and its MTC stage.
Inherits from: BaseActionServer.
MoveActionServer.initialize_stages()
Assign a MoveStages 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.
MoveActionServer.__init__()
Configure the base action server with MoveToNamedState on move_to_named_state_py and its specialized stages.
Lifecycle · Source
__init__(self)
Errors: Base server/stage/ROS initialization errors propagate.
Side effects: Creates ROS node/action endpoint; importing its stage module also initializes MTC.