Skip to content

Commit 09e5e1e

Browse files
committed
Merge remote-tracking branch 'origin/master' into read_only_parameters
Signed-off-by: William Woodall <william@osrfoundation.org>
2 parents 1765a7f + ef37018 commit 09e5e1e

File tree

67 files changed

+585
-770
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+585
-770
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ be under the Apache 2 License, as dictated by that
1111
the terms of any separate license agreement you may have executed
1212
with Licensor regarding such Contributions.
1313
~~~
14+
15+
Contributors must sign-off each commit by adding a `Signed-off-by: ...`
16+
line to commit messages to certify that they have the right to submit
17+
the code they are contributing to the project according to the
18+
[Developer Certificate of Origin (DCO)](https://developercertificate.org/).

composition/CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
Changelog for package composition
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
0.7.0 (2019-04-14)
6+
------------------
7+
* Updated for new rclcpp_components package. (`#319 <https://github.com/ros2/demos/issues/319>`_)
8+
* Added launch along with launch_testing as test dependencies. (`#313 <https://github.com/ros2/demos/issues/313>`_)
9+
* Dropped legacy launch API usage. (`#311 <https://github.com/ros2/demos/issues/311>`_)
10+
* Contributors: Michael Carroll, Michel Hidalgo
11+
512
0.6.2 (2019-01-15)
613
------------------
714

composition/CMakeLists.txt

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1212
endif()
1313

1414
find_package(ament_cmake REQUIRED)
15-
find_package(ament_index_cpp REQUIRED)
16-
find_package(class_loader REQUIRED)
1715
find_package(example_interfaces REQUIRED)
1816
find_package(rclcpp REQUIRED)
17+
find_package(rclcpp_components REQUIRED)
1918
find_package(rcutils REQUIRED)
20-
find_package(rosidl_cmake REQUIRED)
21-
find_package(rosidl_default_generators REQUIRED)
2219
find_package(std_msgs REQUIRED)
2320

24-
rosidl_generate_interfaces(${PROJECT_NAME}
25-
"srv/LoadNode.srv"
26-
)
27-
2821
include_directories(include)
2922

3023
# create ament index resource which references the libraries in the binary dir
@@ -35,43 +28,43 @@ add_library(talker_component SHARED
3528
target_compile_definitions(talker_component
3629
PRIVATE "COMPOSITION_BUILDING_DLL")
3730
ament_target_dependencies(talker_component
38-
"class_loader"
3931
"rclcpp"
32+
"rclcpp_components"
4033
"std_msgs")
41-
rclcpp_register_node_plugins(talker_component "composition::Talker")
34+
rclcpp_components_register_nodes(talker_component "composition::Talker")
4235
set(node_plugins "${node_plugins}composition::Talker;$<TARGET_FILE:talker_component>\n")
4336

4437
add_library(listener_component SHARED
4538
src/listener_component.cpp)
4639
target_compile_definitions(listener_component
4740
PRIVATE "COMPOSITION_BUILDING_DLL")
4841
ament_target_dependencies(listener_component
49-
"class_loader"
5042
"rclcpp"
43+
"rclcpp_components"
5144
"std_msgs")
52-
rclcpp_register_node_plugins(listener_component "composition::Listener")
45+
rclcpp_components_register_nodes(listener_component "composition::Listener")
5346
set(node_plugins "${node_plugins}composition::Listener;$<TARGET_FILE:listener_component>\n")
5447

5548
add_library(server_component SHARED
5649
src/server_component.cpp)
5750
target_compile_definitions(server_component
5851
PRIVATE "COMPOSITION_BUILDING_DLL")
5952
ament_target_dependencies(server_component
60-
"class_loader"
6153
"example_interfaces"
62-
"rclcpp")
63-
rclcpp_register_node_plugins(server_component "composition::Server")
54+
"rclcpp"
55+
"rclcpp_components")
56+
rclcpp_components_register_nodes(server_component "composition::Server")
6457
set(node_plugins "${node_plugins}composition::Server;$<TARGET_FILE:server_component>\n")
6558

6659
add_library(client_component SHARED
6760
src/client_component.cpp)
6861
target_compile_definitions(client_component
6962
PRIVATE "COMPOSITION_BUILDING_DLL")
7063
ament_target_dependencies(client_component
71-
"class_loader"
7264
"example_interfaces"
73-
"rclcpp")
74-
rclcpp_register_node_plugins(client_component "composition::Client")
65+
"rclcpp"
66+
"rclcpp_components")
67+
rclcpp_components_register_nodes(client_component "composition::Client")
7568
set(node_plugins "${node_plugins}composition::Client;$<TARGET_FILE:client_component>\n")
7669

7770
# since the package installs libraries without exporting them
@@ -107,33 +100,15 @@ endif()
107100
target_link_libraries(linktime_composition ${libs})
108101
ament_target_dependencies(linktime_composition
109102
"class_loader"
110-
"rclcpp")
103+
"rclcpp"
104+
"rclcpp_components")
111105

112106
add_executable(dlopen_composition
113107
src/dlopen_composition.cpp)
114108
ament_target_dependencies(dlopen_composition
115-
"class_loader"
116-
"rclcpp")
117-
118-
add_executable(api_composition
119-
src/api_composition.cpp)
120-
target_link_libraries(api_composition ament_index_cpp::ament_index_cpp)
121-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
122-
target_link_libraries(api_composition "stdc++fs")
123-
endif()
124-
ament_target_dependencies(api_composition
125109
"class_loader"
126110
"rclcpp"
127-
"rcutils")
128-
rosidl_target_interfaces(api_composition
129-
${PROJECT_NAME} "rosidl_typesupport_cpp")
130-
131-
add_executable(api_composition_cli
132-
src/api_composition_cli.cpp)
133-
ament_target_dependencies(api_composition_cli
134-
"rclcpp")
135-
rosidl_target_interfaces(api_composition_cli
136-
${PROJECT_NAME} "rosidl_typesupport_cpp")
111+
"rclcpp_components")
137112

138113
install(TARGETS
139114
talker_component
@@ -148,8 +123,6 @@ install(TARGETS
148123
manual_composition
149124
linktime_composition
150125
dlopen_composition
151-
api_composition
152-
api_composition_cli
153126
DESTINATION lib/${PROJECT_NAME})
154127

155128
if(BUILD_TESTING)
@@ -173,16 +146,11 @@ if(BUILD_TESTING)
173146
set(LISTENER_LIBRARY $<TARGET_FILE:listener_component>)
174147
set(SERVER_LIBRARY $<TARGET_FILE:server_component>)
175148
set(CLIENT_LIBRARY $<TARGET_FILE:client_component>)
176-
set(API_COMPOSITION_EXECUTABLE $<TARGET_FILE:api_composition>)
177-
set(API_COMPOSITION_CLI_EXECUTABLE $<TARGET_FILE:api_composition_cli>)
178149
set(EXPECTED_OUTPUT_ALL "${CMAKE_CURRENT_SOURCE_DIR}/test/composition_all")
179150
set(EXPECTED_OUTPUT_PUBSUB "${CMAKE_CURRENT_SOURCE_DIR}/test/composition_pubsub")
180151
set(EXPECTED_OUTPUT_SRV "${CMAKE_CURRENT_SOURCE_DIR}/test/composition_srv")
181152

182153
set(test_names
183-
"test_api_pubsub_composition"
184-
"test_api_srv_composition"
185-
"test_api_srv_composition_client_first"
186154
"test_dlopen_composition"
187155
"test_linktime_composition"
188156
"test_manual_composition"

composition/include/composition/client_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Client : public rclcpp::Node
2626
{
2727
public:
2828
COMPOSITION_PUBLIC
29-
Client();
29+
explicit Client(rclcpp::NodeOptions options);
3030

3131
protected:
3232
void on_timer();

composition/include/composition/listener_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Listener : public rclcpp::Node
2626
{
2727
public:
2828
COMPOSITION_PUBLIC
29-
Listener();
29+
explicit Listener(rclcpp::NodeOptions options);
3030

3131
private:
3232
rclcpp::Subscription<std_msgs::msg::String>::SharedPtr sub_;

composition/include/composition/server_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Server : public rclcpp::Node
2626
{
2727
public:
2828
COMPOSITION_PUBLIC
29-
Server();
29+
explicit Server(rclcpp::NodeOptions options);
3030

3131
private:
3232
rclcpp::Service<example_interfaces::srv::AddTwoInts>::SharedPtr srv_;

composition/include/composition/talker_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Talker : public rclcpp::Node
2626
{
2727
public:
2828
COMPOSITION_PUBLIC
29-
Talker();
29+
explicit Talker(rclcpp::NodeOptions options);
3030

3131
protected:
3232
void on_timer();

composition/package.xml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>composition</name>
5-
<version>0.6.2</version>
5+
<version>0.7.0</version>
66
<description>Examples for composing multiple nodes in a single process.</description>
77
<maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer>
88
<license>Apache License 2.0</license>
99

1010
<buildtool_depend>ament_cmake</buildtool_depend>
11-
<buildtool_depend>rosidl_default_generators</buildtool_depend>
12-
<build_depend>ament_index_cpp</build_depend>
13-
<build_depend>class_loader</build_depend>
11+
1412
<build_depend>example_interfaces</build_depend>
1513
<build_depend>rclcpp</build_depend>
14+
<build_depend>rclcpp_components</build_depend>
1615
<build_depend>rcutils</build_depend>
17-
<build_depend>rosidl_cmake</build_depend>
1816
<build_depend>std_msgs</build_depend>
1917

20-
<exec_depend>ament_index_cpp</exec_depend>
21-
<exec_depend>class_loader</exec_depend>
2218
<exec_depend>example_interfaces</exec_depend>
2319
<exec_depend>rclcpp</exec_depend>
20+
<exec_depend>rclcpp_components</exec_depend>
2421
<exec_depend>rcutils</exec_depend>
25-
<exec_depend>rosidl_default_runtime</exec_depend>
2622
<exec_depend>std_msgs</exec_depend>
2723

2824
<test_depend>ament_cmake_pytest</test_depend>
@@ -32,8 +28,6 @@
3228
<test_depend>launch_testing</test_depend>
3329
<test_depend>rmw_implementation_cmake</test_depend>
3430

35-
<member_of_group>rosidl_interface_packages</member_of_group>
36-
3731
<export>
3832
<build_type>ament_cmake</build_type>
3933
</export>

0 commit comments

Comments
 (0)