siemens / ros-sharp

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particular Unity3D
Apache License 2.0
945 stars 364 forks source link

Android app not publishing to topic #421

Closed PanagiotisKotsaris closed 5 months ago

PanagiotisKotsaris commented 2 years ago

I have a question!

Here is my question: I am trying to build an Android app that connects to a ROS bridge using ROS#. When I run the app in the Unity environment it all runs as it is supposed to but when I build it and run it on the Android tablet I cannot get one specific publisher to publish to a topic (the publisher is a simple Int publisher. All other publishers and subscribers work correctly). Am I doing something wrong or is there a problem with Android apps using ROS#?

Relevant Code: My int publisher has the following code:

using  RosSharp.RosBridgeClient;

using  RosSharp.RosBridgeClient.Messages.Standard;

public  class  TaskCompletedPublisher : Publisher<Int32> {

private  Int32  msg;
protected  override  void  Start() {
    base.Start();
    msg  =  new  Int32();
}

private  void  InitializeMessage() {
    msg  =  new  Int32();
}

private  void  OnDisable() {
    base.Start();
}

public  void  PublishTaskCompleted(int  outcome) {
    msg.data  =  outcome;
    Publish(msg);
}

}

My ROS connector Component is set as follows: image

MartinBischoff commented 5 months ago

outdated / closing due to inactivity