File System of ROS (II)

Source: Internet
Author: User

The basic concept of the Ros file system,

The two most basic concepts in the Ros File system: Package and manifest, which are packages and manifest files.

The package is the most basic unit for organizing Ros code, and each package can include library files, executable files, scripts, and some other files.

The manifest file is a description of the package's related information. He provides the dependencies between packages, as well as the meta-information of a package, such as version, maintenance, and licensing information.

The file system provides several useful command-line tools that are designed to operate on Ros file systems.

Rospack is used to obtain information about a package, which only describes its find options, as follows:

# rospack Find [Package_name]  

You can enter in a newly opened terminal such as

Rospack Find Roscpp  

you can find the location information for the Roscpp package, which may return a result similar to the following:



The ROSCD command allows you to use the name of the package to switch directly to the appropriate file directory, which is, of course, used by the Ros file system as follows

    1. ROSCD [Locationname[/subdir]]


To give an example, enter directly in the terminal:



ROSCD will only open directories and subdirectories that exist with the environment variable Ros_package_path, you can use the following command to view the contents of the Ros_package_path:

Echo $ROS _package_path  


The results that you see may resemble the following:

Each path uses a ":" Split.

ROSCD log will take you to the Ros storage log file under the directory, of course, if you have not previously run any ROS program, then will be prompted with an error, that is, the log folder does not exist.

Rosls allows you to directly use the name of the package to enumerate all the files and folders in the package without using an absolute path. Its use is the same as ROSCD, only the directory and its subdirectories that exist in Ros_package_path can use this command. Here's how to use it:

# ROSLS [Locationname[/subdir]]


Examples are as follows:

People who have previously used Linux command-line experience know that we can use the TAB key to provide convenience when entering a long file name, such as Ros:

# ROSCD Roscpp_tut<<< now push the TAB key >>> /c1>


After you enter the TAB key, you see the following results:

ROSCD roscpp_tutorials/



Of course, there are occasions when multiple files in the working directory have the same prefix, we need to enter them until the system can recognize them.

I believe many friends who have used Linux will find that these commands are very similar to the commands under Linux.

You may have noticed how the ROS command tool is named:

    • Rospack = Ros + Pack (age)
    • ROSCD = Ros + CD
    • Rosls = ros + ls

This naming method is used in many ROS command tools.

File System of ROS (II)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.