ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Folder struct understanding

asked 2022-05-02 10:34:29 -0600

Flash gravatar image

Hi,
I am trying to understand the folder struct that's created ros2 pkg create --build-type ament_python robot_pkg. Here is the folder structure

robot_pkg
        ├── package.xml
        ├── resource
        │   └── robot_pkg
        ├── setup.cfg
        ├── setup.py
        ├── test
        │   ├── __pycache__
        │   │   ├── test_copyright.cpython-38-PYTEST.pyc
        │   │   ├── test_flake8.cpython-38-PYTEST.pyc
        │   │   └── test_pep257.cpython-38-PYTEST.pyc
        │   ├── test_copyright.py
        │   ├── test_flake8.py
        │   └── test_pep257.py
        └── robot_pkg
            ├── __init__.py
            ├── mqtt_subscriber.py
            ├── __pycache__
            │   └── __init__.cpython-38.pyc
            └── robot.py

I am more interested in test, resource and __init__.py. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-05-02 12:54:34 -0600

ljaniec gravatar image

resource/robot_pkg - In order to detect that a package is installed, ROS2 needs to install a marker file. Similar to installing the packages manifest in ROS 1.

You can read more about colcon File System Index Layout there:

https://github.com/ament/ament_cmake/...

test - I put there non-ROS-node specific unit tests, use them like there:

https://docs.ros.org/en/foxy/Tutorial...

Source about colcon:

https://colcon.readthedocs.io/en/rele...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-05-02 10:34:29 -0600

Seen: 173 times

Last updated: May 02 '22