ROSIntegration: Rosbridge connection established, but not able to publish.

Hi, I’ve set the plugin and world up as per the instructions, and on pressing play rosbridge registers a connection. But when putting the example publishing code in an actor, rosbridge does not seem to receive anything. Is there something in particular I have to do to make the code communicate properly? Thanks. This is what I have in BeginPlay():

        UTopic *ExampleTopic = NewObject<UTopic>(UTopic::StaticClass());
	UROSIntegrationGameInstance* ROSInstance = Cast<UROSIntegrationGameInstance>(GetGameInstance());
	ExampleTopic->Init(ROSInstance->ROSIntegrationCore, TEXT("/chatter"), TEXT("std_msgs/String"));


	// (Optional) Advertise the topic
	// Currently unimplemented in the plugin
	//ExamplePublishTopic->Advertise();

	// Publish a string to the topic
	TSharedPtr<ROSMessages::std_msgs::String> StringMessage(new ROSMessages::std_msgs::String("This is an example"));
	ExampleTopic->Publish(StringMessage);

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

@florian-leblanc We need additional information to debug this. For what part exactly do you need roslibjs? roslibjs isn’t aware of the BSON encoding of this UE4 Plugin and it’s also supposed to be used as a client. So i’m not sure how roslibjs comes into play here.

Also: Where do you hold your instance of your Topic? Please note that it should live in some scope that persists: #32

It’s ok now i find my problem it was tornado : #353