ekumenlabs / roscpp_android

Cross compilation scripts for building ROS nodes using the Android NDK.
39 stars 30 forks source link

Nodelet support #47

Closed ernestmc closed 8 years ago

ernestmc commented 8 years ago

Added support for using nodelets. Basically the build-time plugin collector had to also search for nodelet dependency. Also added a sample app to test it under output/nodelet_sample_app. How to test:

Configure the ROS server IP before building. After building, install the app:

$ adb install -r nodelet_sample_app-debug.apk

Start a ROS master and then run the app and check the logcat output:

$ adb logcat | grep NODELET_TEST

D/NODELET_TEST(17341): Starting program...
D/NODELET_TEST(17341): cmd
D/NODELET_TEST(17341): __master:=http://10.34.0.69:11311 
D/NODELET_TEST(17341): __ip:=10.34.0.80
D/NODELET_TEST(17341): ROS master is up at http://10.34.0.69:11311 
D/NODELET_TEST(17341): Local address is 10.34.0.80
D/NODELET_TEST(17341): Loading nodelet...
D/NODELET_TEST(17341): Starting ROS main loop...

So the nodelet is running. Now you need to input numbers in the topic and see the output:

$ rostopic pub -r 1 /test_nodelet/in std_msgs/Float64 "data: 3.0"

$ rostopic echo /test_nodelet/out
data: 3.0

---
data: 3.0

---
data: 3.0

---
data: 3.0

---