Navigation

    蓝鲸ROS机器人论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    ROS交流群
    ROS Group
    产品服务
    Product Service
    开源代码库
    Github
    官网
    Official website
    技术交流
    Technological exchanges
    激光雷达
    LIDAR
    ROS教程
    ROS Tourials
    深度学习
    Deep Learning
    机器视觉
    Computer Vision

    ros launch中的节点工作空间路径

    技术交流
    1
    1
    2426
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • weijiz
      weijiz last edited by

      在launch文件中启动节点,那么这个节点的工作目录是什么呢?在node程序中如果创建一个文件,这个文件的默认位置在哪里?
      在launch中node节点有一个cwd参数,按照文档的解释,这个参数可以为ROS_HOME或node。当设置为ROS_HOME时,cwd为ROS_HOME参数指定的位置。当设置为node时就是对应node所在的位置。但是如果你echo $ROS_HOME时会发现这个值没有设置。当你进入node源文件所在的位置时你会发现没有刚生成的文件。

      实际上当把cwd设置为ROS_HOME时,默认的cwd是 ~/.ros。当cwd设置成node时默认的位置是node所在的workspace的devel文件夹内。以小强为例,image_view video_recoder默认的文件保存路径就在/home/xiaoqiang/Documents/ros/devel/lib/image_view内

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2015-2023 BlueWhale community