This is the top-level namespace of the rocon_launch ROS package. It provides machinery for spawning multiple roslaunch environments.
This module defines exceptions raised by the rocon_launch package.
This module contains the machinery for spawning and managing multiple terminals that execute a pre-configured roslaunch inside each.
Bases: object
The rocon launcher. Responsible for all the pieces of the puzzle that go into spawning roslaunches inside terminals (startup, shutdown and signal handling).
Initialise empty of processes, but configure a terminal so we’re ready to go when we start spawning.
Parameters: |
---|
List of spawned subprocess.Popen terminal processes.
Special handler that gets triggered if someone hits CTRL-C in the original terminal that executed ‘rocon_launch’. We catch the interrupt here, search and eliminate all child roslaunch processes first (give them time to gracefully quit) and then finally close the terminals themselves. closing down the terminals themselves.
Parameters: |
|
---|
Parameters: | launch_configuration – |
---|
:type launch_configuration RosLaunchConfiguration
List of temporary files used to construct launches that we must unlink before finishing.
This module provides the context for a roslaunch configuration.
Bases: object
Configuration for a roslaunch (to be later spawned inside a terminal). This is typically generated by reading from a rocon_launch xml file but is also usable by other sources wishing to spawn roslaunched terminals.
Parameters: |
|
---|
:raises InvalidRoconLauncher
Appends a roslaunch command line option to the configuration.
Parameters: | option (str) – |
---|
A list of (name, value) tuples representing roslaunch args.
Name of the roslauncher (must be absolute if there is no package specified).
Push the roslaunch down into this namespace.
A string of options to pass to roslaunch (not a list!), e.g. ‘–screen –local’
Package name in which to find the roslaunch (optional).
The absolute path to this launcher (automatically derived from package/name).
Port to start this configuration on (defaults to env. ROS_MASTER_URI or 11311 if not set).
Returns: | true or false depending on whether –screen is applied or not. |
---|---|
Return type: | bool |
The string to display on a spawned terminal window (easy for tabbing).
This module provides a list of supported terminals and methods to handle them.
Bases: rocon_launch.terminals.Terminal
A pseudo representation of the currently open terminal.
Prepare the custom command for a roslaunch window.
Parameters: |
|
---|
Bases: rocon_launch.terminals.Terminal
Responsible for handling of gnome-terminal terminals.
Prepare the custom command for a roslaunch window.
Parameters: |
|
---|
Bases: rocon_launch.terminals.Terminal
Responsible for handling of kde konsole terminals.
Prepare the custom command for a roslaunch window.
Parameters: |
|
---|
String identifier for the currently open (active) terminal
Creates a manager for the terminal with supporting methods and variables.
If name is None, it will try to auto-detect the user’s terminal. We’re currently using ubuntu’s x-terminal-emulator to choose the shell.
Parameters: | name (str) – name of the terminal manager to create (None to auto-detect). |
---|---|
Returns: | one of the suported terminal classes |
Return type: | one of the children of :class:.`.Terminal` |
:raises UnsupportedTerminal if the name is not in the supported terminals list. :raises rocon_python_comms.NotFoundException if the specified/auto-detected terminal is not found on the system.
String identifier for Gnome’s terminal.
String identifier for an oft used representation of gnome’s terminal on desktops like KDE.
String identifier for KDE’s konsole terminal
This module provides some supporting utilities for rocon launches.
Search the pstree of the specified pid for roslaunch processes. We use this to aid in gracefully terminating any roslaunch processes running in terminals before closing down the terminals themselves.
Parameters: | parent_pid (str) – the pid of the parent process. |
---|---|
Returns: | list of pids |
Return type: | str[] |
Parses an rocon multi-launcher (xml file).
Parameters: | |
---|---|
Returns: | list of launch configurations |
Return type: | :class:`.RosLaunchConfiguration`[] |
:raises InvalidRoconLauncher : if any roslaunch configuration failed