Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #229 from jubeira/dev/native-node-main
Browse files Browse the repository at this point in the history
Small change to NativeNodeMain
  • Loading branch information
adamantivm authored Jan 4, 2017
2 parents 30bfd61 + 01dc810 commit fe2b833
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions rosjava/src/main/java/org/ros/node/NativeNodeMain.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
package org.ros.node;

import org.ros.node.AbstractNodeMain;
import org.ros.node.ConnectedNode;
import org.ros.node.Node;
import org.ros.namespace.GraphName;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.util.List;
import java.util.Map;

/**
* A java wrapper to load and run a native-code ROS node.
*
Expand Down Expand Up @@ -70,16 +62,16 @@ public NativeNodeMain(String libName) {
this(libName, null);
}

// These methods define the execution model interface for this node.
protected abstract void execute(String rosMasterUri, String rosHostName, String rosNodeName, String[] remappingArguments);
protected abstract void shutdown();
// These methods define the execution model interface for this node. Return values are error codes (not used by default).
protected abstract int execute(String rosMasterUri, String rosHostName, String rosNodeName, String[] remappingArguments);
protected abstract int shutdown();

@Override
public void onStart(final ConnectedNode connectedNode) {
// retain important ROS info
masterUri = connectedNode.getMasterUri().toString();
hostName = connectedNode.getUri().getHost();
nodeName = this.libName;
nodeName = getDefaultNodeName().toString();

// create a new thread to execute the native code.
new Thread() {
Expand Down

0 comments on commit fe2b833

Please sign in to comment.