You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
I try get 3 Topic based on android_tutorial_pubsub instead of 1 topic is "/chatter".
Purpose is get multiple Topic to display monitor telephone. But I have issue this unable to get data at the same time. i only get 1 topic. Help me!
My code:
public class MainActivity extends RosActivity {
// create
private RosTextView<std_msgs.String> rosPreArm;
private RosTextView<std_msgs.String> rosBattery;
private RosTextView<std_msgs.String> rosMode;
protected NodeMainExecutor nodeMainExecutor;
public MainActivity() {
// The RosActivity constructor configures the notification title and ticker
// messages.
super("Pubsub Tutorial", "Pubsub Tutorial");
}
@SuppressWarnings("unchecked") @OverRide
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
And, I have issue is get message like:
In file msg have:
StatusType.msg (string PreArm, string Battery, string Mode, string Armed) and multiple file like GPSType.msg, AttitudeType.msg, ..., created by me.
I want to get message in android instead of get Topic. Help me!
The text was updated successfully, but these errors were encountered:
I try get 3 Topic based on android_tutorial_pubsub instead of 1 topic is "/chatter".
Purpose is get multiple Topic to display monitor telephone. But I have issue this unable to get data at the same time. i only get 1 topic. Help me!
My code:
package org.ros.android.android_tutorial_pubsub;
import android.os.Bundle;
import org.ros.android.MessageCallable;
import org.ros.android.RosActivity;
import org.ros.android.view.RosTextView;
import org.ros.node.ConnectedNode;
import org.ros.node.NodeConfiguration;
import org.ros.node.NodeMainExecutor;
import org.ros.node.topic.Subscriber;
import std_msgs.String;
/**
*/
public class MainActivity extends RosActivity {
// create
private RosTextView<std_msgs.String> rosPreArm;
private RosTextView<std_msgs.String> rosBattery;
private RosTextView<std_msgs.String> rosMode;
protected NodeMainExecutor nodeMainExecutor;
public MainActivity() {
// The RosActivity constructor configures the notification title and ticker
// messages.
super("Pubsub Tutorial", "Pubsub Tutorial");
}
@SuppressWarnings("unchecked")
@OverRide
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@OverRide
protected void init(NodeMainExecutor nodeEx) {
nodeMainExecutor = nodeEx;
}
protected void Battery(){
NodeConfiguration nodeConfiguration1 = NodeConfiguration.newPublic(getRosHostname());
nodeConfiguration1.setMasterUri(getMasterUri());
nodeMainExecutor.execute(rosBattery, nodeConfiguration1);
}
protected void Mode(){
NodeConfiguration nodeConfiguration2 = NodeConfiguration.newPublic(getRosHostname());
nodeConfiguration2.setMasterUri(getMasterUri());
nodeMainExecutor.execute(rosMode, nodeConfiguration2);
}
}
And, I have issue is get message like:
In file msg have:
StatusType.msg (string PreArm, string Battery, string Mode, string Armed) and multiple file like GPSType.msg, AttitudeType.msg, ..., created by me.
I want to get message in android instead of get Topic. Help me!
The text was updated successfully, but these errors were encountered: