Navigating the ROS Filesystem

Started exploring ROS tutorial Navigating the ROS Filesystem which introduces ROS filesystem concepts, and covers using the roscd, rosls, and rospack commandline tools.

Tutorial gives Quick Overview of Filesystem Concepts
Packages: Packages are the lowest level of ROS software organization. They can contain anything: libraries, tools, executables, etc.
Manifest: A manifest is a description of a package. Its most important role is to define dependencies between packages.
Stacks: Stacks are collections of packages that form a higher-level library.
Stack Manifest: These are just like normal manifests, but for stacks.

  • rospack and rosstack are part of the rospack suite. These allow you to get information about packages and stacks.
  • I quickly tried

    $ rospack find roscpp

    which returned

    /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp

  • roscd is part of the rosbash suite. It allows you to change directory (cd) directly to a package or a stack.
  • As per tutorial I tried

    $ roscd roscpp
    $ pwd

    $ roscd roscpp/include
    $ pwd

    This tutorial mentions about few environment variables

    $ echo $ROS_PACKAGE_PATH
    $ echo $ROS_ROOT

  • rosls is part of the rosbash suite. It allows you to ls directly in a package, stack, or common location by name rather than by package path.

  • $ rosls roscpp_tutorials

    Would return:

    add_two_ints_client listener listener_with_userdata srv
    add_two_ints_server listener_async_spin Makefile srv_gen
    add_two_ints_server_class listener_class manifest.xml talker
    anonymous_listener listener_multiple node_handle_namespaces time_api
    babbler listener_single_message notify_connect timers
    bin listener_threaded_spin parameters
    CMakeLists.txt listener_unreliable ROS_NOBUILD
    custom_callback_processing listener_with_tracked_object src

    I also tried Tab Completion, which works well

    To conclude, following ROS tools are covered in ROS tutorial

    rospack = ros + pack(age)
    rosstack = ros + stack
    roscd = ros + cd
    rosls = ros + ls

    This entry was posted in ROS and tagged , , . Bookmark the permalink.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>