-
Notifications
You must be signed in to change notification settings - Fork 109
Description
Hi team,
I tried to run the AddTwoInts service then client, but the client blocked at future.get().
I tried re-launch the client again, same issue.
Seems the service not registered properly, or the client could not find it somehow.
Please kindly advise how to make it work.
Btw, the pub/sub exmpale works well, and the service function works well for rclcpp client.
Here's my setup:
Ros2 version: dashing
RCLJava version: dashing branch checked out few days ago, build with colcon
The service log:
ros_java_ws/build/rcljava_examples/build/classes/java/main$ java org.ros2.rcljava.examples.service.AddTwoIntsService
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/xingjl/IdeaProjects/benchmark/ros_java_ws/build/rcljava_common/jars/slf4j-jdk14-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/xingjl/IdeaProjects/benchmark/ros_java_ws/build/rcljava_common/jars/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_rcl_java__jni
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_contexts__context_impl__jni
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.RCLJava rclJavaInit
INFO: Using RMW implementation: rmw_fastrtps_cpp
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_node__node_impl__jni
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_time__clock__jni
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadTypesupport
INFO: Loading typesupport: example_interfaces_srv__add_two_ints__jni__rosidl_typesupport_c
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_service__service_impl__jni
Jan 06, 2021 7:09:39 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_executors__base_executor__jni
The service registered successfully. Checked from another terminal:
$ ros2 service list
/add_two_ints
The client log:
ros_java_ws/build/rcljava_examples/build/classes/java/main$ java org.ros2.rcljava.examples.client.AddTwoIntsClient
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/xingjl/IdeaProjects/benchmark/ros_java_ws/build/rcljava_common/jars/slf4j-jdk14-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/xingjl/IdeaProjects/benchmark/ros_java_ws/build/rcljava_common/jars/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_rcl_java__jni
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_contexts__context_impl__jni
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.RCLJava rclJavaInit
INFO: Using RMW implementation: rmw_fastrtps_cpp
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_node__node_impl__jni
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_time__clock__jni
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadTypesupport
INFO: Loading typesupport: example_interfaces_srv__add_two_ints__jni__rosidl_typesupport_c
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_client__client_impl__jni
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadTypesupport
INFO: Loading typesupport: example_interfaces_srv__add_two_ints__request__jni__rosidl_typesupport_c
Jan 06, 2021 7:11:04 PM org.ros2.rcljava.common.JNIUtils loadImplementation
INFO: Loading implementation: org_ros2_rcljava_executors__base_executor__jni