Mock-hardware MCP startup
Starts rosbridge, Beambot with mock UR hardware, and a selected-topic bag recorder. Other devices remain separately configured.
utils/sim_start_mcp.sh · Source
Setup and deployment · Guide · Symbol index
How it is used
Run this wrapper as a script after selecting the beamline configuration. It sources ROS and the workspace, starts its child processes, and waits for them. See the command guide for launch arguments and recording differences.
cleanup() is registered as an exit trap and uses PID variables set by the surrounding script. It is documented for shutdown troubleshooting, not as a standalone function to call or source into another shell.
Start here
Callable |
Purpose |
|---|---|
Clean up the wrapper’s recorded child PIDs once when the shell exits. |
Functions
cleanup()
Clean up the wrapper’s recorded child PIDs once when the shell exits.
Lifecycle · Source
cleanup()
Returns: Shell status; there is no aggregate shutdown-success result. Re-entry returns immediately.
Errors: Missing PID values are skipped and signal/wait diagnostics are redirected. The function does not verify a ROS goal’s terminal result or independently confirm hardware stoppage.
Side effects: Sends SIGINT to the stored rosbag PID, terminates the stored bridge PID, terminates the stored Beambot PID, waits for children, and sets _cleanup_ran to prevent repeated cleanup. The Beambot PID comes from a background tee pipeline, so it identifies the shell’s recorded pipeline process rather than every ROS descendant.
Used by: EXIT trap; INT and TERM traps exit the wrapper and then trigger cleanup. PID variables are populated by the surrounding script.