Repository Summary
Description | Objective C and iOS bindings for ROS2 |
Checkout URI | https://github.com/esteve/ros2_objc.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2018-12-28 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
rclobjc | 0.0.0 |
rclobjc_common | 0.0.0 |
rosidl_generator_objc | 0.0.0 |
README
ROS2 for Objective C and iOS
Build status
Target | Status |
---|---|
macOS | |
iOS |
Introduction
This is a set of projects (bindings, code generator, examples and more) that enables developers to write ROS2 applications in Objective C on macOS and iOS (iPhone, iPad)
Besides this repository itself, there’s also:
- https://github.com/esteve/ros2_ios_examples, examples for iOS
- https://github.com/esteve/ros2_objc_examples, examples for macOS
Does this support Swift?
Yes. I decided to target Objective C since I found it is easier to build Swift applications on top of Objective C, than the opposite.
Does this work on iOS?
Yep! Make sure to use this fork as your DDS vendor. Even though the name of the branch is “cpp11-android”, I ended up adding support for iOS on top of it.
Features
The current set of features include:
- Generation of all builtin ROS types
- Support for publishers and subscriptions
- Clients and services
- Support for iOS (iPhone, iPad)
Sounds great, how can I try this out?
The following steps show how to build the examples for both macOS and iOS.
macOS
mkdir -p ~/ros2_objc_ws/src
cd ~/ros2_objc_ws
wget https://raw.githubusercontent.com/esteve/ros2_objc/master/ros2_objc_macos.repos
vcs import ~/ros2_objc_ws/src < ros2_objc_macos.repos
src/ament/ament_tools/scripts/ament.py build --isolated
Now you can just run a bunch of examples.
Talker and Listener
Talker:
. ~/ros2_objc_ws/install_isolated/local_setup.sh
ROSTalker
Listener:
. ~/ros2_objc_ws/install_isolated/local_setup.sh
ROSListener
Client and Service
Service:
. ~/ros2_objc_ws/install_isolated/local_setup.sh
ROSAddTwoIntsService
Client:
. ~/ros2_objc_ws/install_isolated/local_setup.sh
ROSAddTwoIntsClientAsync
You can also combine any scenario where the talker/listener or client/service are written in Objective C, Java, Python and C++ and they should talk to each other.
iOS
The iOS setup is slightly more complex. If you do not have a jailbroken device, you will have to sign the resulting apps, which is much easier to do on Xcode’s IDE than the command line.
File truncated at 100 lines see the full file
CONTRIBUTING
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.