Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mauro/ipc cli serv qos getters #9

Closed
wants to merge 3 commits into from

Conversation

mauropasse
Copy link
Owner

No description provided.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@@ -581,7 +640,7 @@ class Client : public ClientBase
PromiseWithRequest promise;
auto shared_future = promise.get_future().share();
auto req_id = async_send_request_impl(
*request,
request,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::move missing here?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request is also used in line 646, if I move it, would be invalid

}
bool intra_process_server_available = ipm->service_is_available(intra_process_client_id_);

if (intra_process_server_available) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why if the server is not available we fall back to DDS comm?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the server might be available in another process, or created with IPC OFF.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.
We should add a comment about it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3e4d9c6

int64_t sequence_number;
rcl_ret_t ret = rcl_send_request(get_client_handle().get(), &request, &sequence_number);
rcl_ret_t ret = rcl_send_request(get_client_handle().get(), &(*request), &sequence_number);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can &(*request) become request.get() ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done in 3e4d9c6

private:
using ClientIntraProcessT = rclcpp::experimental::ClientIntraProcess<ServiceT>;
std::shared_ptr<ClientIntraProcessT> client_intra_process_;
std::atomic_uint sequence_number_{1};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be named "ipc_sequence_number_" ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3e4d9c6

@@ -35,7 +35,8 @@ create_client(
std::shared_ptr<node_interfaces::NodeServicesInterface> node_services,
const std::string & service_name,
const rmw_qos_profile_t & qos_profile,
rclcpp::CallbackGroup::SharedPtr group)
rclcpp::CallbackGroup::SharedPtr group,
rclcpp::IntraProcessSetting ip_setting)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use ipc_setting for the variable name... ip_setting seems the network IP

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3e4d9c6

@mauropasse mauropasse force-pushed the mauro/ipc-cli-serv-qos-getters branch from 95c12b2 to fcb615b Compare December 16, 2021 21:16
Signed-off-by: Mauro Passerino <mpasserino@irobot.com>
@mauropasse mauropasse force-pushed the mauro/ipc-cli-serv-qos-getters branch from fcb615b to 968e071 Compare December 16, 2021 21:17
Signed-off-by: Mauro Passerino <mpasserino@irobot.com>
@mauropasse mauropasse force-pushed the mauro/ipc-cli-serv-qos-getters branch from 968e071 to 89fbc94 Compare December 16, 2021 21:21
@mauropasse mauropasse closed this Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants