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
correct name of shared libraries and their location (#722) (#726)
* correct name of shared libraries and their location
* add instruction for running dlopen_composition in separate sections of Linux and windows
* format the composition Documentation
---------
(cherry picked from commit c3a5fdf)
Signed-off-by: Aniket Kumar Roy <aniketroy769@gmail.com>
Co-authored-by: Aniket Kumar Roy <aniketroy769@gmail.com>
Copy file name to clipboardExpand all lines: composition/README.md
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,53 @@ ros2 run composition manual_composition
35
35
36
36
This runs `dlopen_composition` which is an alternative to run-time composition by creating a generic container process and explicitly passing the libraries to load without using ROS interfaces.
37
37
38
+
First run the command to find the libraries prefix path.
39
+
40
+
```bash
41
+
ros2 pkg prefix composition
42
+
```
43
+
44
+
Then you can find the prefix path of the required shared libraries to load.
45
+
38
46
The process will open each library and create one instance of each “rclcpp::Node” class in the library.
39
47
48
+
```bash
49
+
ros2 run composition dlopen_composition <path_to_talker_component_shared_library><path_to_listener_component_shared_library>
50
+
```
51
+
52
+
#### Linux
53
+
54
+
The libraries will be present in `<prefix_path>/lib/` as `lib*.so` files.
Since command substitution will not work on Windows, you have to give the absolute path of the libraries.
66
+
67
+
The libraries will be in `<path_to_your_ros2_installation>\bin\`, so we have to run.
68
+
69
+
```bash
70
+
ros2 run composition dlopen_composition <prefix_path>\bin\talker_component.dll <prefix_path>\bin\listener_component.dll
71
+
```
72
+
73
+
To get the `prefix_path` run
74
+
75
+
```bash
76
+
ros2 pkg prefix composition
77
+
```
78
+
79
+
For example if our `prefix_path` comes out to be `C:\pixi_ws\ros2-windows\` we will run
80
+
81
+
```bash
82
+
ros2 run composition dlopen_composition C:\pixi_ws\ros2-windows\bin\talker_component.dll C:\pixi_ws\ros2-windows\bin\listener_component.dll
83
+
```
84
+
44
85
### Linktime Composition
45
86
46
87
Similar to previous, this runs `linktime_composition` which **links all classes from libraries** that are registered under the **library_path** with the **linker**.
0 commit comments