Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Your First ROS2 Package #954

Closed
3 tasks
Yadunund opened this issue May 1, 2023 · 11 comments
Closed
3 tasks

Creating Your First ROS2 Package #954

Yadunund opened this issue May 1, 2023 · 11 comments

Comments

@Yadunund
Copy link
Member

Yadunund commented May 1, 2023

Check the documentation for the 'Creating Your First ROS2 Package' page

Setup

  • DDS vendor: FastDDS
  • BuildType: Debian
  • Os: Ubuntu Jammy
  • Chip: Amd64

Links

Checks

  • I was able to follow the documentation.
  • The documentation seemed clear to me.
  • The documentation didn't have any obvious errors.

You can find the code used to generate this test case here

@cdhabecker
Copy link

I'll take this one.

@cdhabecker
Copy link

"Package" terminology is inconsistent. There is a fine definition at Glossary. But then, at https://docs.ros.org/en/iron/Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package.html#what-is-a-ros-2-package:

A package can be considered a container for your ROS 2 code.

The fix:

A ROS 2 package is an organizational unit for ROS 2 code.

@cdhabecker
Copy link

"Build system", "build tool", "build type" terminology is inconsistent.

At What is a ROS 2 package:

Package creation in ROS 2 uses ament as its build system and colcon as its build tool. You can create a package using either CMake or Python, which are officially supported, though other build types do exist.

At About Build System:

Under everything is the build system (cdh: which is what?). Iterating on catkin from ROS 1, we have created a set of packages under the moniker ament. (cdh: are those packages the build system?)

ament package
Any package which contains a package.xml and follows the packaging guidelines of ament, regardless of the underlying build system.

Since the term ament package is build system agnostic, there can be different kinds of ament packages, e.g. ament CMake package, ament Python package, etc.

...the build systems of different packages.

The ament_cmake_core package also provides features of the ament build system ...

The ament Github doesn't have any doc, so I asked google and found The build system ament_cmake and the meta build tool ament_tools:

ament is a meta build system to improve building applications which are split into separate packages. It consists of two major parts:

a build system (e.g. CMake, Python setuptools) to configure, build, and install a single package
a tool to invoke the build of individual packages in their topological order

@cdhabecker
Copy link

Error in the doc at What makes up a ROS 2 package:

The simplest possible package may have a file structure that looks like:
Python

my_package/
      setup.py
      package.xml
      resource/my_package

But the preceding paragraph stated:

minimum required contents:
Python
package.xml file containing meta information about the package

setup.py containing instructions for how to install the package

setup.cfg is required when a package has executables, so ros2 run can find them

/<package_name> - a directory with the same name as your package, used by ROS 2 tools to find your package, contains init.py

So, "resource/my_package" isn't mentioned in the requirements, and the simplest package doesn't contain "/<package_name>" as per the requirements.

@Yadunund
Copy link
Member Author

Yadunund commented May 5, 2023

Thanks for the valuable feedback. I've added your points to the ongoing discussion on documentation improvements #1047
It would be great if you could directly open PRs to the upstream documentation repo with the changes you have proposed. We can discuss changes in the PRs directly.

Apart from the documentation errors, any issues with creating the package itself?

@cdhabecker
Copy link

@Yadunund , I decided to run through all of the preceding tutorials (even though Tyler already closed the corresponding issues) because each tutorial expects that you've been through the previous tutorials. Almost done.

@fujitatomoya
Copy link

I will check the procedure too (including aarch64 platform), /assign @fujitatomoya

fujitatomoya added a commit to ros2/ros2cli that referenced this issue May 6, 2023
  osrf/ros2_test_cases#954

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya added a commit to ros2/ros2_documentation that referenced this issue May 6, 2023
  osrf/ros2_test_cases#954

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link

@Yadunund @clalancette

can you guys take a look at ros2/ros2cli#827 and ros2/ros2_documentation#3535.

everything else works w/o any problems, including aarch64 platform.

fujitatomoya added a commit to ros2/ros2cli that referenced this issue May 6, 2023
osrf/ros2_test_cases#954

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
mergify bot pushed a commit to ros2/ros2cli that referenced this issue May 6, 2023
osrf/ros2_test_cases#954

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit ad7fec5)
clalancette pushed a commit to ros2/ros2cli that referenced this issue May 7, 2023
osrf/ros2_test_cases#954

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit ad7fec5)

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@clalancette
Copy link
Collaborator

A ROS 2 package is an organizational unit for ROS 2 code.

See ros2/ros2_documentation#3540 for a small update to make it more consistent with the Glossary.

@clalancette
Copy link
Collaborator

Error in the doc at What makes up a ROS 2 package:

See ros2/ros2_documentation#3541 for a fix.

@clalancette
Copy link
Collaborator

"Build system", "build tool", "build type" terminology is inconsistent.

This is actually a larger problem, in that we actually don't have completely standardized terms for all of this. Fixing this up means first agreeing on standard terms, and then updating all of the documentation with it. That is a worthwhile effort, but beyond the scope of what we are going to do for the Iron release.

@cdhabecker What I'll suggest here is opening an issue over at https://github.com/ros2/ros2_documentation , mentioning that this is a problem that we should follow up with later on.

With that, I'm going to close this issue out. Thank you for the testing.

clalancette pushed a commit to ros2/ros2_documentation that referenced this issue May 8, 2023
* ros2pkg generates license warning messages.

  osrf/ros2_test_cases#954

* use `--license` option for the tutorial with ros2pkg command.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
mergify bot pushed a commit to ros2/ros2_documentation that referenced this issue May 8, 2023
* ros2pkg generates license warning messages.

  osrf/ros2_test_cases#954

* use `--license` option for the tutorial with ros2pkg command.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit f29796f)
clalancette pushed a commit to ros2/ros2_documentation that referenced this issue May 9, 2023
* ros2pkg generates license warning messages.

  osrf/ros2_test_cases#954

* use `--license` option for the tutorial with ros2pkg command.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit f29796f)

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants