Skip to content

rudyvic/ROS-Websocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS Websocket interface for Godot

This repository contains some Godot nodes to interact with a ROS Websocket. It is possible to publish messages on topics, subscribe to topics, call services and read the services responses.

⚠️ This works with Godot 3.x (no with Godot 4.x).

INSTALLATION

In order to use it, you must install ROS:

sudo apt-get install ros-<rosdistro>-rosbridge-server

USAGE

To launch the websocket:

roslaunch rosbridge_server rosbridge_websocket.launch

The websocket can be launched at anytime, it is not mandatory to launch it before Godot.

List and explanation of the Godot files:

  • ROSWebsocket: the node that handles the connection with the websocket. It provides usefull signals and methods to know the state of the connection, the list of the subscribed nodes and more. It must be set as an Autoload node in your project.
  • ROSPublisher: you can extend this node to build custom publishers (see ROSTestTopicPublisher for an example).
  • ROSSubscriber: you can extend this node to build custom Subscribers (see ROSTestTopicSubscriber for an example).
  • Main: example node to test if the setup is working. You can set the websocket url, and then you can publish and receive std_msgs/String messages on the /test_string topic.
  • ROSStdMsgsString: it is composed by ROSTestStringSubscriber and ROSTestStringPublisher. The topic is /test_string with the message std_msgs/String. It is a simple example on how to implement basic publishers and subscribers.
  • ROSTestTopic: it is composed by ROSTestTopicSubscriber and ROSTestTopicPublisher. The topic is /test_topic with a fake example message test_msgs/Test. It is a more complex example on how to implement publishers and subscribers on complex messages. Remember that it doesn't work if you don't have the test_msgs/Test message installed in ROS, but this nodes are meant for example-purpose only.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published