-
Notifications
You must be signed in to change notification settings - Fork 353
Add pluginlib tutorial code #430
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
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
| # 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) |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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="jacob@openrobotics.org">Jacob Perron</author> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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="jacob@openrobotics.org">Jacob Perron</author> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
| <?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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that other packages are prefixed with example_rclcpp, that's why I am asking if it is required to rename it
fujitatomoya
left a comment
There was a problem hiding this 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 @@ | |||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |||
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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 @@ | |||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |||
There was a problem hiding this comment.
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.
|
Basically, the reason I brought this up is because I was trying to find a minimal pluginlib example through the ros2_documentation. The tutorial is there, but the actual code doesn't exist in examples/demos repository. That means I would have to copy + paste every snippet from the docs, which is very inconvenient :( IMO, any code referenced in the ros2_documentation should exist somewhere, either in the demos/examples repo or even in the pluginlib repo you mentioned. It will also make the tutorial easier to follow And, honestly, I didn't know this repo is strictly for rclcpp examples, especially since the README points users to the ROS 2 Tutorials page("To see some of these examples in use, visit the ROS 2 Tutorials page"). This made it a bit unclear that only rclcpp-related examples belong here |
|
yeah i understand your point, let's wait for the feedback from other developers?
true, i am not against this.
agree.
yeah that is true. i personally think examples (not demonstration) should stay with the library to align with the development... this keeps the development consistent and compatible all together. |
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_nodeexecutable frompolygon_basetopolygon_plugins, if the maintainers approve, I can also open a PR to update the documentationFixes # (issue)
Is this user-facing behavior change?
No
Did you use Generative AI?
No
Additional Information