Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:catkin_migration [2014/07/10 13:09] – [Catkinization] admin | doc:catkin_migration [2014/09/05 13:14] – [JAR files and build dependencies] admin | ||
---|---|---|---|
Line 15: | Line 15: | ||
==== Package structure ==== | ==== Package structure ==== | ||
- | There is a one-to-many relation between catkin packages and rosjava sub-projects as described [[http:// | + | There is a one-to-many relation between catkin packages and rosjava sub-projects as described [[http:// |
+ | This structure can be created using the tools in [[http:// | ||
+ | |||
+ | For example, the json_prolog package (depending on the service defined in json_prolog_msgs) looks like this: | ||
json_prolog_msgs | json_prolog_msgs | ||
Line 36: | Line 39: | ||
\- ... | \- ... | ||
- | ==== JAR files and dependencies ==== | + | ==== JAR files and build dependencies ==== |
Rosjava is now based on Maven that ' | Rosjava is now based on Maven that ' | ||
+ | <code java> | ||
dependencies { | dependencies { | ||
/* Dependency on a rosjava project in the same catkin package */ | /* Dependency on a rosjava project in the same catkin package */ | ||
Line 49: | Line 52: | ||
compile ' | compile ' | ||
} | } | ||
+ | </ | ||
You can use the service at http:// | You can use the service at http:// | ||
+ | |||
+ | ==== Run dependencies when calling Java from Prolog ==== | ||
+ | |||
+ | In the ' | ||
+ | |||
+ | This is not easy with the existing tools (since the exporting packages are not by themselves catkin packages), so we had to find another solution: During compilation, | ||
+ | <code java> | ||
+ | task writeClasspath << { | ||
+ | buildDir.mkdirs() | ||
+ | new File(buildDir, | ||
+ | ":" | ||
+ | project.name + " | ||
+ | project.version + " | ||
+ | } | ||
+ | </ | ||
+ | ... and add the writeClasspath task to the CMakeLists.txt: | ||
+ | catkin_rosjava_setup(installApp publishMavenJavaPublicationToMavenRepository writeClasspath) | ||
+ | |||
===== Adapting OWL and Prolog files to the new libraries ===== | ===== Adapting OWL and Prolog files to the new libraries ===== | ||
Line 61: | Line 82: | ||
* Update launch files to the new json_prolog interface: | * Update launch files to the new json_prolog interface: | ||
+ | <code xml> | ||
< | < | ||
< | < | ||
Line 68: | Line 89: | ||
< | < | ||
</ | </ | ||
+ | </ | ||
+ | * Replace all *.cs.tum.edu-IRIs with knowrob.org. You can use the following command to replace them in most common files in all subfolders of the current directory: | ||
+ | < | ||
+ | $ rosrun rosprolog migrate_owl_iri | ||
+ | </ | ||
===== Changelog ===== | ===== Changelog ===== | ||