Latest 0.0.5
License MIT
Platforms ios 9.0, requires ARC
Dependencies SocketRocket

ROSConnector allows you to make your connection to ROSBridge for communication with your robot working on Robot Operating System (ROS).

Using ROSConnector makes your app developing much more easier, because it has functionallity for connecting, sending/recieving messages and making service calls.


  • iOS 9.0+
  • Xcode 8


CocoaPods (iOS 8+)

You can use CocoaPods to install ROSConnectorby adding it to your Podfile:

platform :ios, '9.0'

target 'MyApp' do
   pod 'ROSConnector'

Note that this requires CocoaPods version 36, and your iOS deployment target to be at least 8.0:



import ROSConnector
let host = "ws://"
ROSConnector.sharedInstance.delegate = self
ROSConnector.sharedInstance.connect(socketHost: host)

ROSConnectorDelegate Methods

func managerDidConnect(manager: ROSConnector)
func managerDidTimeout(manager: ROSConnector)
func manager(manager: ROSConnector, didFailWithError: NSError)
func manager(manager: ROSConnector, didCloseWithCode: Int, reason: String, wasClean: Bool)

Publish Messages

// Publisher initialization 
var publisher: ROSPublisher?
publisher = ROSConnector.sharedInstance.addPublisher(topic: "/someRobot/someTopic", messageType: "std_msgs/Float64")
publisher?.label = "testPublisher"

// Sending message
let mess = FloatMessage() = 10.0
self.publisher?.publish(message: mess)

Subscribe on topic updates

// Subscriber initialization 
var subscriber = ROSSubscriber?
subscriber = ROSConnector.sharedInstance.addSubscriber(topic: "/someRobot/someTopic", delegate: self, messageClass: FloatMessage.self)

// Extension for delegate
extension ViewController: ROSSubscriberDelegate {
    func messageRecieved(message: ROSMessage) {
        if let floatMessage = message as? FloatMessage {

Current Availible Message Types

Standart Messages
Geometry Messages
Sensor Messages

Latest podspec

    "name": "ROSConnector",
    "version": "0.0.5",
    "summary": "ROSConnecor is library for ROSBridge that uses WebSockets to communicate with Robot Operating System (ROS)",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Timofey Makeev": "[email protected]"
    "platforms": {
        "ios": "9.0"
    "source": {
        "git": "",
        "tag": "0.0.5"
    "source_files": "ROSConnector/*.{swift}",
    "requires_arc": true,
    "dependencies": {
        "SocketRocket": [
            "~> 0.5"
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This