New Tool: roscompile - Catkin Metadata Helper

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
I have a confession to make. I'm not very good at Catkin. One reason
is because there is a lot more metadata to maintain. Unlike Ye Olde
Rosbuild, where you could add a dependency by adding a single tag in
the manifest, Catkin requires you add the build and run dependencies
to the package.xml, as well as add the dependencies in the
CMakeLists.txt in a couple places.

That's why I've developed a tool called roscompile, which I've found
invaluable for cleaning up my packages for release. It attempts to do
the hard work for you by 'compiling' the information that already
exists in the package.

 * Did you just add a dependency on a new package in your source code?
roscompile will read the source and add the appropriate tags to your
package.xml and CMakeLists.txt.

 * Create a new launch file that uses map_server? roscompile reads
launch files to add run_depends.

 * Add a new msg/srv/action/dynamic_reconfiguration/plugin? roscompile
generates the metadata for that too.

Check it out here: https://github.com/DLu/roscompile
(contains a full list of features and issues page)

Of course, the tool is far from perfect. It should not be used to
blindly make changes to critical repos. I welcome collaboration to
help cover people's use cases other than my own.

Happy Catkining,
David!!
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
On 24/07/15 15:39, David Lu!! via ros-users wrote:
> I have a confession to make. I'm not very good at Catkin. One reason
> is because there is a lot more metadata to maintain. Unlike Ye Olde
> Rosbuild, where you could add a dependency by adding a single tag in
> the manifest, Catkin requires you add the build and run dependencies
> to the package.xml, as well as add the dependencies in the
> CMakeLists.txt in a couple places.
[..]
> Check it out here: https://github.com/DLu/roscompile
> (contains a full list of features and issues page)
[..]

David,

this seems like a nice tool. Any particular reason it is (currently) a
rosbuild package (apart from you not being 'very good at Catkin' :))?


Gijs

_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
I started this back when my default was to start projects in rosbuild.
Also, I have 13 separate Catkin workspaces in my home directory, and
having it be rosbuilt meant I could access the tool from any one of
them. Also, I enjoy the irony.

That said, https://github.com/DLu/roscompile/issues/4
I will likely Catkinize and release it soon.

On Fri, Jul 24, 2015 at 9:44 AM, G.A. vd. Hoorn - 3ME via ros-users
<[hidden email]> wrote:

> On 24/07/15 15:39, David Lu!! via ros-users wrote:
>>
>> I have a confession to make. I'm not very good at Catkin. One reason
>> is because there is a lot more metadata to maintain. Unlike Ye Olde
>> Rosbuild, where you could add a dependency by adding a single tag in
>> the manifest, Catkin requires you add the build and run dependencies
>> to the package.xml, as well as add the dependencies in the
>> CMakeLists.txt in a couple places.
>
> [..]
>>
>> Check it out here: https://github.com/DLu/roscompile
>> (contains a full list of features and issues page)
>
> [..]
>
> David,
>
> this seems like a nice tool. Any particular reason it is (currently) a
> rosbuild package (apart from you not being 'very good at Catkin' :))?
>
>
> Gijs
>
>
> _______________________________________________
> ros-users mailing list
> [hidden email]
> http://lists.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
+1 Awesome...thanks for sharing David!

Shaun Edwards
Senior Research Engineer
Manufacturing System Department


http://robotics.swri.org
http://rosindustrial.swri.org/
http://ros.swri.org
Join the ROS-Industrial Developers List
Southwest Research Institute
210-522-3277


-----Original Message-----
From: ros-users [mailto:[hidden email]] On Behalf Of David Lu!! via ros-users
Sent: Friday, July 24, 2015 9:02 AM
To: G.A. vd. Hoorn - 3ME; User discussions
Subject: Re: [ros-users] New Tool: roscompile - Catkin Metadata Helper

I started this back when my default was to start projects in rosbuild.
Also, I have 13 separate Catkin workspaces in my home directory, and having it be rosbuilt meant I could access the tool from any one of them. Also, I enjoy the irony.

That said, https://github.com/DLu/roscompile/issues/4
I will likely Catkinize and release it soon.

On Fri, Jul 24, 2015 at 9:44 AM, G.A. vd. Hoorn - 3ME via ros-users <[hidden email]> wrote:

> On 24/07/15 15:39, David Lu!! via ros-users wrote:
>>
>> I have a confession to make. I'm not very good at Catkin. One reason
>> is because there is a lot more metadata to maintain. Unlike Ye Olde
>> Rosbuild, where you could add a dependency by adding a single tag in
>> the manifest, Catkin requires you add the build and run dependencies
>> to the package.xml, as well as add the dependencies in the
>> CMakeLists.txt in a couple places.
>
> [..]
>>
>> Check it out here: https://github.com/DLu/roscompile (contains a full
>> list of features and issues page)
>
> [..]
>
> David,
>
> this seems like a nice tool. Any particular reason it is (currently) a
> rosbuild package (apart from you not being 'very good at Catkin' :))?
>
>
> Gijs
>
>
> _______________________________________________
> ros-users mailing list
> [hidden email]
> http://lists.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
In reply to this post by Risto Kojcev via Discourse.ros.org via ros-users
Does this only add dependencies or also remove obsolete ones (where no
usage could be detected)?
Could this be rather added to roslint or catkin_lint?


On 2015-07-24 15:39, David Lu!! via ros-users wrote:

> I have a confession to make. I'm not very good at Catkin. One reason
> is because there is a lot more metadata to maintain. Unlike Ye Olde
> Rosbuild, where you could add a dependency by adding a single tag in
> the manifest, Catkin requires you add the build and run dependencies
> to the package.xml, as well as add the dependencies in the
> CMakeLists.txt in a couple places.
>
> That's why I've developed a tool called roscompile, which I've found
> invaluable for cleaning up my packages for release. It attempts to do
> the hard work for you by 'compiling' the information that already
> exists in the package.
>
>  * Did you just add a dependency on a new package in your source code?
> roscompile will read the source and add the appropriate tags to your
> package.xml and CMakeLists.txt.
>
>  * Create a new launch file that uses map_server? roscompile reads
> launch files to add run_depends.
>
>  * Add a new msg/srv/action/dynamic_reconfiguration/plugin? roscompile
> generates the metadata for that too.
>
> Check it out here: https://github.com/DLu/roscompile
> (contains a full list of features and issues page)
>
> Of course, the tool is far from perfect. It should not be used to
> blindly make changes to critical repos. I welcome collaboration to
> help cover people's use cases other than my own.
>
> Happy Catkining,
> David!!
> _______________________________________________
> ros-users mailing list
> [hidden email]
> http://lists.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
Right now it only adds dependencies. Ticketed removal:
https://github.com/DLu/roscompile/issues/6

roslint is primarily for identifying errors, as I understand it. I
wasn't aware of catkin_lint. I wish I had been because CMake parsing
is hard.

I could imagine integrating with catkin_lint, but don't have the
cycles to undertake that at the moment.

On Fri, Jul 24, 2015 at 10:54 AM, kruset <[hidden email]> wrote:

> Does this only add dependencies or also remove obsolete ones (where no usage
> could be detected)?
> Could this be rather added to roslint or catkin_lint?
>
>
> On 2015-07-24 15:39, David Lu!! via ros-users wrote:
>>
>> I have a confession to make. I'm not very good at Catkin. One reason
>> is because there is a lot more metadata to maintain. Unlike Ye Olde
>> Rosbuild, where you could add a dependency by adding a single tag in
>> the manifest, Catkin requires you add the build and run dependencies
>> to the package.xml, as well as add the dependencies in the
>> CMakeLists.txt in a couple places.
>>
>> That's why I've developed a tool called roscompile, which I've found
>> invaluable for cleaning up my packages for release. It attempts to do
>> the hard work for you by 'compiling' the information that already
>> exists in the package.
>>
>>  * Did you just add a dependency on a new package in your source code?
>> roscompile will read the source and add the appropriate tags to your
>> package.xml and CMakeLists.txt.
>>
>>  * Create a new launch file that uses map_server? roscompile reads
>> launch files to add run_depends.
>>
>>  * Add a new msg/srv/action/dynamic_reconfiguration/plugin? roscompile
>> generates the metadata for that too.
>>
>> Check it out here: https://github.com/DLu/roscompile
>> (contains a full list of features and issues page)
>>
>> Of course, the tool is far from perfect. It should not be used to
>> blindly make changes to critical repos. I welcome collaboration to
>> help cover people's use cases other than my own.
>>
>> Happy Catkining,
>> David!!
>> _______________________________________________
>> ros-users mailing list
>> [hidden email]
>> http://lists.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|

Re: New Tool: roscompile - Catkin Metadata Helper

Risto Kojcev via Discourse.ros.org via ros-users
David,

This looks like a convenient tool! How does it know when to add a dependency for you based on your source code? Does that work with Python or C++ or both (or other languages)?

It seems like some of these features would be good additions to catkin_lint, and some of the convenience could be captured with a `catkin_lint <package_name> --apply` or something like that.

You also mentioned checking launch files and adding missing dependencies based on that. Does that overlap with the cmake macro roslaunch provides?:


Maybe they could share logic, where the test (which is used for regression testing) and the tool use common logic to detect the problem, but the tool can additionally fix the issue (--apply/--fix semantic)?

I can sympathize with the parsing of CMake, I helped one of my coworkers at Willow with the parsing when we were writing the first version of the catkinize script (I don't think it is using this library anymore though):


I eventually had to fork it (I didn't have access to the pypi login and couldn't reach the previous maintainer), but maybe that library could help you with the parsing.

Also we've used this cmake-lint library which parses CMake as part of the linting, maybe it could also be an inspiration:


Thanks for sharing!

On Fri, Jul 24, 2015 at 8:28 AM, David Lu!! via ros-users <[hidden email]> wrote:
Right now it only adds dependencies. Ticketed removal:
https://github.com/DLu/roscompile/issues/6

roslint is primarily for identifying errors, as I understand it. I
wasn't aware of catkin_lint. I wish I had been because CMake parsing
is hard.

I could imagine integrating with catkin_lint, but don't have the
cycles to undertake that at the moment.

On Fri, Jul 24, 2015 at 10:54 AM, kruset <[hidden email]> wrote:
> Does this only add dependencies or also remove obsolete ones (where no usage
> could be detected)?
> Could this be rather added to roslint or catkin_lint?
>
>
> On 2015-07-24 15:39, David Lu!! via ros-users wrote:
>>
>> I have a confession to make. I'm not very good at Catkin. One reason
>> is because there is a lot more metadata to maintain. Unlike Ye Olde
>> Rosbuild, where you could add a dependency by adding a single tag in
>> the manifest, Catkin requires you add the build and run dependencies
>> to the package.xml, as well as add the dependencies in the
>> CMakeLists.txt in a couple places.
>>
>> That's why I've developed a tool called roscompile, which I've found
>> invaluable for cleaning up my packages for release. It attempts to do
>> the hard work for you by 'compiling' the information that already
>> exists in the package.
>>
>>  * Did you just add a dependency on a new package in your source code?
>> roscompile will read the source and add the appropriate tags to your
>> package.xml and CMakeLists.txt.
>>
>>  * Create a new launch file that uses map_server? roscompile reads
>> launch files to add run_depends.
>>
>>  * Add a new msg/srv/action/dynamic_reconfiguration/plugin? roscompile
>> generates the metadata for that too.
>>
>> Check it out here: https://github.com/DLu/roscompile
>> (contains a full list of features and issues page)
>>
>> Of course, the tool is far from perfect. It should not be used to
>> blindly make changes to critical repos. I welcome collaboration to
>> help cover people's use cases other than my own.
>>
>> Happy Catkining,
>> David!!
>> _______________________________________________
>> ros-users mailing list
>> [hidden email]
>> http://lists.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users



--
William Woodall
ROS Development Team

_______________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users