ros2-java / ros2_android_examples

Example Android apps for the ROS2 Java bindings
Apache License 2.0
37 stars 5 forks source link

Talker and Listener can't communicate on the same device #7

Open qh-huang opened 6 years ago

qh-huang commented 6 years ago

I installed the 2 APKs to the same device and run them together. I expected to see listener can receive the messages sent from talker, but nothing happended, even in logcat. Did I miss anything?

esteve commented 6 years ago

I think it's because when either app is sent to the background, the nodes are removed from the executor https://github.com/esteve/ros2_android_examples/blob/master/ros2_listener_android/src/main/java/org/ros2/examples/android/listener/ROS2ListenerActivity.java#L108-L113 so if you disable that code, you should be able to run ROS2 apps in the background.

qh-huang commented 6 years ago

@esteve Thanks! I'll try it later.