Support multiple destinations with actions in nexus_transporter#69
Merged
Support multiple destinations with actions in nexus_transporter#69
Conversation
Signed-off-by: Yadunund <yadunund@gmail.com>
Signed-off-by: Yadunund <yadunund@gmail.com>
Signed-off-by: Yadunund <yadunund@gmail.com>
Signed-off-by: Yadunund <yadunund@gmail.com>
Signed-off-by: Yadunund <yadunund@gmail.com>
aaronchongth
requested changes
Feb 4, 2025
Collaborator
aaronchongth
left a comment
There was a problem hiding this comment.
This looks good! Left some small comments, let me know what you think
|
|
||
| //============================================================================== | ||
| namespace nexus_transporter { | ||
| #include <stdexcept> |
Collaborator
There was a problem hiding this comment.
Looks like this might be left in accidentally
| int32 action | ||
|
|
||
| # Additional parameters. | ||
| string params No newline at end of file |
| int32 ACTION_DROPOFF=3 | ||
|
|
||
| # The type of action to perform at the destination. | ||
| int32 action |
Collaborator
There was a problem hiding this comment.
we probably won't need so many action types in the future, we can use an uint8 for this field
|
|
||
| rclcpp::TimerBase::SharedPtr register_timer; | ||
|
|
||
|
|
|
|
||
| RCLCPP_INFO(node->get_logger(), "Registering with system orchestrator..."); | ||
| auto register_cb = | ||
| [this, node](rclcpp::Client<RegisterTransporter>::SharedFuture future) |
Collaborator
There was a problem hiding this comment.
we should capture w_node instead, and lock it inside register_cb since this is an async request and node is expected to be released as _register returns before we get a response
Signed-off-by: Yadunund <yadunund@gmail.com>
Signed-off-by: Yadunund <yadunund@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
nexus_transporter_msgsto include aDestinationmsg with fields to specify the type of action to perform at the destination.ItineraryandTransporterclasses to support multipleDestinations.SingleThreadedExecutor(default). This was previously set toMultiThreadedExecutorto deal with making a registration client request within a timer callback which leads to a deadlock. This is resolved in the same way the Workcell Orchestrator handles it, ie, relying on async client requests.mock_transporterplugin implementation fromnexus_integration_teststo `nexus_transporter.As a follow up, I will update rmf_request interfaces introduced in #42 with the Destination definition here and explore a native RMF plugin implementation.