Ask Your Question
0

Folder struct understanding

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

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 -0500

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 51 times

Last updated: May 02