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:01] – [Adapting OWL and Prolog files to the new libraries] admin | doc:catkin_migration [2014/09/05 13:13] – [Adapting OWL and Prolog files to the new libraries] admin | ||
---|---|---|---|
Line 7: | Line 7: | ||
As a first step, you can use the [[http:// | As a first step, you can use the [[http:// | ||
* Clean up the package.xml, | * Clean up the package.xml, | ||
- | * Update the CMakeLists.txt. Please check for [[https:// | + | * Update the CMakeLists.txt, also update changed |
- | * Remove all rosbuild and old rosjava statements, e.g. for generating .owl from .owl.in files. | + | |
===== Converting Java packages ===== | ===== Converting Java packages ===== | ||
Line 14: | Line 13: | ||
Rosjava uses the gradle builsystem that is at the moment (07/2014) only loosely integrated with catkin. Therefore, some things like dependencies need to be specified multiple times. Make sure to read the official documentation in the [[http:// | Rosjava uses the gradle builsystem that is at the moment (07/2014) only loosely integrated with catkin. Therefore, some things like dependencies need to be specified multiple times. Make sure to read the official documentation in the [[http:// | ||
- | There is a one-to-many relation between catkin packages and rosjava sub-projects as described [[http:// | + | ==== Package structure ==== |
+ | |||
+ | 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 34: | Line 38: | ||
|- package.xml | |- package.xml | ||
\- ... | \- ... | ||
+ | |||
+ | ==== JAR files and build dependencies ==== | ||
+ | Rosjava is now based on Maven that ' | ||
+ | |||
+ | dependencies { | ||
+ | /* Dependency on a rosjava project in the same catkin package */ | ||
+ | compile project(': | ||
+ | | ||
+ | /* Dependency on a rosjava project in another catkin package */ | ||
+ | compile ' | ||
+ | | ||
+ | /* Dependency on external jar files (will be downloaded from mavencentral */ | ||
+ | compile ' | ||
+ | } | ||
+ | |||
+ | 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, | ||
+ | |||
+ | 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 45: | Line 82: | ||
* Update launch files to the new json_prolog interface: | * Update launch files to the new json_prolog interface: | ||
+ | <code xml> | ||
< | < | ||
< | < | ||
Line 52: | 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 ===== | ||