Skip to content

Instantly share code, notes, and snippets.

@klintan
Created February 3, 2020 08:16
Show Gist options
  • Save klintan/104ff05d32b238740e93db73b147459e to your computer and use it in GitHub Desktop.
Save klintan/104ff05d32b238740e93db73b147459e to your computer and use it in GitHub Desktop.
Basic ROS2 launch template
from launch import LaunchDescription, LaunchIntrospector, LaunchService
from launch_ros import actions, get_default_launch_description
def generate_launch_description():
node = actions.Node(
package='', node_executable='', output='screen')
return LaunchDescription([plan_route])
def main():
ld = generate_launch_description()
print(LaunchIntrospector().format_launch_description(ld))
ls = LaunchService()
ls.include_launch_description(get_default_launch_description())
ls.include_launch_description(ld)
return ls.run()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment