{"id":19173880,"url":"https://github.com/navideck/romo-ios-sdk","last_synced_at":"2025-05-07T18:10:09.911Z","repository":{"id":52426126,"uuid":"95016370","full_name":"Navideck/Romo-iOS-SDK","owner":"Navideck","description":"Romo SDK supporting up to iOS 17!","archived":false,"fork":false,"pushed_at":"2024-02-10T18:06:33.000Z","size":421531,"stargazers_count":44,"open_issues_count":0,"forks_count":15,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-07T18:09:32.543Z","etag":null,"topics":["ios","objective-c","robotics","romo"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Navideck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"patreon":"fotidim","github":"navideck"}},"created_at":"2017-06-21T15:02:50.000Z","updated_at":"2024-09-13T22:37:52.000Z","dependencies_parsed_at":"2024-01-20T12:42:03.244Z","dependency_job_id":null,"html_url":"https://github.com/Navideck/Romo-iOS-SDK","commit_stats":{"total_commits":106,"total_committers":8,"mean_commits":13.25,"dds":"0.26415094339622647","last_synced_commit":"dce23a36553cbb9e72b67f8c1ad227541732716d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navideck%2FRomo-iOS-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navideck%2FRomo-iOS-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navideck%2FRomo-iOS-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navideck%2FRomo-iOS-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Navideck","download_url":"https://codeload.github.com/Navideck/Romo-iOS-SDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931555,"owners_count":21827112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","objective-c","robotics","romo"],"created_at":"2024-11-09T10:15:03.161Z","updated_at":"2025-05-07T18:10:09.866Z","avatar_url":"https://github.com/Navideck.png","language":"Objective-C","funding_links":["https://patreon.com/fotidim","https://github.com/sponsors/navideck","https://www.patreon.com/bePatron?u=5127277"],"categories":[],"sub_categories":[],"readme":"# Romo iOS SDK\n\u003ca href=\"https://www.patreon.com/bePatron?u=5127277\" target=\"_blank\"\u003e\u003cimg alt=\"become a patron\" src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" height=\"35px\"\u003e\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Navideck/Romo/master/Assets.xcassets/Missions/Editor/Actions/Turn/romoTurn28.imageset/romoTurn28%401x.png\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\" \u003e\n\u003cimg src=\"https://img.shields.io/badge/platform-iOS%206,%207,%208,%209,%2010,%2011,%2012,%2013,%2014,%2015,%2016,%2017-blue.svg\" alt=\"Platform: iOS 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17\" /\u003e\u003c/p\u003e\n\nRomo SDK gives you the power to write your own software for Romo robots. After downloading the SDK, this guide will help you get rolling so you can start developing apps for Romo.\n\nThis project is a continuation of the *Romo SDK*, an attempt to breathe life into the lovable but sadly discontinued, iPhone robot, **Romo**. The goal is to enable a community of makers, tutors and researchers that is actively engaged with the Romo platform and smartphone robotics.\n\nThe SDK is broken up into 3 major frameworks, so you can pick and choose what you'd like to use in your app. The list of current frameworks is:\n\n#### RMCore\nControl Romo's hardware using your own apps! Using **RMCore**, you can drive all three motors, flash LEDs, and access state information about your Romo base.\n\n#### RMCharacter\n**RMCharacter** allows you to add Romo's adorable personality to your app. Want Romo to get excited when someone tweets your username? Now he can!\n\n#### RMVision\n**RMVision** allows you to use the iPhone's camera to allow Romo to see but also understand the world using computer vision.\n\n## Setting up a project\nYou have multiple options:\n### Using CocoaPods\nThe most easy way to include the Romo SDK in your app is using CocoaPods:\n```ruby\npod 'Romo'\n```\n\nNote that this will get you only `RMCore`. \n\nIf you additionally need `RMCharacter` add\n```ruby\npod 'Romo/RMCharacter'\n```\nMake sure to **comment out** `use_frameworks!` as you will face missing assets otherwise.\nYou will also need to add\n\n```install! 'cocoapods', :disable_input_output_paths =\u003e true```\non top of your Podfile.\n\nIf you additionally need `RMVision` add\n```ruby\npod 'Romo/RMVision'\n```\n\nA complete `PodFile` with all frameworks would look like this:\n\n```ruby\n# Uncomment the next line to define a global platform for your project\nplatform :ios, '6.0'\ninstall! 'cocoapods', :disable_input_output_paths =\u003e true\n\ntarget 'My Cool Romo App' do\n  # Comment the next line if you don't want to use dynamic frameworks\n  # use_frameworks!\n\n  # Pods for My Cool Romo App\n  pod 'Romo'\n  pod 'Romo/RMCharacter'\n  pod 'Romo/RMVision'\n  \nend\n```\n\n### Carthage\nAlthough not tested yet, the basic folder structure for Carthage is in place so it should theoretically already be working.\n\n### Manually\n- You can drag and drop the files from the framework you want inside your own project. All source files are under `Classes` and optionally there might be an additional `Assets` folder like in the case of `RMCharacter`\n\n#### Enable the Accessory\n\n*Note: Only if you're using RMCore to interface with the robot.*\n\n1. Navigate to your app's \u003ccode\u003eInfo.plist\u003c/code\u003e file in XCode, which should be in the Supporting Files folder by default.\n\n2. Click on the top row (\"Information Property List\") and add a new entry by clicking the plus button.\n\n3. XCode will now ask you to input the key for this new entry. Use `Supported external accessory protocols`. Expand the newly created element, and change the value for \"Item 0\" to be `com.romotive.romo`.\n\n4. That's it! Save the file and you're all set to have your app talk to the hardware accessory.\n\n## Getting started\nNow that we have a project that uses the Romo SDK, it's time to start writing some code!\n\n#### If you're using RMCore with ObjC, you'll want to do the following...\n\n1. Import the RMCore framework\n```Objc\n#import \u003cRomo/RMCore.h\u003e\n```\n\n2. Implement the RMCoreDelegate interface\n```Objc\n@interface YourVC : UIViewController \u003cRMCoreDelegate\u003e\n```\n\n3. Add a property for the robot, with the protocols you'd like to use (here we're specifying that our robot can tilt its head, drive, and use an LED)\n```Objc     \n@property (nonatomic, strong) RMCoreRobot\u003cHeadTiltProtocol, DriveProtocol, LEDProtocol\u003e *robot;\n```\n\n4. Initialize your delegacy to the robot (often in viewDidLoad).\n```Objc\n[RMCore setDelegate:self];\n```\n\n5. Implement a connection delegate (triggered when a robot is connected).\n```Objc\n- (void)robotDidConnect:(nonnull RMCoreRobot *)robot\n{  \n    // Currently the only kind of robot is Romo3, so this is just future-proofing\n    if (robot.isDrivable \u0026\u0026 robot.isHeadTiltable \u0026\u0026 robot.isLEDEquipped) {\n        self.robot = (RMCoreRobot\u003cHeadTiltProtocol, DriveProtocol, LEDProtocol\u003e *) robot;\n    }\n}\n```\n    \n6. Implement disconnection delegate (triggered when a robot is disconnected).\n```Objc\n- (void)robotDidDisconnect:(nonnull RMCoreRobot *)robot\n{\n    if (robot == self.robot) {\n        self.robot = nil;\n    }\n}\n```\n\nNow you're ready to send the robot commands. Here are some examples:\n                            \n- Tell the LED to blink every 1 second (where the LED will be on 40% of every second).\n```Objc\n[self.robot.LEDs blinkWithPeriod:1.0 dutyCycle:.4];\n```\n- Tell the base to tilt the phone to a specific angle in degrees (here, it's 110).\n```Objc\n[self.robot tiltToAngle:110 completion:^(BOOL success)\n{\n    if (success) {\n        NSLog(@\"Successfully tilted\");\n    } else {\n        NSLog(@\"Couldn't tilt to the desired angle\");\n    }\n}];\n```\n- Tell the base to move forward at approximately 1 meter/second.\n```Objc\n[self.robot driveWithRadius:RM_DRIVE_RADIUS_STRAIGHT speed:1.0];\n```\n- Tell the robot to turn 90 degrees counter-clockwise.\n```Objc\n[self.robot turnByAngle:90.0\n    withRadius:RM_DRIVE_RADIUS_TURN_IN_PLACE\n    completion:^(float heading) {\n        NSLog(@\"Finished! Ended up at heading: %f\", heading);\n    }\n];\n```\n\n- Tell all motors to stop.\n```Objc\n[self.robot stopAllMotion];\n```\n\n- Allow the robot to be connected when app goes in background.\n```Objc\n[RMCore allowBackground:YES];\n```\n\nIn your app's \u003ccode\u003eInfo.plist\u003c/code\u003e add a new key with the text `Required background modes` and select the `App communicates with an accessory` value for the first item.\n\n###  If you're using RMCore with Swift, you'll want to do the following...\n\n1. Import the RMCore framework\n```Swift\nimport Romo\n```\n\nIn case you don't use CocoaPods you need to import the  RMCore framework manually using a bridging header file `MyCoolRomoApp-Bridging-Header.h` with:\n```Objc\n#import \u003cRomo/RMCore.h\u003e\n```\n\n2. Implement the RMCoreDelegate protocol\n```Swift\nclass ViewController: UIViewController, RMCoreDelegate {\n```\n\n3. Add a property for the robot, with the protocols you'd like to use (here we're specifying that our robot can tilt its head, drive, and use an LED)\n```Swift     \nvar robot: RMCoreRobotRomo3?\n```\n\n4. Initialize your delegacy to the robot (often in viewDidLoad).\n```Swift    \nRMCore.setDelegate(self)\n```\n\n5. Implement a connection delegate (triggered when a robot is connected).\n```Swift\nfunc robotDidConnect(_ robot: RMCoreRobot) \n{\n    // Currently the only kind of robot is Romo3, so this is just future-proofing\n    if robot.isDrivable \u0026\u0026 robot.isHeadTiltable \u0026\u0026 robot.isLEDEquipped {\n        self.robot = robot as? RMCoreRobotRomo3\n    }\n}\n```    \n6. Implement disconnection delegate (triggered when a robot is disconnected).\n```Swift\nfunc robotDidDisconnect(_ robot: RMCoreRobot) {\n    print(\"Disconnected\")\n    if robot == self.robot {\n        self.robot = nil\n    }\n}\n```\n\nNow you're ready to send the robot commands. Here are some examples:\n                            \n- Tell the LED to blink every 1 second (where the LED will be on 40% of every second).\n```Swift\nrobot?.leds.blink(withPeriod: 1.0, dutyCycle: 0.4)\n```\n\n- Tell the base to tilt the phone to a specific angle in degrees (here, it's 110).\n```Swift\nrobot?.tilt(toAngle: 110, completion: { success in\n    if (success) {\n        print(\"Successfully tilted\")\n    } else {\n        print(\"Couldn't tilt to the desired angle\")\n    }\n})\n```    \n- Tell the base to move forward at approximately 1 meter/second.\n```Swift\nlet RM_DRIVE_RADIUS_STRAIGHT: Float = 9999\nrobot?.drive(withRadius: RM_DRIVE_RADIUS_STRAIGHT, speed: 1.0)\n```\n\n- Tell the robot to turn 90 degrees counter-clockwise.\n```Swift\nlet RM_DRIVE_RADIUS_TURN_IN_PLACE: Float = 9999\nrobot?.turn(byAngle: 90.0, withRadius: RM_DRIVE_RADIUS_TURN_IN_PLACE, completion: { (success, heading) in\n    print(\"Finished! Ended up at heading: %f\", heading)\n})\n```    \n- Tell all motors to stop.\n```Swift\nrobot?.stopAllMotion()\n```\n- Allow the robot to stay connected when the app goes to background.\n```Swift\nRMCore.allowBackground(true)\n```\n\nIn your app's \u003ccode\u003eInfo.plist\u003c/code\u003e add a new key with the text `Required background modes` and select the `App communicates with an accessory` value for the first item.\n\n#### For using RMCharacter with ObjC, a good start would be...\n\n1. Add a property for the character\n```Objc\n@property (nonatomic, strong) RMCharacter *romo;\n```\n2. Initialize your character (often in viewDidLoad).\n```Objc\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    // Grab a shared instance of the Romo character\n    self.romo = [RMCharacter Romo];\n}\n```\n3. Add the character to a superview (often in viewWillAppear).\n```Objc\n- (void)viewWillAppear:(BOOL)animated\n{\n    [super viewWillAppear:animated];\n    \n    // Add Romo's face to self.view whenever the view will appear\n    [self.romo addToSuperview:self.view];\n}\n```\n4. Ensure you remove the character's view when you're done with it (often in viewDidDisappear).\n```Objc\n- (void)viewDidDisappear:(BOOL)animated\n{\n    [super viewDidDisappear:animated];\n    \n    // Removing Romo from the superview stops animations and sounds\n    [self.romo removeFromSuperview];\n}\n```   \nNow you're ready to send the character commands. You can do things like:\n\n- Tell Romo to change his facial expression\n```Objc\nself.romo.expression = RMCharacterExpressionCurious;\n```                       \n- Tell Romo to change his emotion\n```Objc\nself.romo.emotion = RMCharacterEmotionScared;\n```\n- Tell Romo to look up and to the left:\n```Objc\n[self.romo lookAtPoint:RMPoint3DMake(-1.0, -1.0, 0.5) \nanimated:YES];\n```\n## Sample Projects / Examples\nWe've written a few sample applications to get you started using the Romotive SDK. Each framework has an `Examples` subfolder with one or more example projects. Some project you will find are:\n\n### HelloRMCore\nControl your Romo's hardware through driving its motors and LEDs.\n\nThis simple application presents three buttons on the screen when the iDevice is docked on a robot. Two of these buttons tilt the robot's head up and down when tapped. The third button tells the robot to drive in a circle and blink its LED.\n\n### HelloRMCoreSwift\nSame as HelloRMCore but in Swift\n\n### HelloRMCharacter\nCycle through Romo's expressions and emotions, and see how he can look around.\n\nTo get started interfacing with an **RMCharacter** object, we show you how to get Romo's face to appear on your iDevice. Drag your finger on Romo's face to have him look around. When your finger leaves the screen, Romo will perform a random expression (a brief action) and transition into a random emotion (a persistent state).\n\n### HelloRomo\nUse both **RMCore** and **RMCharacter** to drive Romo around and make faces.\n\nSwipe left or right on Romo's face, and he will start driving in a circle in the direction you swiped. When you poke Romo's face, he'll stop what he's doing. Finally, swipe up to change Romo's emotional state. \n\n## Documentation\nThe documentation can be found in the \"docs\" folder that comes bundeled with the SDK.\n\n## FAQ\n\n### Is the Romo App on the App Store?\nFind the *Romo* app on the [App Store](https://itunes.apple.com/us/app/romo/id1436292886)\n\n### Is the Romo App open source?\nFind the *Romo* app source code [here](https://github.com/Navideck/Romo)\n\n### Is firmware source code available?\nFind Romo's firmware source code [here](https://github.com/Navideck/Romo-Firmware)\n\n### Where can I buy a Romo robot?\nThere seems to be plenty of stock in online stores.\n\n### Which Romo works with the SDK?\nAny Romo with either 30pin or lightning port. This includes Romo models 3A, 3B, 3L.\n\n### Which iPhone works with Romo?\niPhone 3GS and above. iPhone SE (1st gen) \u0026 iPhone 12 mini fit like a glove. iPhone 6, 7 and 8 need some squeezing but fit just fine. iPhone X and iPhone 12 (non mini) are too big.\n\n### Which iOS versions are compatible with the SDK?\nThe latest SDK works from **iOS 6.0** up to **iOS 17**!\n\n### How did this come to be?\nRomotive, the company behind Romo, after shutting down were kind enough to open source their code stating:\n*\"We've decided to completely open-source every last bit of Romo's smarts. All of our projects live in this repo and you're free to use them however you like.\"*\n\nIssues and pull requests are always welcome!\n\n## Patrons\n* Miraenda\n* Suschman\n* Matt Duston\n* Jim Felich\n* Felix\n\nSupport us by becoming a patron!\n\n\u003ca href=\"https://www.patreon.com/bePatron?u=5127277\" target=\"_blank\"\u003e\u003cimg alt=\"become a patron\" src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" height=\"35px\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavideck%2Fromo-ios-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavideck%2Fromo-ios-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavideck%2Fromo-ios-sdk/lists"}