roslaunch格式

The roslaunch package comes with roslaunch tool as well as several support tools to assist in the process of launching ROS Nodes.

目录

  1. roslaunch
    1. Launch syntax
    2. Passing in args
    3. Non-launch options
    4. Internal-use only options
    5. Environment Variables (advanced users)
  2. roslaunch-deps
    1. Usage
  3. roslaunch-check
  4. roslaunch-logs
    1. Usage

roslaunch

roslaunch is an important tool that manages the start and stop of ROS nodes. It takes one or more .launch files as arguments.

Launch syntax

Most roslaunch commands require the name of a launch file. You can either specify the file path of the launch file, or you can specify a package name and launch file in that package, e.g.

  • $ roslaunch roslaunch example.launch
    or
    $ roscd roslaunch
    $ roslaunch example.launch

roslaunch <package-name> <launch-filename> [args]

  • Launch <launch-filename> located in <package-name>, e.g.:

    $ roslaunch rospy_tutorials talker_listener.launch

    roslaunch will find a file with the matching name inside the specified package and run it.

roslaunch <launch-file-paths...> [args]

  • Launch the file(s) specified by relative or absolute paths, e.g.

    $ roslaunch pr2_robot/pr2_bringup/pr2.launch

roslaunch - [args] New in Indigo

  • Launch the roslaunch XML passed as standard input, e.g.

    $ rosrun package generate_launch | roslaunch -

-p port

  • If you launched roscore on a different port using the -p option, you need to pass in the -p flag to roslaunch as well, e.g.

    $ roslaunch -p 1234 package filename.launch

    This will dynamically override the port setting in your ROS_MASTER_URI.

--wait

  • Delay the launch until a roscore is detected.

--local

  • Launch of the local nodes only. Nodes on remote machines will not be run.

--screen

  • Force all node output to screen. Useful for node debugging.

--log New in Melodic

  • Force all node output to log file. Also useful for node debugging.

-v

  • Enable verbose printing. Useful for tracing roslaunch file parsing.

--dump-params

  • Print parameters in launch file in YAML format.

--sigint-timeout=SIGINT_TIMEOUT New in Melodic

  • The SIGINT timeout used when killing nodes (in seconds). Default is 15 seconds.

--sigterm-timeout=SIGTERM_TIMEOUT New in Melodic

  • The SIGTERM timeout used when killing nodes if SIGINT does not stop the node (in seconds). Default is 2 seconds.

Passing in args

If the file you are launching specifies args that require setting, you can do so using an identical syntax to ROS remapping arguments, e.g.:

roslaunch my_file.launch arg:=value

Non-launch options

The following options provide information about a launch file without actually doing a launch. These options use the same launch-file resolution as the regular roslaunch command. You can either specify the file path of the launch file, or you can specify a package name and launch file in that package, e.g. for the example.launch file in the roslaunch package, you can use:

  • roslaunch --nodes roslaunch $ROS_ROOT/tools/roslaunch/example.launch

    or

    roslaunch --nodes roslaunch example.launch

--nodes <package-name> <launch-file>
--nodes <launch-file>

  • List nodes by 'name' that are in <launch-file>. This is useful for figuring out the node name to pass to --args.

--args <node-name> <package-name> <launch-file>
--args <node-name> <launch-file>

  • Display the command-line arguments that roslaunch uses when launching the node in <launch-file> named <node-name>. This is handy if you just want to launch that particular node for debugging, e.g.

    $ roslaunch --args my_node file.launch | bash

    You can also use this option with substitution args (for bash, you have to be careful to use single-quotes instead of double-quotes):

    $ roslaunch --args '$(anon my_node)' file.launch

--find <node-name> <package-name> <launch-file>
--find <node-name> <launch-file>

  • Print name of launch file that the node named <node-name> is defined in. Launch files often have many includes, which can make it difficult to find where an actual <node> definition resides. For example:

    $ roslaunch --find /included/talker roslaunch example.launch

--files <filename>

  • Print all files included in processing <filename>, including the file itself. This is useful for passing to other command line tools, e.g.

    $ roslaunch --files foo.launch | xargs grep stuff

--ros-args

  • Display command-line arguments for this launch file
    <launch><!-- ros_args.launch --><arg name="foo" default="true" doc="I pity the foo'."/><arg name="bar" doc="Someone walks into this."/><arg name="baz" default="false"/><arg name="nop"/><arg name="fix" value="true"/>
    </launch>$> roslaunch --ros-args ros_args.launch
    Required Arguments:bar: Someone walks into this.nop: undocumented
    Optional Arguments:baz (default "false"): undocumentedfoo (default "true"): I pity the foo'.

Internal-use only options

roslaunch uses several command-line options that are for internal use only, including -c, -u, and --core.

Environment Variables (advanced users)

NOTE: this section is intended for advanced users only

  • ROSLAUNCH_SSH_UNKNOWN

    • When launching on remote machines, SSH requires that the remote machine's key be stored in the local known_hosts file. You can set roslaunch to ignore this constraint and allow connections to machines for which you don't have keys established. This is a dangerous option as it introduces a security hole and should only be used if you understand the consequences.

roslaunch-deps

roslaunch-deps reports which ROS Packages a .launch file depends on. It can also track down command build problems, such as missing dependencies in package manifests or syntax errors.

Usage

To get warnings about dependencies missing in manifest files, run with the -w warn option:

$ roslaunch-deps -w file.launch

To get more verbose output to help track where a dependency is coming from, run with the -v verbose option:

$ roslaunch-deps -v file.launch

roslaunch-check

roslaunch-check is a command-line version of launch file checking. You can run by the follwoing:

$ rosrun roslaunch roslaunch-check launch            (passing a directory)
$ rosrun roslaunch roslaunch-check test/launch       (passing a sub directory)
$ rosrun roslaunch roslaunch-check launch/aa.launch  (passing a file)

roslaunch-logs

Roslaunch stores log files for a particular run together in a subdirectory of the ROS log directory ($ROS_ROOT/log or $ROS_LOG_DIR). In general, logs files are stored in ROS_LOG_DIR/run_id, where run_id is a unique ID associated with a particular run of a roscore.

Example:

# roslaunch-logs                                                                                               
/root/.ros/log/eef4c2b6-2c3f-11ea-96bb-0242ac110003

Usage

roslaunch-logs is meant to be used together with the 'cd' command, e.g.

cd `roslaunch-logs`
root@ea57f5de462a:~/.ros/log/eef4c2b6-2c3f-11ea-96bb-0242ac110003# 

You can type this command to quickly go to the directory with the log files for your nodes.

Wiki: roslaunch/Commandline Tools (2022-03-21 09:26:01由Martin Pecka编辑)

Except where otherwise noted, the ROS wiki is licensed under the
Creative Commons Attribution 3.0

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/588760.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

23. 一维数组

写在前面&#xff1a; 今天是2023年12月31日&#xff0c;也是整个2023年的最后一天。我在CSDN上只有短短几个月的时光&#xff0c;但非常感谢大家的支持&#xff0c;作为一名刚刚大一的大学生呢&#xff0c;学习编程&#xff0c;学习写博客是很重要的事&#xff0c;所以在新的…

翻页的电子画册如何制作

​在过去&#xff0c;一本精美的画册往往需要大量的人力物力去印刷、装帧、运输。而现在&#xff0c;只需一台电脑、一个网址和一个创意&#xff0c;就可以轻松制作出一本电子画册。这种变化不仅降低了成本&#xff0c;还带来了更多的便利性和灵活性。 首先&#xff0c;你需要选…

网络故障排查和流量分析利器-Tcpdump命令

Tcpdump是一个在Unix/Linux系统上广泛使用的命令行网络抓包工具。它能够捕获经过网络接口的数据包&#xff0c;并将其以可读的格式输出到终端或文件中。Tcpdump是一个强大的命令行工具&#xff0c;能够捕获和分析网络数据包&#xff0c;为网络管理员和安全专业人员提供了深入了…

【网络面试(6)】IP协议对网络包的转发

在前面的博客中&#xff0c;我们提到过&#xff0c;网络传输的报文是有真实的数据包和一些头部组成&#xff0c;目前我们了解的头部就有TCP头、IP头、MAC头&#xff0c;而且这三个头部信息都是在应用程序委托给协议栈之后&#xff0c;被写入的相关信息&#xff0c;这些头部都是…

Leetcode4-唯一元素的和(1748)

1、题目 &#xff08;1748&#xff09;给你一个整数数组 nums 。数组中唯一元素是那些只出现 恰好一次 的元素。 请你返回 nums 中唯一元素的 和 。 示例 1&#xff1a; 输入&#xff1a;nums [1,2,3,2] 输出&#xff1a;4 解释&#xff1a;唯一元素为 [1,3] &#xff0c;…

修改jenkins的目录(JENKINS_HOME)

默认JENKINS_HOME是/var/lib/jenkins/ 现要修改为/home/jenkins_data/jenkins 最开始 sudo cp -a /var/lib/jenkins/ /home/jenkins_data/ 然后如下操作&#xff1a; 1、首先 /etc/sysconfig/jenkins&#xff1a;jenkins配置文件&#xff0c;“端口”&#xff0c;“JENKIN…

9、python-闭包

简介 1.闭包&#xff0c;又称闭包函数或者闭合函数&#xff0c;其实和嵌套函数类似 2.不同之处在于&#xff0c;闭包中外部函数返回的不是一个具体的值&#xff0c;而是一个函数 3.一般情况下&#xff0c;返回的函数会赋值给一个变量&#xff0c;这个变量可以在后面被继续执行…

yolov8知识蒸馏代码详解:支持logit和feature-based蒸馏

文章目录 1. 知识蒸馏理论2. yolov8 蒸馏代码应用2.1 环境配置2.2 训练模型(1) 训练教师模型(2) 训练学生模型baseline(3) 蒸馏训练3. 知识蒸馏代码详解3.1 蒸馏参数设置3.2 蒸馏损失代码讲解3.2.1 Feature based loss3.2.1 Logit loss3.3 获取蒸馏的feature map及channels

08-接口文档管理工具-项目集成knife4j__ev

2、knife4j快速入门 2.1 knife4j介绍 knife4j是为Java MVC框架集成Swagger生成Api文档的增强解决方案,前身是swagger-bootstrap-ui,取名kni4j是希望它能像一把匕首一样小巧,轻量,并且功能强悍! gitee地址&#xff1a;knife4j: Knife4j是一个集Swagger2 和 OpenAPI3为一体的增…

第二十六周:学习笔记

第二十六周&#xff1a;学习笔记 摘要Abstract全卷积网络 FCN1. CNN 与 FCN2. 全连接层 --> 成卷积层3. FCN的缺点 摘要 全卷积神经网络&#xff08;Fully Convolutional Network&#xff0c;FCN&#xff09;是一种用于图像分割和语义分割任务的深度学习模型。与传统的卷积…

使用python快速开发与PDF文档对话的Gemini聊天机器人

检索增强生成(Retrieval-augmented generation&#xff0c;RAG)使得我们可以让大型语言模型(LLMs)访问外部知识库数据(如pdf,word、text等)&#xff0c;从而让人们可以更加方便的通过LLM来学习外部数据的知识。今天我们将利用之前学习到的RAG方法&#xff0c;谷歌Gemini模型和l…

费曼学习法应用:谈自私和教育的引导

今天这个还是来源于我和九迁的对话&#xff0c;起因是中午吃饭的时候&#xff0c;九迁在学校与班主任老师和数学老师对话中带来的思考。 先听音频&#xff1a; 对话内容&#xff08;以下内容可以边听边看&#xff0c;属于语音转换过来的文字&#xff0c;最后有个总结&#xff0…

U4_3 语法分析-自底向上分析-LR0/LR1/SLR分析

文章目录 一、LR分析法1、概念2、流程3、LR分析器结构及分析表构造1&#xff09;结构2&#xff09;一些概念 二、LR(0)分析法1、流程2、分析动作1&#xff09;移近2&#xff09;归约(reduce) 3、总结1&#xff09;LR分析器2&#xff09;构造DFA3&#xff09;构造LR(0)的方法(三…

基于Vite创建简单Vue3工程

首先安装node.js环境&#xff0c;没有node.js环境&#xff0c;便没有npm命令。 1、Vue3创建执行命令 D:\TABLE\test>npm create vuelatestVue.js - The Progressive JavaScript Framework√ 请输入项目名称&#xff1a; ... vue_test √ 是否使用 TypeScript 语法&#xff…

UntiyShader(五)属性、内置文件和变量

目录 一、如何使用属性 例子 ShaderLab中的属性的类型和Cg中的变量的类型之间的匹配关系

网络安全-真实ip获取伪造与隐藏挖掘

目录 真实ip获取应用层网络层网络连接TOAproxy protocol ip伪造应用层网络层TOA攻击proxy protocol 隐藏代理 挖掘代理多地ping历史DNS解析记录国外主机解析域名网站RSS订阅网络空间搜索引擎 总结参考 本篇文章学习一下如何服务如何获取真实ip&#xff0c;隐藏自己的ip&#xf…

yolov8 tracking编码为web 和 rtsp流输出

1 基础工作 打开cmd 输入 conda env list 输入 conda activate py38 查看 nvidia-smi 查看 nvcc&#xff0c;如下图所示 cuda为11.7 &#xff0c;为确认可以查看program files 下面的cuda 安装&#xff0c;看到11.7 就行了&#xff0c;读者可以自行确认自己的版本。 查看nvid…

【基础】【Python网络爬虫】【2.请求与响应】常用请求报头和常用响应方法

Python网络爬虫基础 爬虫基础请求与相应HTTP/HTTPS 协议HTTP/HTTPS的优缺点HTTP 的缺点HTTPS的优点 请求与响应概述请求请求目标&#xff08;url&#xff09;请求体&#xff08;response&#xff09;常用的请求报头查看请求体&#xff08;requests 模块&#xff09; 响应HTTP响…

PS实现圆角矩形选取

在我们日常的工作当中,经常需要做圆角矩形的图片,因为圆角的图片给人的感觉比较圆润,漂亮,但是PS在这方面显然比较弱智,因此如何做圆角矩形选择,这里给出了两个方法,希望能帮到大家。 进入正题(方法一): 第一步-PS 右上角-打开一张图片 第二步-左列-选择矩形-选择目…

2024新年快乐

今天就不讲题解了&#xff0c;2024年&#xff0c;祝所有博客身体健康&#xff0c;粉丝越多&#xff0c;点赞越高&#xff01;&#xff01;&#xff01; #include<bits/stdc.h> using namespace std; int main(){cout<<"新年快乐!!";return 0&#xff1b;…