Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into qos
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
  • Loading branch information
Emerson Knapp committed Apr 15, 2019
2 parents fd5e0e3 + d94c958 commit 1192db9
Show file tree
Hide file tree
Showing 14 changed files with 1,064 additions and 42 deletions.
27 changes: 27 additions & 0 deletions rcl/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
Changelog for package rcl
^^^^^^^^^^^^^^^^^^^^^^^^^

0.7.0 (2019-04-14)
------------------
* Added more test cases for graph API + fix bug. (`#404 <https://github.com/ros2/rcl/issues/404>`_)
* Fixed missing include. (`#413 <https://github.com/ros2/rcl/issues/413>`_)
* Updated to use pedantic. (`#412 <https://github.com/ros2/rcl/issues/412>`_)
* Added function to get publisher actual qos settings. (`#406 <https://github.com/ros2/rcl/issues/406>`_)
* Refactored graph API docs. (`#401 <https://github.com/ros2/rcl/issues/401>`_)
* Updated to use ament_target_dependencies where possible. (`#400 <https://github.com/ros2/rcl/issues/400>`_)
* Fixed regression around fully qualified node name. (`#402 <https://github.com/ros2/rcl/issues/402>`_)
* Added function rcl_names_and_types_init. (`#403 <https://github.com/ros2/rcl/issues/403>`_)
* Fixed uninitialize sequence number of client. (`#395 <https://github.com/ros2/rcl/issues/395>`_)
* Added launch along with launch_testing as test dependencies. (`#393 <https://github.com/ros2/rcl/issues/393>`_)
* Set symbol visibility to hidden for rcl. (`#391 <https://github.com/ros2/rcl/issues/391>`_)
* Updated to split test_token to avoid compiler note. (`#392 <https://github.com/ros2/rcl/issues/392>`_)
* Dropped legacy launch API usage. (`#387 <https://github.com/ros2/rcl/issues/387>`_)
* Improved security directory lookup. (`#332 <https://github.com/ros2/rcl/issues/332>`_)
* Enforce non-null argv values on rcl_init(). (`#388 <https://github.com/ros2/rcl/issues/388>`_)
* Removed incorrect argument documentation. (`#361 <https://github.com/ros2/rcl/issues/361>`_)
* Changed error to warning for multiple loggers. (`#384 <https://github.com/ros2/rcl/issues/384>`_)
* Added rcl_node_get_fully_qualified_name. (`#255 <https://github.com/ros2/rcl/issues/255>`_)
* Updated rcl_remap_t to use the PIMPL pattern. (`#377 <https://github.com/ros2/rcl/issues/377>`_)
* Fixed documentation typo. (`#376 <https://github.com/ros2/rcl/issues/376>`_)
* Removed test circumvention now that a bug is fixed in rmw_opensplice. (`#368 <https://github.com/ros2/rcl/issues/368>`_)
* Updated to pass context to wait set, and fini rmw context. (`#373 <https://github.com/ros2/rcl/issues/373>`_)
* Updated to publish logs to Rosout. (`#350 <https://github.com/ros2/rcl/issues/350>`_)
* Contributors: AAlon, Dirk Thomas, Jacob Perron, M. M, Michael Carroll, Michel Hidalgo, Mikael Arguedas, Nick Burek, RARvolt, Ross Desmond, Sachin Suresh Bhat, Shane Loretz, William Woodall, ivanpauno

0.6.4 (2019-01-11)
------------------
* Added method for accessing rmw_context from rcl_context (`#372 <https://github.com/ros2/rcl/issues/372>`_)
Expand Down
2 changes: 1 addition & 1 deletion rcl/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rcl</name>
<version>0.6.4</version>
<version>0.7.0</version>
<description>The ROS client library common implementation.
This package contains an API which builds on the ROS middleware API and is optionally built upon by the other ROS client libraries.
</description>
Expand Down
15 changes: 15 additions & 0 deletions rcl_action/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
Changelog for package rcl_action
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.7.0 (2019-04-14)
------------------
* Added Action graph API (`#411 <https://github.com/ros2/rcl/issues/411>`_)
* Updated to use ament_target_dependencies where possible. (`#400 <https://github.com/ros2/rcl/issues/400>`_)
* Fixed typo in Doxyfile. (`#398 <https://github.com/ros2/rcl/issues/398>`_)
* Updated tests to use separated action types. (`#340 <https://github.com/ros2/rcl/issues/340>`_)
* Fixed minor documentation issues. (`#397 <https://github.com/ros2/rcl/issues/397>`_)
* Set symbol visibility to hidden for rcl. (`#391 <https://github.com/ros2/rcl/issues/391>`_)
* Fixed rcl_action documentation. (`#380 <https://github.com/ros2/rcl/issues/380>`_)
* Removed now unused test executable . (`#382 <https://github.com/ros2/rcl/issues/382>`_)
* Removed unused action server option 'clock_type'. (`#382 <https://github.com/ros2/rcl/issues/382>`_)
* Set error message when there is an invalid goal transition. (`#382 <https://github.com/ros2/rcl/issues/382>`_)
* Updated to pass context to wait set, and fini rmw context (`#373 <https://github.com/ros2/rcl/issues/373>`_)
* Contributors: Dirk Thomas, Jacob Perron, Sachin Suresh Bhat, William Woodall, ivanpauno

0.6.4 (2019-01-11)
------------------
* Added parentheses around use of zerouuid macro (`#371 <https://github.com/ros2/rcl/issues/371>`_)
Expand Down
15 changes: 14 additions & 1 deletion rcl_action/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set(rcl_action_sources
src/${PROJECT_NAME}/action_server.c
src/${PROJECT_NAME}/goal_handle.c
src/${PROJECT_NAME}/goal_state_machine.c
src/${PROJECT_NAME}/graph.c
src/${PROJECT_NAME}/names.c
src/${PROJECT_NAME}/types.c
)
Expand Down Expand Up @@ -91,7 +92,11 @@ if(BUILD_TESTING)
target_link_libraries(test_action_client
${PROJECT_NAME}
)
ament_target_dependencies(test_action_client "osrf_testing_tools_cpp" "rcl" "test_msgs")
ament_target_dependencies(test_action_client
"osrf_testing_tools_cpp"
"rcl"
"test_msgs"
)
endif()

# get the rmw implementations ahead of time
Expand Down Expand Up @@ -122,6 +127,7 @@ if(BUILD_TESTING)
${PROJECT_NAME}
)
ament_target_dependencies(${target}${target_suffix}
"osrf_testing_tools_cpp"
"rcl"
"test_msgs"
)
Expand All @@ -146,6 +152,13 @@ if(BUILD_TESTING)
"test/rcl_action/test_action_communication.cpp")
custom_test_c(test_action_interaction
"test/rcl_action/test_action_interaction.cpp")

# TODO(jacobperron): Graph tests fail with opensplice. Re-enable after resolving
# https://github.com/ros2/ros2/issues/677
if(NOT rmw_implementation STREQUAL "rmw_opensplice_cpp")
custom_test_c(test_graph
"test/rcl_action/test_graph.cpp")
endif()
endmacro()

call_for_each_rmw_implementation(targets)
Expand Down
162 changes: 162 additions & 0 deletions rcl_action/include/rcl_action/graph.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
// Copyright 2019 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef RCL_ACTION__GRAPH_H_
#define RCL_ACTION__GRAPH_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "rcl/graph.h"
#include "rcl/node.h"

#include "rcl_action/visibility_control.h"

/// Get a list of action names and types for action clients associated with a node.
/**
* The `node` parameter must point to a valid node.
*
* The `action_names_and_types` parameter must be allocated and zero initialized.
* This function allocates memory for the returned list of names and types and so it is the
* callers responsibility to pass `action_names_and_types` to rcl_names_and_types_fini()
* when it is no longer needed.
* Failing to do so will result in leaked memory.
*
* The returned names are not automatically remapped by this function.
* Attempting to create action clients or action servers with names returned by this function may
* not result in the desired action name depending on the remap rules in use.
*
* <hr>
* Attribute | Adherence
* ------------------ | -------------
* Allocates Memory | Yes
* Thread-Safe | No
* Uses Atomics | No
* Lock-Free | Maybe [1]
* <i>[1] implementation may need to protect the data structure with a lock</i>
*
* \param[in] node the handle to the node being used to query the ROS graph
* \param[in] allocator allocator for allocating space for strings
* \param[in] node_name the node name of the actions to return
* \param[in] node_namespace the node namespace of the actions to return
* \param[out] action_names_and_types list of action names and their types
* \return `RCL_RET_OK` if the query was successful, or
* \return `RCL_RET_NODE_INVALID` if the node is invalid, or
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RCL_RET_ERROR` if an unspecified error occurs.
*/
RCL_ACTION_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_action_get_client_names_and_types_by_node(
const rcl_node_t * node,
rcl_allocator_t * allocator,
const char * node_name,
const char * node_namespace,
rcl_names_and_types_t * action_names_and_types);

/// Get a list of action names and types for action servers associated with a node.
/**
* This function returns a list of action names and types for action servers associated with
* the provided node name.
*
* The `node` parameter must point to a valid node.
*
* The `action_names_and_types` parameter must be allocated and zero initialized.
* This function allocates memory for the returned list of names and types and so it is the
* callers responsibility to pass `action_names_and_types` to rcl_names_and_types_fini()
* when it is no longer needed.
* Failing to do so will result in leaked memory.
*
* The returned names are not automatically remapped by this function.
* Attempting to create action clients or action servers with names returned by this function may
* not result in the desired action name depending on the remap rules in use.
*
* <hr>
* Attribute | Adherence
* ------------------ | -------------
* Allocates Memory | Yes
* Thread-Safe | No
* Uses Atomics | No
* Lock-Free | Maybe [1]
* <i>[1] implementation may need to protect the data structure with a lock</i>
*
* \param[in] node the handle to the node being used to query the ROS graph
* \param[in] allocator allocator for allocating space for strings
* \param[in] node_name the node name of the actions to return
* \param[in] node_namespace the node namespace of the actions to return
* \param[out] action_names_and_types list of action names and their types
* \return `RCL_RET_OK` if the query was successful, or
* \return `RCL_RET_NODE_INVALID` if the node is invalid, or
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RCL_RET_ERROR` if an unspecified error occurs.
*/
RCL_ACTION_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_action_get_server_names_and_types_by_node(
const rcl_node_t * node,
rcl_allocator_t * allocator,
const char * node_name,
const char * node_namespace,
rcl_names_and_types_t * action_names_and_types);

/// Return a list of action names and their types.
/**
* This function returns a list of action names and types in the ROS graph.
*
* The `node` parameter must point to a valid node.
*
* The `action_names_and_types` parameter must be allocated and zero initialized.
* This function allocates memory for the returned list of names and types and so it is the
* callers responsibility to pass `action_names_and_types` to rcl_names_and_types_fini()
* when it is no longer needed.
* Failing to do so will result in leaked memory.
*
* The returned names are not automatically remapped by this function.
* Attempting to create action clients or action servers with names returned by this function may
* not result in the desired action name depending on the remap rules in use.
*
* <hr>
* Attribute | Adherence
* ------------------ | -------------
* Allocates Memory | Yes
* Thread-Safe | No
* Uses Atomics | No
* Lock-Free | Maybe [1]
* <i>[1] implementation may need to protect the data structure with a lock</i>
*
* \param[in] node the handle to the node being used to query the ROS graph
* \param[in] allocator allocator for allocating space for strings
* \param[out] action_names_and_types list of action names and types
* \return `RCL_RET_OK` if the query was successful, or
* \return `RCL_RET_NODE_INVALID` if the node is invalid, or
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RCL_RET_ERROR` if an unspecified error occurs.
*/
RCL_ACTION_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_action_get_names_and_types(
const rcl_node_t * node,
rcl_allocator_t * allocator,
rcl_names_and_types_t * action_names_and_types);

#ifdef __cplusplus
}
#endif

#endif // RCL_ACTION__GRAPH_H_
1 change: 1 addition & 0 deletions rcl_action/include/rcl_action/rcl_action.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ extern "C"
#include "rcl_action/default_qos.h"
#include "rcl_action/goal_handle.h"
#include "rcl_action/goal_state_machine.h"
#include "rcl_action/graph.h"
#include "rcl_action/types.h"
#include "rcl_action/wait.h"

Expand Down
2 changes: 1 addition & 1 deletion rcl_action/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>rcl_action</name>
<version>0.6.4</version>
<version>0.7.0</version>
<description>Package containing a C-based ROS action implementation</description>
<maintainer email="jacob@openrobotics.org">Jacob Perron</maintainer>
<license>Apache License 2.0</license>
Expand Down
Loading

0 comments on commit 1192db9

Please sign in to comment.