ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

creating a Rosjava Service Client and Server end in failure

asked 2019-01-25 09:08:17 -0500

yaced gravatar image

updated 2019-01-25 09:25:31 -0500

Hi everybody,

I tried to create a rosjava service following the instruction listed in: http://wiki.ros.org/rosjava_build_too...

Sadly I end up with following error at the moment of catkin_make.

Could not resolve all dependencies for configuration ':client_server:compileClasspath'.>
Could not find any matches for org.ros.rosjava_messages:rosjava_custom_srv:[0.1, 0.2) as no versions of org.ros.rosjava_messages:rosjava_custom_srv are available.

Path to subproject: ~/catkin_ws_rosjava/src/pkg_test_srv/client_server

OS: Ubuntu 16.04 -

ROS: kinetic

I followed all steps, but as you can see, I changed the package and project name.

There are also some passages in the descriptions, that were not clear enough:

1) Finally in the rosjava_tutorial_custom_services, delete the src and create a new sub-directory with two java files, the Client.java and the Server.java inside of the rosjava_tutorial_services folder

!! There is no directory or file called "rosjava_tutorial_custom_services" at that point.

2) Name differences between:

tutorial_custom_srv

rosjava_custom_srv

rosjava_tutorial_custom_services

I will really appreciate some help here.

edit retag flag offensive close merge delete

Comments

Does step 1 work for you? In <ws_root>/devel/share/maven you should see a folder with the artifacts of the custom generated service. The rest is a basic client / server to make use of that message, also covered in https://github.com/rosjava/rosjava_co... .

jubeira gravatar image jubeira  ( 2019-01-30 11:06:11 -0500 )edit

Step 1 worked, yes. I was also able to resolve my problem also. It is precisely linked with the maven folder that you quoted. I had to actualize my path $ROS_MAVEN_DEPLOY_REPOSITORY, because compiling my second rosjava WS saved maven dep in my first rosjava WS. Actualizing the source wasn't enough.

yaced gravatar image yaced  ( 2019-01-30 11:35:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-30 11:41:11 -0500

yaced gravatar image

If you are using multiple stand-alone rosjava WS, then you should consider pointing $ROS_MAVEN_DEPLOY_REPOSITORY to a common sourced WS or to actualize it for each rosjava WS.

edit flag offensive delete link more

Comments

Cool, thanks for sharing your solution! Maybe the tutorial needs some tweaking / better explanations. The main point is actually to show how to use genjava for custom messages, which is actually a basic ROS task, but many java devs are not familiar with it.

jubeira gravatar image jubeira  ( 2019-01-30 12:17:39 -0500 )edit

Question Tools

Stats

Asked: 2019-01-25 09:08:17 -0500

Seen: 255 times

Last updated: Jan 30 '19