Skip to content

Commit 343ede1

Browse files
committed
fix: rename wiki entry to kebab-case, update navigation and index
1 parent 726b4ae commit 343ede1

3 files changed

Lines changed: 44 additions & 42 deletions

File tree

_data/navigation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ wiki:
106106
url: /wiki/common-platforms/ros2-navigation-for-clearpath-husky/
107107
- title: Hello Robot Stretch RE1
108108
url: /wiki/common-platforms/hello-robot
109+
- title: Building an iOS App for ROS 2 Integration
110+
url: /wiki/common-platforms/ros2-ios-app-with-swift/
109111
- title: Configure VS Code for ROS 2
110112
url: /wiki/common-platforms/configure-vscode-for-ros2/
111113
- title: Building ROS2 Custom Packages

wiki/common-platforms/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ We encourage contributions to further enhance the knowledge base in this section
1414
- **[Asctec UAV Setup Guide](/wiki/common-platforms/asctec-uav-setup-guide/)**
1515
A detailed tutorial for setting up the Asctec Pelican UAV for autonomous waypoint navigation using ROS. Covers configuring network settings, flashing firmware, and running the ROS package on the onboard Atomboard.
1616

17+
- **[Building an iOS App for ROS 2 Integration](/wiki/common-platforms/ros2-ios-app-with-swift/)**
18+
A step-by-step guide on building an iOS application integrated with ROS 2 using the SwiftROS2 framework, covering project setup, node configuration, and SwiftUI interface development.
19+
1720
- **[Building a Custom Drone for the DARPA Triage Challenge](/wiki/common-platforms/building-custom-drone-for-darpa-triage-challenge/)**
1821
A comprehensive guide to designing and building UAVs for disaster scenarios. Covers both modified commercial platforms and fully custom designs, including hardware selection, electrical integration, and software configuration.
1922

@@ -96,6 +99,11 @@ Here is a compiled list of external resources referenced in the subsections:
9699
- [Universal Robots ROS Driver](https://github.com/UniversalRobots/Universal_Robots_ROS_Driver)
97100
- [MoveIt Setup for UR5e](http://moveit.ros.org/)
98101

102+
10. **ROS 2 iOS Integration**
103+
- [SwiftROS2 Framework](https://github.com/strapsai/swift-ros2)
104+
- [Fast RTPS Documentation](https://fast-dds.docs.eprosima.com/en/latest/)
105+
- [Apple SwiftUI Documentation](https://developer.apple.com/documentation/swiftui)
106+
99107
## Development Needs
100108
We seek contributions in the following areas:
101109
- Detailed guides for setting up and integrating additional platforms like Boston Dynamics robots or custom robotic arms.

wiki/common-platforms/ros2_ios_app_with_swift.md renamed to wiki/common-platforms/ros2-ios-app-with-swift.md

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
## A New Post
2-
31
---
42
date: 2025-04-29
5-
title: Building an iOS App for ROS2 Integration – A Step-by-Step Guide
6-
categories: [Tutorial, ROS2, iOS]
7-
tags: [ROS2, iOS, Swift, Tutorial]
3+
title: Building an iOS App for ROS 2 Integration
84
---
95

10-
This document provides a detailed, step-by-step guide on building an iOS application integrated with ROS2 using the SwiftROS2 framework. In this guide, you will learn how to set up the project, configure ROS2 nodes, implement publishers and subscribers to exchange messages via DDS, and build a SwiftUI-based user interface for operating ROS2 functionality. In addition, this README offers an in-depth explanation of the dependency packages and how the DDS mechanism is implemented to support ROS2 communication. This guide assumes you have a basic understanding of Swift and iOS development. By the end, you will be able to create and run an iOS app that seamlessly interacts with ROS2 nodes.
6+
This document provides a detailed, step-by-step guide on building an iOS application integrated with ROS 2 using the SwiftROS2 framework. In this guide, you will learn how to set up the project, configure ROS 2 nodes, implement publishers and subscribers to exchange messages via DDS, and build a SwiftUI-based user interface for operating ROS 2 functionality. In addition, this guide offers an in-depth explanation of the dependency packages and how the DDS mechanism is implemented to support ROS 2 communication. This guide assumes you have a basic understanding of Swift and iOS development. By the end, you will be able to create and run an iOS app that seamlessly interacts with ROS 2 nodes.
117

12-
The complete code can be found at https://github.com/LiaoChiawen/ROS2iOSApp
8+
The complete code can be found at <https://github.com/LiaoChiawen/ROS2iOSApp>.
139

1410
## Table of Contents
1511
- [Introduction](#introduction)
1612
- [Background and Key Concepts](#background-and-key-concepts)
17-
- [Step-by-Step Tutorial: Building an iOS App for ROS2](#step-by-step-tutorial-building-an-ios-app-for-ros2)
13+
- [Step-by-Step Tutorial: Building an iOS App for ROS 2](#step-by-step-tutorial-building-an-ios-app-for-ros-2)
1814
- [1. Project Setup and Dependencies](#1-project-setup-and-dependencies)
19-
- [2. Creating the ROS2 Node](#2-creating-the-ros2-node)
15+
- [2. Creating the ROS 2 Node](#2-creating-the-ros-2-node)
2016
- [3. Implementing Publishers and Subscribers](#3-implementing-publishers-and-subscribers)
2117
- [4. Building the User Interface](#4-building-the-user-interface)
2218
- [5. Running and Testing the App](#5-running-and-testing-the-app)
@@ -32,18 +28,18 @@ The complete code can be found at https://github.com/LiaoChiawen/ROS2iOSApp
3228
- [References](#references)
3329

3430
## Introduction
35-
This tutorial explains how to build an iOS app that leverages ROS2 capabilities using the SwiftROS2 framework. In this guide you will learn to initialize a ROS2 node, set up publishers and subscribers via a DDS-based system, and construct a simple user interface with SwiftUI to operate core functionalities including initialization, message publishing, and node shutdown. The first 100 words of this introduction will be used as an excerpt on the Wiki index.
31+
This tutorial explains how to build an iOS app that leverages ROS 2 capabilities using the SwiftROS2 framework. In this guide you will learn to initialize a ROS 2 node, set up publishers and subscribers via a DDS-based system, and construct a simple user interface with SwiftUI to operate core functionalities including initialization, message publishing, and node shutdown.
3632

3733
## Background and Key Concepts
3834
Before diving into the code, it is useful to understand these key concepts:
39-
- **ROS2 (Robot Operating System 2):** A set of libraries and tools for building robot applications, which employs nodes, topics, and messaging to facilitate robust communication.
40-
- **DDS (Data Distribution Service):** A middleware protocol used in ROS2 for real-time, scalable, and high-performance data exchange. It allows configuration of Quality of Service (QoS) parameters such as reliability and latency.
41-
- **Nodes:** The computational executables in ROS2 that handle processing and communication.
35+
- **ROS 2 (Robot Operating System 2):** A set of libraries and tools for building robot applications, which employs nodes, topics, and messaging to facilitate robust communication.
36+
- **DDS (Data Distribution Service):** A middleware protocol used in ROS 2 for real-time, scalable, and high-performance data exchange. It allows configuration of Quality of Service (QoS) parameters such as reliability and latency.
37+
- **Nodes:** The computational executables in ROS 2 that handle processing and communication.
4238
- **Publishers and Subscribers:** Mechanisms for sending (publishing) and receiving (subscribing) messages across nodes.
43-
- **SwiftROS2:** A simulated Swift library that provides interfaces to create ROS2 nodes, publishers, and subscribers.
39+
- **SwiftROS2:** A simulated Swift library that provides interfaces to create ROS 2 nodes, publishers, and subscribers.
4440
- **iOS Development using SwiftUI:** SwiftUI is utilized for building modern, responsive user interfaces on iOS.
4541

46-
## Step-by-Step Tutorial: Building an iOS App for ROS2
42+
## Step-by-Step Tutorial: Building an iOS App for ROS 2
4743

4844
### 1. Project Setup and Dependencies
4945
1. **Clone the Repository:**
@@ -63,8 +59,8 @@ Before diving into the code, it is useful to understand these key concepts:
6359
3. **Configure Xcode:**
6460
In Xcode, set the deployment target to iOS 17.0 and ensure proper code signing configurations.
6561

66-
### 2. Creating the ROS2 Node
67-
The heart of the app is the ROS2 node. The `CentralNode` class encapsulates ROS2 functionalities including initialization and resource management.
62+
### 2. Creating the ROS 2 Node
63+
The heart of the app is the ROS 2 node. The `CentralNode` class encapsulates ROS 2 functionalities including initialization and resource management.
6864

6965
- **Initialization:**
7066
In `ContentView.swift`, the `initialize()` function performs the following:
@@ -121,7 +117,7 @@ public func sendString() {
121117

122118
### 4. Building the User Interface
123119
The UI is built using SwiftUI and consists of three main buttons:
124-
- **Initialize:** Sets up the ROS2 node and publishers.
120+
- **Initialize:** Sets up the ROS 2 node and publishers.
125121
- **Publish Message:** Sends a test message.
126122
- **Destroy Node:** Tears down the node and cleans up.
127123

@@ -167,45 +163,45 @@ var body: some View {
167163
- **Build the Project:**
168164
Use Xcode to build the project ensuring that all dependencies are properly integrated.
169165
- **Run on Simulator or Device:**
170-
Launch the app on an iOS device or Simulator. Use the buttons to initialize the ROS2 node, publish a message, and destroy the node.
166+
Launch the app on an iOS device or Simulator. Use the buttons to initialize the ROS 2 node, publish a message, and destroy the node.
171167
- **Testing:**
172168
Verify the functionality by checking Xcode console logs and running unit tests located in `/ROS2iOSAppTests`.
173169

174170
## Detailed Explanation of Dependencies
175171

176172
### swift-ros2
177173
- **Purpose:**
178-
Provides a high-level Swift interface to interact with ROS2, allowing creation of nodes, publishers, and subscribers.
174+
Provides a high-level Swift interface to interact with ROS 2, allowing creation of nodes, publishers, and subscribers.
179175
- **Usage:**
180-
Classes such as `CentralNode` use this package to encapsulate ROS2 operations and expose easy-to-use methods to initialize nodes and create communication channels.
176+
Classes such as `CentralNode` use this package to encapsulate ROS 2 operations and expose easy-to-use methods to initialize nodes and create communication channels.
181177
- **Implementation:**
182-
Utilizes Swift’s async/await for asynchronous operations and error-handling mechanisms for reliable integration with ROS2 middleware.
178+
Utilizes Swift’s async/await for asynchronous operations and error-handling mechanisms for reliable integration with ROS 2 middleware.
183179

184180
### FastRTPSSwift
185181
- **Purpose:**
186-
Bridges ROS2 DDS functionalities by leveraging the Fast RTPS (Real-Time Publish-Subscribe) protocol.
182+
Bridges ROS 2 DDS functionalities by leveraging the Fast RTPS (Real-Time Publish-Subscribe) protocol.
187183
- **Usage:**
188184
Manages low-level DDS operations such as registering writers (publishers) and readers (subscribers) and handles QoS settings (e.g., reliability, durability).
189185
- **Implementation:**
190186
Wraps the native C/C++ Fast RTPS libraries into Swift-friendly APIs, abstracting the complexity involved in direct DDS communications.
191187

192188
### ros2msg
193189
- **Purpose:**
194-
Defines message types and data structures used in ROS2 communications.
190+
Defines message types and data structures used in ROS 2 communications.
195191
- **Usage:**
196192
Provides message models like `ROS2String` to package data and ensure proper serialization and deserialization using Swift’s Codable protocol.
197193
- **Implementation:**
198-
Structures messages in a way that aligns with ROS2 standards, facilitating seamless interaction between different nodes and platforms.
194+
Structures messages in a way that aligns with ROS 2 standards, facilitating seamless interaction between different nodes and platforms.
199195

200196
## Understanding the DDS Mechanism
201-
DDS (Data Distribution Service) underpins the efficient and reliable exchange of data between ROS2 nodes. Key points include:
197+
DDS (Data Distribution Service) underpins the efficient and reliable exchange of data between ROS 2 nodes. Key points include:
202198
- **DDS Communication Model:**
203199
Uses a publish/subscribe model where publishers send messages to topics and subscribers receive them based on topic subscriptions.
204200
- **Quality of Service (QoS):**
205201
DDS allows customization of parameters (e.g., reliability, durability, latency) ensuring high-performance communication even in real-time applications.
206202
- **Fast RTPS Integration:**
207203
The FastRTPSSwift package bridges the Fast RTPS library with SwiftROS2, managing:
208-
- **Participant Creation:** The ROS2 node (CentralNode) acts as a participant joining a DDS domain.
204+
- **Participant Creation:** The ROS 2 node (CentralNode) acts as a participant joining a DDS domain.
209205
- **Writer and Reader Registration:** Publishers (writers) and subscribers (readers) are registered with the DDS participant.
210206
- **Message Routing:** DDS middleware routes messages efficiently between registered writers and readers, applying QoS policies.
211207
- **Abstraction in SwiftROS2:**
@@ -219,37 +215,33 @@ DDS (Data Distribution Service) underpins the efficient and reliable exchange of
219215
3. **Build and Run:**
220216
Build the project and run the app on the desired iOS simulator or device.
221217
4. **Interact with the App:**
222-
- Tap **Initialize** to set up the ROS2 node.
223-
- Tap **Publish Message** to send a test ROS2 message.
224-
- Tap **Destroy Node** to gracefully shut down the ROS2 node.
218+
- Tap **Initialize** to set up the ROS 2 node.
219+
- Tap **Publish Message** to send a test ROS 2 message.
220+
- Tap **Destroy Node** to gracefully shut down the ROS 2 node.
225221
5. **Review Logs:**
226222
Monitor the Xcode console for log messages confirming successful node initialization, message publishing, and node destruction.
227223

228224
## Summary
229-
This guide provided a comprehensive walkthrough for building an iOS app integrated with ROS2:
225+
This guide provided a comprehensive walkthrough for building an iOS app integrated with ROS 2:
230226
- Project setup, dependency resolution, and Xcode configuration.
231-
- Initializing a ROS2 node with `CentralNode` and configuring communication via DDS.
227+
- Initializing a ROS 2 node with `CentralNode` and configuring communication via DDS.
232228
- Implementing publishers and subscribers to exchange messages.
233229
- Designing a user interface with SwiftUI and testing the functionality.
234230
- Detailed insights into the core dependency packages and DDS integration research.
235231

236232
## See Also
237-
- [ROS2 Official Documentation](https://docs.ros.org/)
233+
- [ROS 2 Official Documentation](https://docs.ros.org/)
238234
- [Fast RTPS Documentation](https://fast-dds.docs.eprosima.com/en/latest/)
239235
- [Swift Package Manager Documentation](https://swift.org/package-manager/)
240236
- [SwiftUI Tutorials](https://developer.apple.com/tutorials/swiftui)
241237

242238
## Further Reading
243239
- Advanced DDS configuration and Quality of Service (QoS) settings.
244240
- Detailed tutorials on integrating C/C++ libraries with Swift.
245-
- Comprehensive studies of ROS2 communication patterns and best practices.
241+
- Comprehensive studies of ROS 2 communication patterns and best practices.
246242

247243
## References
248-
1. Y. Hu, swift-ros2 – ROS2-like node that supports subscription and publication of DDS messages in ROS2 message format” GitHub Repository, https://github.com/strapsai/swift-ros2.
249-
2. ROS Documentation, “Getting Started with ROS2,” available at https://docs.ros.org/.
250-
3. Fast RTPS Documentation, available at https://fast-dds.docs.eprosima.com/en/latest/.
251-
4. Apple Developer Documentation, “SwiftUI,” available at https://developer.apple.com/documentation/swiftui.
252-
253-
<!--
254-
This README is based on the Robotics Knowledgebase Template. It provides a detailed guide on building an iOS ROS2 application, explains the core dependencies, and describes how the DDS mechanism underpins ROS2 communication. Modify sections as needed to match your project specifics.
255-
-->
244+
1. Y. Hu, "swift-ros2 – ROS2-like node that supports subscription and publication of DDS messages in ROS2 message format," GitHub Repository, <https://github.com/strapsai/swift-ros2>.
245+
2. ROS Documentation, "Getting Started with ROS 2," available at <https://docs.ros.org/>.
246+
3. Fast RTPS Documentation, available at <https://fast-dds.docs.eprosima.com/en/latest/>.
247+
4. Apple Developer Documentation, "SwiftUI," available at <https://developer.apple.com/documentation/swiftui>.

0 commit comments

Comments
 (0)