simple_launch package
Submodules
- simple_launch.console module
- simple_launch.events module
- simple_launch.gazebo module
GazeboBridgeGazeboBridge.bidirectionalGazeboBridge.clock()GazeboBridge.generate_msg_map()GazeboBridge.gz2rosGazeboBridge.joint_states_bridge()GazeboBridge.model_prefix()GazeboBridge.model_topic()GazeboBridge.msg_mapGazeboBridge.ros2gzGazeboBridge.set_world_name()GazeboBridge.valid()GazeboBridge.world()GazeboBridge.yaml()
gz_launch_setup()only_show_args()ros_gz_prefix()silent_exec()
- simple_launch.group module
- simple_launch.simple_substitution module
Module contents
- class simple_launch.SimpleLauncher(namespace=None, use_sim_time=None, scope_included_files=False)
Bases:
object- add_action(action)
Adds an Action (Node, ComposableNodes, Group, etc.) at the current group level
- arg(name: str)
Retrieve an argument, should be a string otherwise -s will crash
- arg_map(*names)
Retrieves several arguments as a dict
- call_service(server, request=None, verbosity='', **kwargs)
Calls the service at server address after checking its type. Request is a dictionary that is forwarded to service request fields, assuming they match verbosity is none or ‘req’, ‘res’ or ‘reqres’ to get information on service call
- container(name, namespace='', existing=False, package='rclcpp_components', executable='component_container', **container_args)
Opens a Composition group to add nodes If existing is True, then loads nodes in the (supposely) existing container
- create_gz_bridge(bridges: GazeboBridge | List[GazeboBridge | Tuple], name='gz_bridge')
Create a ros_gz_bridge::parameter_bridge with the passed GazeboBridge instances The bridge has a default name if not specified If any bridge is used for sensor_msgs/Image, ros_{gz,ign}_image will be used instead
- create_gz_clock_bridge(name='gz_clock_bridge')
Create a ros_gz_bridge::parameter_bridge for the /clock topic Typically used in the launch file that runs the simulation before spawning things in
- declare_arg(name, default_value=None, **kwargs)
Add an argument to the launch file
- declare_gazebo_axes(**axes)
Declares classical Gazebo axes as launch arguments If axes is void then declares all 6 axes with default value 0 Otherwise declares the given axes with the given defaults
- entity(action)
Adds an Action (Node, ComposableNodes, Group, etc.) at the current group level
- find(package, file_name=None, file_dir=None)
Retrieve the path to a file within its share directory.
package – name of the package, if None then assumes an absolute file path
file_name – name of the file to find (if None, returns the path to this package)
file_dir – package directory containing the file (if None, will search the file)
If any argument is neither string nore None, assumes use of parameters and returns the corresponding Substitution
- gazebo_axes_args()
Generate arguments corresponding to Gazebo spawner
- group(ns=None, if_arg=None, unless_arg=None, if_condition=None, unless_condition=None, when=None)
- Group the next nodes / entities into
another namespace
a if / unless condition depending on some argument
a raw if / unless condition that may come out of an expression
an event condition (from simple_launch import OnExit, OnStart
- gz_launch(world_file, gz_args=None, full_world=None, save_after=5.0)
Wraps gz_sim_launch to be Ignition/GzSim agnostic default version is Fortress (6), will use GZ_VERSION if present if full_world is given as a raw string then the resulting SDF will be saved, including base world and spawned entities
- gz_world_tf(world_frame=None)
Runs a static_transform_publisher to connect world and Gazebo world name, if different from world
- include(package=None, launch_file=None, launch_dir=None, launch_arguments=None)
Include another launch file
- joint_state_publisher(use_gui=True, **node_args)
Adds a joint_state_publisher / joint_state_publisher_gui with passed arguments as parameters Assumes some robot_description topic is published inside the namespace
- launch_description(opaque_function=None)
Returns the setup launch description This value can be directly returned from generate_launch_description() It can also be stored in order to add custom entities
If opaque_function is not None, then returns the generate_launch_description() wrapper around the passed function
- log_info(msg)
Adds a LogInfo
- name_join(*elems)
- node(package=None, executable=None, plugin=None, **node_args)
Add a node to the launch tree. If use_sim_time was used then the use_sim_time parameter will be set if not explicitely given
package – name of the package
executable (classical node) – name of the node within the package, if None then assumes the node has the name of the package
plugin (inside a composition group) – name of the composed node plugin within the package
node_args – any other args passed to the node constructor
- path_join(*pathes)
- py_eval(*elems)
Evaluates the Python expression
- robot_description(package=None, description_file=None, description_dir=None, xacro_args=None)
Returns the robot description after potential xacro parse if the file ends with xacro or xacro_args are defined
- robot_state_publisher(package=None, description_file=None, description_dir=None, xacro_args=None, **node_args)
Add a robot state publisher node to the launch tree using the given description (urdf / xacro) file.
package – is the name of the package that contains the description file (if None then assume an absolute description file)
description_file – is the name of the urdf/xacro file
description_dir – the name of the directory containing the file (None to have it found)
xacro_args – arguments passed to xacro (will force use of xacro)
node_args – any additional node arguments such as remappings or parameters
- static ros_version()
Returns the name of the currently sourced ros version (e.g. $ROS_VERSION)
- rviz(config_file=None, warnings=False)
Runs RViz with the given config file and warning level
- save_gz_world(dst, after=5.0)
Saves the current world under dst Resolves any spawned URDF through their description parameter and converts to SDF
- service(server, request=None, verbosity='', **kwargs)
Calls the service at server address after checking its type. Request is a dictionary that is forwarded to service request fields, assuming they match verbosity is none or ‘req’, ‘res’ or ‘reqres’ to get information on service call
- set_parameters(node_name, parameters: dict = {}, verbosity='', **kwargs)
Sets the requested parameters for this node verbosity is none or ‘req’, ‘res’ or ‘reqres’ to get information on service call
- spawn_gz_model(name, topic='robot_description', model_file=None, spawn_args=[])
Spawns a model into Gazebo under the given name, from the given topic or file Additional spawn_args can be given to specify e.g. the initial pose
- simple_launch.adapt_type(params, target)
- simple_launch.stringify(arg)