Ask Your Question
0

Creating Rosjava Packages 4.2 Library Project (Jar) failed

asked 2018-03-04 00:24:34 -0600

tlin40 gravatar image

Hi, I'm using ROS Kinetic on ubuntu 16.04. I'm following the rosjava tutorials 4.2 Library Project (Jar) (page: http://wiki.ros.org/rosjava_build_too... ) but have stuck here for some time. I have succeeded at 4.1 Binary Projects (App).

I've taken a look at similar questions and answers but none of it completely solved my problem. I've tried:

Here's the output of my shell after catkin_make:

Base path: /home/user/rosjava
Source space: /home/user/rosjava/src
Build space: /home/user/rosjava/build
Devel space: /home/user/rosjava/devel
Install space: /home/user/rosjava/install
####
#### Running command: "make cmake_check_build_system" in "/home/user/rosjava/build"
####
####

#### Running command: "make -j4 -l4" in "/home/user/rosjava/build"
####
[  1%] Gradling tasks for rosjava_bootstrap
[  3%] Gradling tasks for my_rosjava_catkin_package
[  5%] Gradling tasks for rosjava_catkin_package_a
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestHeader
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_Composite
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_AddTwoInts
[  5%] Built target std_msgs_generate_messages_lisp
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_CompositeA
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_CompositeB
    [  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestString

[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestPrimitives
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestArrays
[  5%] Built target std_msgs_generate_messages_py
[  5%] Built target std_msgs_generate_messages_nodejs
[  7%] Built target rosjava_test_msgs_generate_messages_java
[  7%] Built target std_msgs_generate_messages_cpp
[  7%] Built target std_msgs_generate_messages_eus
[  9%] Compiling rosjava message artifacts for [std_msgs rosgraph_msgs std_srvs rosjava_test_msgs actionlib_msgs common_msgs diagnostic_msgs geometry_msgs nav_msgs sensor_msgs shape_msgs stereo_msgs trajectory_msgs 

visualization_msgs tf2_msgs ar_track_alvar_msgs uuid_msgs yocs_msgs concert_msgs concert_service_msgs gateway_msgs rocon_app_manager_msgs rocon_device_msgs rocon_interaction_msgs rocon_service_pair_msgs rocon_std_msgs rocon_tutorial_msgs world_canvas_msgs scheduler_msgs move_base_msgs map_store roscpp]
    [  9%] Built target gradle-rosjava_bootstrap

[  9%] Built target sensor_msgs_generate_messages_eus
[  9%] Built target tf2_msgs_generate_messages_nodejs
[  9%] Built target sensor_msgs_generate_messages_py
[  9%] Built target tf2_msgs_generate_messages_lisp
[  9%] Built target sensor_msgs_generate_messages_lisp
    [  9%] Built target tf2_msgs_generate_messages_py

[  9%] Built target tf2_msgs_generate_messages_eus
[  9%] Built target nav_msgs_generate_messages_lisp
[  9%] Built target nav_msgs_generate_messages_eus
[  9%] Built target nav_msgs_generate_messages_py

Generating message artifacts for: 
['std_msgs', 'actionlib_msgs', 'diagnostic_msgs', 'gateway_msgs', 'geometry_msgs', 'ar_track_alvar_msgs', 'move_base_msgs', 'nav_msgs', 'rosgraph_msgs', 'rosjava_test_msgs', 'sensor_msgs', 'shape_msgs', 'std_srvs', 'stereo_msgs', 'tf2_msgs', 'trajectory_msgs', 'uuid_msgs', 'rocon_service_pair_msgs', 'visualization_msgs', 

'world_canvas_msgs', 'roscpp', 'rocon_std_msgs', 'concert_service_msgs', 'rocon_app_manager_msgs', 'concert_msgs', 'rocon_device_msgs', 'rocon_interaction_msgs', 'rocon_tutorial_msgs', 'scheduler_msgs', 'yocs_msgs']

    Skipped re-generation of these message artifacts (clean first): ['std_msgs', 'actionlib_msgs', 'diagnostic_msgs', 'gateway_msgs', 'geometry_msgs', 'ar_track_alvar_msgs', 'move_base_msgs', 'nav_msgs', 'rosgraph_msgs', 

'rosjava_test_msgs', 'sensor_msgs', 'shape_msgs', 'std_srvs', 'stereo_msgs', 'tf2_msgs', 'trajectory_msgs', 'uuid_msgs', 'rocon_service_pair_msgs', 'visualization_msgs', 'world_canvas_msgs', 'roscpp', 'rocon_std_msgs', 'concert_service_msgs', 'rocon_app_manager_msgs', 'concert_msgs', 'rocon_device_msgs', 'rocon_interaction_msgs', 'rocon_tutorial_msgs', 'scheduler_msgs', 'yocs_msgs']

[  9%] Built target rosjava_messages_generate_artifacts
[  9%] Built target geometry_msgs_generate_messages_py
[  9%] Built target actionlib_msgs_generate_messages_nodejs
[  9%] Built target nav_msgs_generate_messages_nodejs
[  9%] Built target geometry_msgs_generate_messages_cpp
[  9%] Built target sensor_msgs_generate_messages_nodejs
[  9%] Built target actionlib_msgs_generate_messages_eus
[  9%] Built target actionlib_msgs_generate_messages_py
[  9%] Built target geometry_msgs_generate_messages_eus
[  9%] Built target geometry_msgs_generate_messages_lisp

[  9%] Built target nav_msgs_generate_messages_cpp
[  9%] Built target geometry_msgs_generate_messages_nodejs
[  9%] Built target actionlib_msgs_generate_messages_cpp
[  9%] Built target rosgraph_msgs_generate_messages_nodejs
[  9%] Built target tf2_msgs_generate_messages_cpp
[  9%] Built target rosgraph_msgs_generate_messages_cpp
[  9%] Built target actionlib_msgs_generate_messages_lisp
[  9%] Built target rosgraph_msgs_generate_messages_py
[  9%] Built target rosgraph_msgs_generate_messages_lisp
[  9%] Built target rosgraph_msgs_generate_messages_eus
[  9%] Built target sensor_msgs_generate_messages_cpp

[ 24%] Built target rosjava_test_msgs_generate_messages_lisp
[ 26%] Gradling tasks for zeroconf_jmdns_suite
[ 45%] Built target rosjava_test_msgs_generate_messages_py
[ 47%] Compiling Java code for rosjava_test_msgs
[ 49%] Built target rosjava_test_msgs_generate_messages_java_gradle
[ 64%] Built target rosjava_test_msgs_generate_messages_nodejs
[ 79%] Built target rosjava_test_msgs_generate_messages_cpp
[ 96%] Built target rosjava_test_msgs_generate_messages_eus
[ 96%] Built target rosjava_test_msgs_generate_messages
[ 98%] Gradling tasks ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-03-06 12:03:50 -0600

jubeira gravatar image

Take a closer look at the logs: /home/user/rosjava/src/rosjava_catkin_package_a/rosjava_gradle_subproject_a/src/main/java/com/github/rosjava_catkin_package_a/rosjava_gradle_subproject_a/Dude.java:1: error: ';' expected package com.github.rosjava_catkin_package_a.rosjava_gradle_subproject_a/;

That command generates a file called Dude.java. Apparently the first line is incorrect; the import is missing a ;, or that / after rosjava_gradle_subproject_a is misplaced.

If you followed 4.1 and 4.2 in order, you probably executed catkin_create_rosjava_library_project rosjava_gradle_subproject_a/.

edit flag offensive delete link more

Comments

Thank you, this is the correct answer.

tlin40 gravatar imagetlin40 ( 2018-03-10 00:00:57 -0600 )edit

Cool! I did a small update in the tutorial to prevent this issue in the future; now the section 4.2 shall create rosjave_gradle_subproject_b.

jubeira gravatar imagejubeira ( 2018-03-12 09:51:43 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-03-04 00:16:52 -0600

Seen: 93 times

Last updated: Mar 06 '18