-
Notifications
You must be signed in to change notification settings - Fork 281
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
catkin_create_pkg/stack scripts #173
Conversation
It will not make sense when we move to packages-only in the near future. As soon as we have made that step it would be great if you could provide an equivalent for the new packages. |
ok, removed anything related to stacks. Now it only has a script that creates catkin 'packages', meaning a CMakeLists.txt and a manifest.xml. The code is flexible, so just changing the name from manifest.xml.em to package.xml.em would generate that in the future, changing the internal structure would be similar. I need this functionality to write more catkin unit tests anyway. |
Could you update the catkin_create_pkg script to generate a new package for the current catkin version? |
Okay, will do it tomorrow first thing. On Mon, Sep 24, 2012 at 7:17 PM, Dirk Thomas [email protected]:
|
Hi Dirk, the way I see it, it would make most sense to add the creation I started doing so in a private branch of my fork: Currently I still use empy, but it seems to me that it might be more Can you tell me what you think about putting the functionality within regards, On Mon, Sep 24, 2012 at 11:17 PM, Thibault Kruse
|
Hi Thibault, Dropping empy seems reasonable as this is going to be very simple On Tue, Sep 25, 2012 at 2:26 PM, tkruse [email protected] wrote:
Tully Foote |
If simple string substitution is sufficient for the use case you can use the same "template" syntax as CMake's configure_file. That should be straight forward to substituted. But may be it is also valuable to use the same mechanism for templates in catkin / catkin_pkg and not use individual solutions for each case. This might be fitting for each case but more overhead to read through all variants of doing templates. (Still simple configure_file-like substitution is an option...) So the overall question is where we want to go for with catkin. It uses empy since string substitution is not sufficient in a lot of cases. Do we want to stick with empy even if it is not maintained for a long time or look for lightweight alternatives? |
I would recommend just using Python's built-in format mini-language before However, I don't think you can easily replace all of the uses of em in For example: On Tue, Sep 25, 2012 at 3:30 PM, Dirk Thomas [email protected]:
William Woodall |
feature moved to catkin_pkg (see ros-infrastructure/catkin_pkg#1) |
rebased to latest master, refactored, added CMakeLists.txt, unit-tested |
As mentioned in ros-infrastructure/catkin_pkg#1 this should not go into catkin (but stay in catkin_pkg). Implicitly catkin_pkg would depend on catkin which is somehow a circular dependency which will never make it into the manifests. Additionally catkin_pkg must anyway work for with multiple package.xml formats and catkin versions (in the future) when it is released distro-independent. So it should just keep multiple version-specific templates (when that becomes necessary) in catkin_pkg. |
I do not see the circular dependency (other than general BC), and that In fact, if catkin_pkg must know about catkin macros of each distro, that However I don't think anyone else cares, and since I am just a contractor, In that case the file structure and API should be future proof, IMO. This What about the catkin_create_pkg executable, do you want this in catkin_pkg On Wed, Oct 17, 2012 at 8:11 PM, Dirk Thomas [email protected]:
|
I would keep the executable in catkin_pkg to. The logic and all templates will be there so should the CLI script. Keeping the templates in a subfolder is a good idea. Then adding modified templates in the future is easier. |
So you also agree that catkin_create_pkg will have a mandatory parameter catkin_create_pkg foo --groovy ros_comm I woult not make it positional since that would be more confusing. I see no reasonable way to infer for the user what distro he is using. On Wed, Oct 17, 2012 at 11:27 PM, Dirk Thomas [email protected]:
|
If the environment has no distro set and there is more that one template, yes, the user has to specify it. A single template can be selected automatically and if the distro is set in the environment that should be the default if the arguments is not specified. |
I created catkin_create_stack and catkin_create_package scripts.
The purpose of this is threefold:
This is similar to roscreate_pkg and roscreate_stacks
I am aware stacks will go away, but this can still be used for backporting to fuerte, if you decide so. Backporting would be a huge help in making catkin user experience better when switching from fuerte to groovy.
Implementation works, but is not complete, I would like to get feedback before I proceed. For completeness, it would be great to generate and validate more of the inputs, and I am almost sure that the way I interpret dependencies is not right.
The most value is in the comments and code commented in the generated CMakeLists.txt, as this is what most ROS users will heavily rely upon when creating wet packages. So this should be reviewed by several cmake + catkin experts.
One thing that could be changed is to make the package generation also a python API, so that other tools can also create catkin packages, e.g. think of an IDE plugin to create catkin packages.
I use empy for templating.