You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-19Lines changed: 15 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,18 @@
2
2
3
3
Build ROS2 stack for iOS software development.
4
4
5
-
**For the impatient**: Instead of building ROS2 from source (see below), you can download [our prebuilt libs](https://github.com/light-tech/ROS2-On-iOS/releases) and extract it to the root of the repo with `tar xzf`.
6
-
Then make a symlink `ros2` pointing to the extracted `ros2_iOS_Simulator` where we can find the ROS2 `lib` and `include` headers
5
+
**For the impatient**: Instead of building ROS2 from source (see below), you can download [our prebuilt libs](https://github.com/light-tech/ROS2-On-iOS/releases) and extract it.
6
+
Then make a symlink `ros2` pointing to the extracted `ros2_$PLATFORM` where we can find the ROS2 `lib` and `include` headers
7
7
```shell
8
-
ln -s ros2_iOS_Simulator ros2
8
+
ln -s PATH_TO_EXTRACTED_ros2_$PLATFORM ros2
9
9
```
10
-
You should of course change the symlink target when switching between building for real iPhone, for simulator and for Mac Catalyst.
10
+
You should of course change the symlink target when switching between building for real iPhone, simulator and Mac Catalyst.
11
11
Now we can run the demo application which ports [the official example](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html): Run the app on **two** simulator instances, click on *Start publishing* on one and *Start listening* on the other.
_Note_: To run Mac Catalyst app on your macOS machine, you need to sign the app with your development signing certificate.
16
+
15
17
**Main guides**:
16
18
17
19
*[Build ROS2 from source on macOS](https://docs.ros.org/en/humble/Installation/Alternatives/macOS-Development-Setup.html)
@@ -22,38 +24,30 @@ Now we can run the demo application which ports [the official example](https://d
22
24
23
25
We are going to need
24
26
25
-
* CMake **3.23** until [this](https://github.com/ament/ament_cmake/pull/395) is sorted out
27
+
* CMake **3.23** until [this issue](https://github.com/ament/ament_cmake/pull/395) is sorted out
26
28
* Python **3.10**
27
29
* Xcode + Command Line tools
28
30
29
31
installed. All subsequent shell commands are to be done at `$REPO_ROOT`.
30
32
31
-
Also, create a Python virtual environment for ease of working
33
+
Also, create a Python virtual environment for ease of package installation
32
34
33
35
1. Create a new Python virtual environment
34
36
```shell
35
-
export MY_PYTHON_ENV=usr_local
36
-
python3 -m venv $MY_PYTHON_ENV
37
+
python3 -m venv my_ros2_python_env
37
38
```
38
-
Here I use `usr_local` as it is intended to act like `/usr/local/`.
39
39
40
40
2. Activate the environment
41
41
```shell
42
-
source$MY_PYTHON_ENV/bin/activate
42
+
sourcemy_ros2_python_env/bin/activate
43
43
```
44
44
45
45
3. Install the packages
46
46
```shell
47
47
python3 -m pip install -r requirements.txt
48
48
```
49
49
50
-
4. Compile `googletest`:
51
-
```shell
52
-
cd usr_local/lib/python3.10/site-packages/mypyc/external/googletest/make
53
-
make
54
-
```
55
-
56
-
If you have other environment management such as Anaconda, remember to deactivate them.
50
+
If you have other environment management such as Anaconda, remember to **DEACTIVATE** them.
57
51
58
52
## Source and workspace preparation
59
53
@@ -97,17 +91,19 @@ If you have other environment management such as Anaconda, remember to deactivat
97
91
ln -s $REPO_ROOT/src src
98
92
```
99
93
100
-
5. It is good to have multiple workspaces such as
94
+
5. During development, it is good to have multiple workspaces such as
95
+
101
96
- `ament_ws`: move `ament` here, build and `source` it before moving on to
102
97
- `base_ws`: add `rcl` and its dependencies and once successful
103
98
- `rclcpp_ws`: add other desired packages such as `rclcpp`.
99
+
104
100
This way, one can minimize the amount of packages to rebuild.
105
101
106
102
## Build ROS2 core packages for iOS
107
103
108
104
Before building, we need to change the line `#include <net/if_arp.h>`in`src/eProsima/Fast-DDS/src/cpp/utils/IPFinder.cpp` into `#include <net/ethernet.h>` according to [this](https://stackoverflow.com/questions/10395041/getting-arp-table-on-iphone-ipad) as the original header is only available in the macOS SDK.
109
105
110
-
We also disable `rcl_logging_spdlog` by
106
+
We also disable the package `rcl_logging_spdlog` by
0 commit comments