ROSJava communication with outside program
Hi,
I have another application that manages task execution, similar to Collagen. I would like to build a link between this application and ROSJava. I am very new to ROS and ROSJava. I have gone through most of the tutorials and have a primitive understanding. To start, I would like something like a proof of concept. The application sends a task to be executed, ROSJava sends a confirmation (just a string for now), repeat. It should be something similar to the pubsub talk/listener tutorial, except that there is a talk / listener on both sides. Any idea on how I could achieve this?
Thanks!
How does your application that manages task execution present information. I'm no java programmer, but if you can establish a message pipeline between your management application and a java class, then your halfway there.
Thanks for your reply. The task manager uses javascript to call the functions the robot should execute. IE, task manager decides it's time to execute task, executes a javascript function - which are sent to ROS as a java method that ROS interprets, executes, returns state, and waits for next task.
In ROSJAVA each node (that implements pubs and subs etc) is written as a java class that implements nodeMain. These are executed by a nodemainexecutor in your main Java Activity. Now your taskmanager has to pass a javascript statement to the class.
That's what I have been trying to do, but I think I am making an error somewhere along the line. I call a java method from javascript with something like Packages.org.example.Send("SetObject"), where send is the java method passing the instruction to the node. Your comments much appreciated.
you might need to post your code. Though I may not be able to help so much with the Java Script.
I'm having difficulty even creating the talker/listener from a separate java class. How would I invoke the Talker and Listener node from a separate java class? The talker/listener nodes compile and run with ./build/.. .org.ros..Talker. How would I make them run from a separate java class?