Skip to content

Commit

Permalink
reconcile rclpy action with rcl changes
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
  • Loading branch information
ihasdapie authored and clalancette committed Feb 2, 2023
1 parent ae929da commit cba173e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions rclpy/rclpy/action/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def __init__(
with node.handle:
self._client_handle = _rclpy.ActionClient(
node.handle,
node.get_clock().handle,
action_type,
action_name,
goal_service_qos_profile.get_c_qos_profile(),
Expand Down
5 changes: 4 additions & 1 deletion rclpy/src/rclpy/action_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <string>

#include "action_client.hpp"
#include "clock.hpp"
#include "exceptions.hpp"
#include "node.hpp"
#include "utils.hpp"
Expand All @@ -41,6 +42,7 @@ ActionClient::destroy()

ActionClient::ActionClient(
Node & node,
const rclpy::Clock & rclpy_clock,
py::object pyaction_type,
const char * action_name,
const rmw_qos_profile_t & goal_service_qos,
Expand Down Expand Up @@ -86,6 +88,7 @@ ActionClient::ActionClient(
rcl_ret_t ret = rcl_action_client_init(
rcl_action_client_.get(),
node_.rcl_ptr(),
rclpy_clock.rcl_ptr(),
ts,
action_name,
&action_client_ops);
Expand Down Expand Up @@ -274,7 +277,7 @@ define_action_client(py::object module)
{
py::class_<ActionClient, Destroyable, std::shared_ptr<ActionClient>>(module, "ActionClient")
.def(
py::init<Node &, py::object, const char *, const rmw_qos_profile_t &,
py::init<Node &, const rclpy::Clock &, py::object, const char *, const rmw_qos_profile_t &,
const rmw_qos_profile_t &, const rmw_qos_profile_t &,
const rmw_qos_profile_t &, const rmw_qos_profile_t &>())
.def_property_readonly(
Expand Down
1 change: 1 addition & 0 deletions rclpy/src/rclpy/action_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class ActionClient : public Destroyable, public std::enable_shared_from_this<Act
*/
ActionClient(
Node & node,
const rclpy::Clock & rclpy_clock,
py::object pyaction_type,
const char * action_name,
const rmw_qos_profile_t & goal_service_qos,
Expand Down

0 comments on commit cba173e

Please sign in to comment.