Skip to content

Conversation

@mini-1235
Copy link

@mini-1235 mini-1235 commented Nov 6, 2025

Description

This PR adds the code from https://docs.ros.org/en/rolling/Tutorials/Beginner-Client-Libraries/Pluginlib.html.

Note that this PR moves the area_node executable from polygon_base to polygon_plugins, if the maintainers approve, I can also open a PR to update the documentation

Fixes # (issue)

Is this user-facing behavior change?

No

Did you use Generative AI?

No

Additional Information

Comment on lines 38 to 44
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove, these linters should work

<package format="2">
<name>polygon_base</name>
<version>0.21.3</version>
<description>Examples of polygon base</description>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better description


<license>Apache License 2.0</license>

<author email="[email protected]">Jacob Perron</author>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add yourself here

<package format="2">
<name>polygon_plugins</name>
<version>0.21.3</version>
<description>Example of polygon plugins</description>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better description


<license>Apache License 2.0</license>

<author email="[email protected]">Jacob Perron</author>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add yourself as the author

<class type="polygon_plugins::Triangle" base_class_type="polygon_base::RegularPolygon" name="awesome_triangle">
<description>This is a triangle plugin.</description>
</class>
</library> No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new line

mini-1235 and others added 2 commits November 6, 2025 22:49
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
@mini-1235 mini-1235 requested a review from ahcorde November 6, 2025 15:08
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>polygon_base</name>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I rename the package?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to do that? and into what name?

and if we do that, probably the tutorial in the documentation should be changed accordingly to keep the consistency?

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this example should not stay in this repository.

  • this examples repository provides the examples how to use APIs and interfaces provided by rclcpp, such as endpoints, nodes, waitsets and so on.
  • plugin is NOT provided by rclcpp, and rclcpp feature neither. if we take this, everything cpp can be example in this repository.
  • i highly suggest this example should be maintained in https://github.com/ros/pluginlib, because that is the library provides the APIs and interfaces. (and probably go through the release process as well to release the package for the distribution)

@@ -0,0 +1,3 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be during release process? we are planning to release this package, correct?

<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>polygon_base</name>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to do that? and into what name?

and if we do that, probably the tutorial in the documentation should be changed accordingly to keep the consistency?

@@ -0,0 +1,3 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. i think this should be generated by release tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants