Skip to content

Commit f806b64

Browse files
committed
Updated README to reflect Linux improvements and removed unnecessary utils
Signed-off-by: Adam Dabrowski <[email protected]>
1 parent 727eaa3 commit f806b64

File tree

6 files changed

+9
-252
lines changed

6 files changed

+9
-252
lines changed

README.md

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Supported ROS2 distributions:
2020
- Foxy
2121
- Galactic
2222

23-
The asset can be prepared in two flavors:
23+
For Windows only, this asset can be prepared in two flavors:
2424
- standalone (no ROS2 installation required on target machine, e.g. your Unity3D simulation server). All required dependencies are installed and can be used e.g. as a complete set of Unity3D plugins.
2525
- overlay (assuming existing (supported) ROS2 installation on target machine). Only asset libraries and generated messages are installed.
2626

2727
#### Platform considerations
2828

29-
Running the Editor or App using this Asset on Ubuntu requires a start script that populates the `LD_LIBRARY_PATH`. This is due to dynamic plugin loading mechanism used in the ros2cs library.
30-
On Windows, no script is necessary and both Editor and App can be ran the usual way (e.g. with a click or cmd line).
29+
On Linux, you can run Editor and App in any way as long as ros2 is sourced in your environment. The best way to ensure that system-wide is to add `source /opt/ros/foxy/setup.bash` to your `~/.profile`
30+
file. This way running by clicking (Hub, Editor, or App executable) is supported as well as command line execution. Note that you need to re-log for changes in `~/.profile` to take place.
3131

3232
### Releases
3333

@@ -93,18 +93,18 @@ The project will pull `ros2cs` into the workspace, which also functions independ
9393
* Clone this project.
9494
* If you wish to include custom messages in your build, make sure to put them into `ros2_for_unity_custom_messages.repos` file. You can change this file in your fork or change `custom_messages.repos` in the ros2cs repository fork, it will work either way as the scripts will pull both sources.
9595
As an alternative, you can also add your custom messages package directly by copying it to `src/ros2cs/custom_messages` folder after the next step. Any message package in the build tree will be subjected to `.cs` file generator during the build.
96-
* You need to source your ROS2 installation (e.g. `source /opt/ros/foxy/setup.bash` on Ubuntu or `C:\dev\ros2_foxy\local_setup.ps1` on Windows) before you proceed, for each new open terminal. On Ubuntu, you can also include this command in your `~/.bashrc` file.
96+
* You need to source your ROS2 installation (e.g. `source /opt/ros/foxy/setup.bash` on Ubuntu or `C:\dev\ros2_foxy\local_setup.ps1` on Windows) before you proceed, for each new open terminal. On Ubuntu, it is most convenient to include this command in your `~/.profile` file.
9797
* Run `pull_repositories.sh`. This will pull `ros2cs` as well as your custom messages.
9898
* Run `build.sh` (Ubuntu) or `build.ps1` (Windows) script.
9999
* You can build tests by adding `--with-tests` argument to `build` command.
100100
* It invokes `colcon_build` with `--merge-install` argument to simplify libraries installation.
101101
* It deploys built plugins into the Asset directory. Note that only plugins built for the current platform will be deployed (there is no cross-compilation).
102102
* It prepares Unity Asset that is ready to import into your Unity project.
103103

104-
#### Standalone version
104+
#### Standalone version (Windows)
105105

106-
By default, build process generates standalone libraries.
107-
You can disable this feature by setting CMake option `STANDALONE_BUILD` to `OFF` (e.g. through editing `build.sh`).
106+
By default, build process generates standalone libraries (on Windows only).
107+
You can disable this feature by setting CMake option `STANDALONE_BUILD` to `OFF` (e.g. through editing `build.ps1`).
108108

109109
## Running with Unity
110110

@@ -118,17 +118,7 @@ Open your Unity3D project and import Ros2ForUnity Asset which is built by this p
118118

119119
#### Additional considerations for Linux
120120

121-
TODO - we are looking to replace this solution with something simpler. This section needs changes!
122-
123-
After including the Asset, close the Editor. You need to use `start.py` from `linux-utils` directory. It is necessary to run your Unity3D Editor or built App.
124-
This can be done directly or through wrapping your Unity3D project into a ros2 python package (using files from `linux-utils`) and running `colcon build`, sourcing your workspace and calling `ros2 run ros2-for-unity start editor`.
125-
126-
> This is due to the necessity for Unity3D to find all required assemblies. `dlopen` is used under the hood to dynamically
127-
load necessary libraries (including custom messages and rmw implementation).
128-
Note that unlike Windows `LoadLibrary`, `dlopen` uses `LD_LIBRARY_PATH` value from the start of the process execution and later modifications do not
129-
affect the search paths. Thus, it is necessary to change `LD_LIBRARY_PATH` before the process starts.
130-
131-
> Note that as an alternative, you can set the path manually in your system for the Editor, but consider that built App will have a different absolute path to plugins and can be moved and copied around, so this approach is not recommended.
121+
You need to have ros2 sourced in environment where you run Unity3D. See Platform Considerations for details.
132122

133123
### Building Unity3D application
134124

@@ -137,14 +127,7 @@ You can do this standard way through `Build->Build Settings...`.
137127

138128
## Running application
139129

140-
### Windows
141-
142-
You can run your application normally by clicking it or executing from command line.
143-
144-
### Linux
145-
146-
On Linux, follow the [Editor instructions](#running-the-editor), but use the start script (directly or through a package wrapper: `ros2 run ros2-for-unity start app --name:=<Your app name>`) to run your application.
147-
This is necessary to ensure plugin visibility by setting `LD_LIBRARY_PATH`.
130+
You can run your application in as standard way by clicking it or executing from command line.
148131

149132
## Full example (Windows)
150133

linux-utils/COLCON_IGNORE

Whitespace-only changes.

linux-utils/package.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

linux-utils/setup.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.

linux-utils/setup.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

linux-utils/start.py

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)