|
||
Hi, I would like to test this idea with Java 8 but this tutorial put the focus on Android. Some example to begin? I would like to use this technique on a raspberry pi 2 with Jade installed to run some ROS node on that host and later use RVIZ remotely from my OSX Cheers Juan Antonio |
Visit Topic to respond
To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences
|
||
Juan Antonio, Just curious, why do you need to use Java at all in this case? Why not just run the cross-compiled binary? Julian |
|
||
Hi Juan Antonio! First you need to compile your native code using the Java Native Interface specification. To learn how to do this, you can see for example this. You should compile and link your code to generate a shared library targeting the system you are working on. After that, you need to write a java class extending the NativeRosjavaNode. This class must have defined native methods that match the exported functions in the native library. This way Java will redirect the calls to those methods as calls to the library functions. You load the library passing the a string containing the name of the library to the NativeNodeMain constructor. I can implement a simple example if you want. Ernesto |
|
||
Good night Ernesto, Yes, if you can implement a simplest example, I could continue later If the test goes nice, I would like to create a Gradle library to publish some info from Mindstorms robots: http://ev3dev-lang-java.github.io/#/ to a remote ROS Master to visualize data later with RViz. Cheers Juan Antonio |
Visit Topic to respond
|
||
Hi Juan Antonio! This technique is for using native code from your Rosjava program. It will work in a similar way if you are in Android or not. First you need to compile your native code using the Java Native Interface specification. To learn how to do this, you can see for example this. You shoul… |
|
||
Hi ecorbellini ! Thank you |
Visit Topic or reply to this email to respond.
To unsubscribe from these emails, click here.
|
||
Hi @tony10012, The example for Wrapping a native rosjava node has been updated recently with a simple example, wrapping a native publisher as a rosjava node, and showing how to execute it. Please take a look there. |