ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

two nodes on ros android

asked 2015-04-27 09:26:18 -0500

zior89 gravatar image


Do you know how can I run two nodes en a same activity on android?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-04 11:52:05 -0500

jubeira gravatar image

You can run any number of nodes within an activity. Simply do something like this (assuming your activity is a RosActivity):

protected void init(NodeMainExecutor nodeMainExecutor) {
    NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(getRosHostname());

    MyNode myNode1 = new MyNode();     // Something that extends AbstractNodeMain
    nodeMainExecutor.execute(myNode1, nodeConfiguration);

    MyNode myNode2 = new MyNode();
    nodeMainExecutor.execute(myNode2, nodeConfiguration);     // And so on...
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-04-27 09:26:18 -0500

Seen: 172 times

Last updated: Dec 04 '17