Ask Your Question
1

how bare-bones can ros2 get?

asked 2018-08-02 13:52:20 -0500

LiamNelson gravatar image

I've been experimenting with ros2 on a raspberry pi zero and a co-worker asked a pretty interesting question. If all I want from ros2 is the communication system, how bare-bones can I get?

In other words, what are the absolutely necessary parts of ros2 and what can I do without?

Thanks!

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2018-08-03 08:04:47 -0500

updated 2018-08-03 08:09:36 -0500

If you want only the communication system to work, then you can find the dependencies for the examples packages. You will still have to compile some core packages like RCL, RMW, DDS, default messages and build packages. However, you will have all the publishers/subscriber functionalities.

If that helps, I followed those steps a few time back and it gave me the following results for the subscriber. It can be reduced as it is fetching openslice and fastrtps dds libraries.

Install:

export ROSDISTRO_INDEX_URL='https://raw.githubusercontent.com/ros2/rosdistro/ros2/index.yaml'
sudo apt-get install python-rosinstall-generator

Run:

rosinstall_generator examples_rclcpp_minimal_publisher --rosdistro bouncy --deps

- git:
    local-name: ament_cmake/ament_cmake
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_core
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_core/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_export_definitions
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_export_definitions/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_export_dependencies
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_export_dependencies/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_export_include_directories
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_export_include_directories/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_export_interfaces
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_export_interfaces/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_export_libraries
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_export_libraries/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_export_link_flags
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_export_link_flags/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_gmock
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_gmock/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_gtest
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_gtest/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_libraries
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_libraries/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_pytest
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_pytest/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_python
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_python/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_target_dependencies
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_target_dependencies/0.5.1-0
- git:
    local-name: ament_cmake/ament_cmake_test
    uri: https://github.com/ros2-gbp/ament_cmake-release.git
    version: release/bouncy/ament_cmake_test/0.5.1-0
- git:
    local-name: ament_cmake_ros
    uri: https://github.com/ros2-gbp/ament_cmake_ros-release.git
    version: release/bouncy/ament_cmake_ros/0.5.0-0
- git:
    local-name: ament_index/ament_index_python
    uri: https://github.com/ros2-gbp/ament_index-release.git
    version: release/bouncy/ament_index_python/0.5.1-0
- git:
    local-name: ament_lint/ament_cmake_copyright
    uri: https://github.com/ros2-gbp/ament_lint-release.git
    version: release/bouncy/ament_cmake_copyright/0.5.2-0
- git:
    local-name: ament_lint/ament_cmake_cppcheck
    uri: https://github.com/ros2-gbp/ament_lint-release.git
    version: release/bouncy/ament_cmake_cppcheck/0.5.2-0
- git:
    local-name: ament_lint/ament_cmake_cpplint
    uri: https://github.com/ros2-gbp/ament_lint-release.git
    version: release/bouncy/ament_cmake_cpplint/0.5.2-0
- git:
    local-name: ament_lint/ament_cmake_flake8
    uri: https://github.com/ros2-gbp/ament_lint-release.git
    version: release/bouncy/ament_cmake_flake8/0.5.2-0
- git:
    local-name: ament_lint/ament_cmake_lint_cmake
    uri: https://github.com/ros2-gbp/ament_lint-release.git
    version: release/bouncy/ament_cmake_lint_cmake/0.5.2-0
- git:
    local-name: ament_lint ...
(more)
edit flag offensive delete link more

Comments

You don't need a custom ROSDISTRO_INDEX_URL anymore. The ROS 2 distros have been integrated into https://github.com/ros/rosdistro .

Dirk Thomas gravatar imageDirk Thomas ( 2019-03-26 12:02:15 -0500 )edit
1

answered 2018-08-02 15:14:57 -0500

Dirk Thomas gravatar image

The smallest set of packages you need depends on your use case. You can use the rosinstall_generator to generate a list of repos which you need by specifying your direct dependencies (e.g. rclcpp, rosidl_default_generators). The tool will make sure that all recursive dependencies are being fetched too.

You will need to set the ROSDISTRO_INDEX_URL environment variable as mentioned here to pick up ROS 2 distros (rather than ROS 1 distros).

edit flag offensive delete link more

Comments

You don't need a custom ROSDISTRO_INDEX_URL anymore. The ROS 2 distros have been integrated into https://github.com/ros/rosdistro .

Dirk Thomas gravatar imageDirk Thomas ( 2019-03-26 12:02:17 -0500 )edit
0

answered 2018-08-03 13:38:59 -0500

austinstig gravatar image

I am also trying to get this to work. I'm running in a chroot with a qemu arm emulator in arch linux. Once I build the repo file, I run "$vcs-tools src < ros2.repo" to make my src directory. Then I run "$src/ament_tools/scripts/ament.py build --symlink-install" and it cannot find ament_cmake_include_directories. I'm not exactly sure how the build system works. Do you know what I might have done wrong?

edit flag offensive delete link more

Comments

Maybe ask another question on the forum as it is quite different from the first one. You don't want to cross compile ? I was also compiling ros2 using qemu and it was taking a long time. Have you downloaded and aptget all the dependencies https://github.com/ros2/ros2/wiki/Lin...

pokitoz gravatar imagepokitoz ( 2018-08-04 01:46:51 -0500 )edit

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: 2018-08-02 13:52:20 -0500

Seen: 166 times

Last updated: Aug 03 '18