Skip to content

Commit b0ff053

Browse files
author
Alberto Soragna
committed
Merge remote-tracking branch 'upstream/master' into irobot/add-rmw-listener-apis
2 parents d4dbb64 + bff6916 commit b0ff053

File tree

97 files changed

+3194
-850
lines changed

Some content is hidden

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

97 files changed

+3194
-850
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Visit the [rclcpp API documentation](http://docs.ros2.org/latest/api/rclcpp/) fo
1212

1313
### Examples
1414

15-
The ROS 2 tutorials [Writing a simple publisher and subscriber](https://index.ros.org/doc/ros2/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber/)
16-
and [Writing a simple service and client](https://index.ros.org/doc/ros2/Tutorials/Writing-A-Simple-Cpp-Service-And-Client/)
15+
The ROS 2 tutorials [Writing a simple publisher and subscriber](https://docs.ros.org/en/rolling/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html).
16+
and [Writing a simple service and client](https://docs.ros.org/en/rolling/Tutorials/Writing-A-Simple-Cpp-Service-And-Client.html)
1717
contain some examples of rclcpp APIs in use.

rclcpp/CHANGELOG.rst

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

5+
9.0.2 (2021-04-14)
6+
------------------
7+
* Avoid returning loan when none was obtained. (`#1629 <https://github.com/ros2/rclcpp/issues/1629>`_)
8+
* Use a different implementation of mutex two priorities (`#1628 <https://github.com/ros2/rclcpp/issues/1628>`_)
9+
* Do not test the value of the history policy when testing the get_publishers/subscriptions_info_by_topic() methods (`#1626 <https://github.com/ros2/rclcpp/issues/1626>`_)
10+
* Check first parameter type and range before calling the user validation callbacks (`#1627 <https://github.com/ros2/rclcpp/issues/1627>`_)
11+
* Contributors: Ivan Santiago Paunovic, Miguel Company
12+
13+
9.0.1 (2021-04-12)
14+
------------------
15+
* Restore test exception for Connext (`#1625 <https://github.com/ros2/rclcpp/issues/1625>`_)
16+
* Fix race condition in TimeSource clock thread setup (`#1623 <https://github.com/ros2/rclcpp/issues/1623>`_)
17+
* Contributors: Andrea Sorbini, Michel Hidalgo
18+
19+
9.0.0 (2021-04-06)
20+
------------------
21+
* remove deprecated code which was deprecated in foxy and should be removed in galactic (`#1622 <https://github.com/ros2/rclcpp/issues/1622>`_)
22+
* Change index.ros.org -> docs.ros.org. (`#1620 <https://github.com/ros2/rclcpp/issues/1620>`_)
23+
* Unique network flows (`#1496 <https://github.com/ros2/rclcpp/issues/1496>`_)
24+
* Add spin_some support to the StaticSingleThreadedExecutor (`#1338 <https://github.com/ros2/rclcpp/issues/1338>`_)
25+
* Add publishing instrumentation (`#1600 <https://github.com/ros2/rclcpp/issues/1600>`_)
26+
* Create load_parameters and delete_parameters methods (`#1596 <https://github.com/ros2/rclcpp/issues/1596>`_)
27+
* refactor AnySubscriptionCallback and add/deprecate callback signatures (`#1598 <https://github.com/ros2/rclcpp/issues/1598>`_)
28+
* Add generic publisher and generic subscription for serialized messages (`#1452 <https://github.com/ros2/rclcpp/issues/1452>`_)
29+
* use context from `node_base\_` for clock executor. (`#1617 <https://github.com/ros2/rclcpp/issues/1617>`_)
30+
* updating quality declaration links (re: `ros2/docs.ros2.org#52 <https://github.com/ros2/docs.ros2.org/issues/52>`_) (`#1615 <https://github.com/ros2/rclcpp/issues/1615>`_)
31+
* Contributors: Ananya Muddukrishna, BriceRenaudeau, Chris Lalancette, Christophe Bedard, Nikolai Morin, Tomoya Fujita, William Woodall, mauropasse, shonigmann
32+
533
8.2.0 (2021-03-31)
634
------------------
735
* Initialize integers in test_parameter_event_handler.cpp to avoid undefined behavior (`#1609 <https://github.com/ros2/rclcpp/issues/1609>`_)

rclcpp/CMakeLists.txt

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ project(rclcpp)
55
find_package(Threads REQUIRED)
66

77
find_package(ament_cmake_ros REQUIRED)
8+
find_package(ament_index_cpp REQUIRED)
89
find_package(builtin_interfaces REQUIRED)
910
find_package(libstatistics_collector REQUIRED)
1011
find_package(rcl REQUIRED)
@@ -20,9 +21,10 @@ find_package(rosidl_typesupport_cpp REQUIRED)
2021
find_package(statistics_msgs REQUIRED)
2122
find_package(tracetools REQUIRED)
2223

23-
# Default to C++14
24+
# TODO(wjwwood): remove this when gtest can build on its own, when using target_compile_features()
25+
# Default to C++17
2426
if(NOT CMAKE_CXX_STANDARD)
25-
set(CMAKE_CXX_STANDARD 14)
27+
set(CMAKE_CXX_STANDARD 17)
2628
endif()
2729
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
2830
# About -Wno-sign-conversion: With Clang, -Wconversion implies -Wsign-conversion. There are a number of
@@ -51,12 +53,14 @@ set(${PROJECT_NAME}_SRCS
5153
src/rclcpp/executable_list.cpp
5254
src/rclcpp/executor.cpp
5355
src/rclcpp/executors.cpp
54-
src/rclcpp/expand_topic_or_service_name.cpp
5556
src/rclcpp/executors/multi_threaded_executor.cpp
5657
src/rclcpp/executors/single_threaded_executor.cpp
5758
src/rclcpp/executors/static_executor_entities_collector.cpp
5859
src/rclcpp/executors/static_single_threaded_executor.cpp
60+
src/rclcpp/expand_topic_or_service_name.cpp
5961
src/rclcpp/future_return_code.cpp
62+
src/rclcpp/generic_publisher.cpp
63+
src/rclcpp/generic_subscription.cpp
6064
src/rclcpp/graph_listener.cpp
6165
src/rclcpp/guard_condition.cpp
6266
src/rclcpp/init_options.cpp
@@ -66,8 +70,8 @@ set(${PROJECT_NAME}_SRCS
6670
src/rclcpp/memory_strategies.cpp
6771
src/rclcpp/memory_strategy.cpp
6872
src/rclcpp/message_info.cpp
73+
src/rclcpp/network_flow_endpoint.cpp
6974
src/rclcpp/node.cpp
70-
src/rclcpp/node_options.cpp
7175
src/rclcpp/node_interfaces/node_base.cpp
7276
src/rclcpp/node_interfaces/node_clock.cpp
7377
src/rclcpp/node_interfaces/node_graph.cpp
@@ -78,13 +82,14 @@ set(${PROJECT_NAME}_SRCS
7882
src/rclcpp/node_interfaces/node_timers.cpp
7983
src/rclcpp/node_interfaces/node_topics.cpp
8084
src/rclcpp/node_interfaces/node_waitables.cpp
85+
src/rclcpp/node_options.cpp
8186
src/rclcpp/parameter.cpp
82-
src/rclcpp/parameter_value.cpp
8387
src/rclcpp/parameter_client.cpp
8488
src/rclcpp/parameter_event_handler.cpp
8589
src/rclcpp/parameter_events_filter.cpp
8690
src/rclcpp/parameter_map.cpp
8791
src/rclcpp/parameter_service.cpp
92+
src/rclcpp/parameter_value.cpp
8893
src/rclcpp/publisher_base.cpp
8994
src/rclcpp/qos.cpp
9095
src/rclcpp/qos_event.cpp
@@ -99,6 +104,7 @@ set(${PROJECT_NAME}_SRCS
99104
src/rclcpp/time_source.cpp
100105
src/rclcpp/timer.cpp
101106
src/rclcpp/type_support.cpp
107+
src/rclcpp/typesupport_helpers.cpp
102108
src/rclcpp/utilities.cpp
103109
src/rclcpp/wait_set_policies/detail/write_preferring_read_write_lock.cpp
104110
src/rclcpp/waitable.cpp
@@ -170,15 +176,20 @@ foreach(interface_file ${interface_files})
170176
include/rclcpp/node_interfaces/get_${interface_name}.hpp)
171177
endforeach()
172178

173-
add_library(${PROJECT_NAME}
174-
${${PROJECT_NAME}_SRCS})
179+
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS})
180+
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
181+
# TODO(wjwwood): address all deprecation warnings and then remove this
182+
if(WIN32)
183+
target_compile_definitions(${PROJECT_NAME} PUBLIC "_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS")
184+
endif()
175185
target_include_directories(${PROJECT_NAME} PUBLIC
176186
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
177187
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
178188
"$<INSTALL_INTERFACE:include>")
179189
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
180190
# specific order: dependents before dependencies
181191
ament_target_dependencies(${PROJECT_NAME}
192+
"ament_index_cpp"
182193
"libstatistics_collector"
183194
"rcl"
184195
"rcl_yaml_param_parser"
@@ -209,6 +220,7 @@ ament_export_include_directories(include)
209220
ament_export_libraries(${PROJECT_NAME})
210221
ament_export_targets(${PROJECT_NAME})
211222

223+
ament_export_dependencies(ament_index_cpp)
212224
ament_export_dependencies(libstatistics_collector)
213225
ament_export_dependencies(rcl)
214226
ament_export_dependencies(rcpputils)
@@ -235,3 +247,8 @@ install(
235247
DIRECTORY include/ ${CMAKE_CURRENT_BINARY_DIR}/include/
236248
DESTINATION include
237249
)
250+
251+
if(TEST cppcheck)
252+
# must set the property after ament_package()
253+
set_tests_properties(cppcheck PROPERTIES TIMEOUT 500)
254+
endif()

rclcpp/QUALITY_DECLARATION.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This document is a declaration of software quality for the `rclcpp` package, bas
44

55
The package `rclcpp` claims to be in the **Quality Level 1** category when it is used with a **Quality Level 1** middleware.
66

7-
Below are the rationales, notes, and caveats for this claim, organized by each requirement listed in the [Package Quality Categories in REP-2004](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#package-quality-categories) of the ROS2 developer guide.
7+
Below are the rationales, notes, and caveats for this claim, organized by each requirement listed in the [Package Quality Categories in REP-2004](https://www.ros.org/reps/rep-2004.html) of the ROS2 developer guide.
88

99
## Version Policy [1]
1010

1111
### Version Scheme [1.i]
1212

13-
`rclcpp` uses `semver` according to the recommendation for ROS Core packages in the [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#versioning).
13+
`rclcpp` uses `semver` according to the recommendation for ROS Core packages in the [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#versioning).
1414

1515
### Version Stability [1.ii]
1616

@@ -39,19 +39,19 @@ Headers under the folder `detail` are not considered part of the public API and
3939

4040
## Change Control Process [2]
4141

42-
`rclcpp` follows the recommended guidelines for ROS Core packages in the [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#change-control-process).
42+
`rclcpp` follows the recommended guidelines for ROS Core packages in the [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#change-control-process).
4343

4444
### Change Requests [2.i]
4545

46-
All changes will occur through a pull request, check [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#change-control-process) for additional information.
46+
All changes will occur through a pull request, check [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#change-control-process) for additional information.
4747

4848
### Contributor Origin [2.ii]
4949

5050
This package uses DCO as its confirmation of contributor origin policy. More information can be found in [CONTRIBUTING](../CONTRIBUTING.md).
5151

5252
### Peer Review Policy [2.iii]
5353

54-
All pull requests will be peer-reviewed, check [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#change-control-process) for additional information.
54+
All pull requests will be peer-reviewed, check [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#change-control-process) for additional information.
5555

5656
### Continuous Integration [2.iv]
5757

@@ -111,7 +111,7 @@ The tests aim to cover both typical usage and corner cases, but are quantified b
111111

112112
### Coverage [4.iii]
113113

114-
`rclcpp` follows the recommendations for ROS Core packages in the [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#code-coverage), and opts to use line coverage instead of branch coverage.
114+
`rclcpp` follows the recommendations for ROS Core packages in the [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#code-coverage), and opts to use line coverage instead of branch coverage.
115115

116116
This includes:
117117

@@ -121,13 +121,13 @@ This includes:
121121

122122
Changes are required to make a best effort to keep or increase coverage before being accepted, but decreases are allowed if properly justified and accepted by reviewers.
123123

124-
Current coverage statistics can be viewed [here](https://ci.ros2.org/job/nightly_linux_coverage/lastCompletedBuild/cobertura/src_ros2_rclcpp_rclcpp_src_rclcpp/). A description of how coverage statistics are calculated is summarized in this page ["ROS 2 Onboarding Guide"](https://index.ros.org/doc/ros2/Contributing/ROS-2-On-boarding-Guide/#note-on-coverage-runs).
124+
Current coverage statistics can be viewed [here](https://ci.ros2.org/job/nightly_linux_coverage/lastCompletedBuild/cobertura/src_ros2_rclcpp_rclcpp_src_rclcpp/). A description of how coverage statistics are calculated is summarized in this page ["ROS 2 Onboarding Guide"](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#note-on-coverage-runs).
125125

126126
`rclcpp` has a line coverage `>= 95%`, which is calculated over all directories within `rclcpp` with the exception of the `experimental` directory.
127127

128128
### Performance [4.iv]
129129

130-
`rclcpp` follows the recommendations for performance testing of C/C++ code in the [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#performance), and opts to do performance analysis on each release rather than each change.
130+
`rclcpp` follows the recommendations for performance testing of C/C++ code in the [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#performance), and opts to do performance analysis on each release rather than each change.
131131

132132
The performance tests of `rclcpp` are located in the [test/benchmark directory](https://github.com/ros2/rclcpp/tree/master/rclcpp/test/benchmark).
133133

@@ -139,7 +139,7 @@ Changes that introduce regressions in performance must be adequately justified i
139139

140140
### Linters and Static Analysis [4.v]
141141

142-
`rclcpp` uses and passes all the ROS2 standard linters and static analysis tools for a C++ package as described in the [ROS 2 Developer Guide](https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#linters-and-static-analysis). Passing implies there are no linter/static errors when testing against CI of supported platforms.
142+
`rclcpp` uses and passes all the ROS2 standard linters and static analysis tools for a C++ package as described in the [ROS 2 Developer Guide](https://docs.ros.org/en/rolling/Contributing/Developer-Guide.html#linters-and-static-analysis). Passing implies there are no linter/static errors when testing against CI of supported platforms.
143143

144144
Currently nightly test results can be seen here:
145145
* [linux-aarch64_release](https://ci.ros2.org/view/nightly/job/nightly_linux-aarch64_release/lastBuild/testReport/rclcpp/)

rclcpp/include/rclcpp/any_executable.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ struct AnyExecutable
5050
std::shared_ptr<void> data;
5151
};
5252

53-
namespace executor
54-
{
55-
56-
using AnyExecutable [[deprecated("use rclcpp::AnyExecutable instead")]] = AnyExecutable;
57-
58-
} // namespace executor
5953
} // namespace rclcpp
6054

6155
#endif // RCLCPP__ANY_EXECUTABLE_HPP_

0 commit comments

Comments
 (0)