Skip to content

[WIP] Action support #410

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

Draft
wants to merge 52 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
05464a8
Added skeleton examples for action client and server
esteve Nov 28, 2022
8137733
Added action template
esteve Nov 28, 2022
fb90bec
Added basic create_action_client function
esteve Nov 28, 2022
b03c7a1
Fix linter
esteve Nov 29, 2022
b1957d4
Split action client and server examples
esteve Jul 17, 2023
28ece7a
checkin
esteve Jul 17, 2023
4d27f28
checkin
esteve Jul 17, 2023
e84ae6a
checkin
esteve Aug 10, 2023
eb4026b
fix visibility
esteve Aug 10, 2023
b308bac
Instantiate a new ActionClient
esteve Nov 8, 2023
e5dd17d
checkin
esteve Jul 17, 2023
6d41636
checkin
esteve Jul 17, 2023
8abbe13
checkin
esteve Nov 17, 2023
5cb9610
checkin
esteve Nov 17, 2023
9d06c46
Fix rclrs to compile after rebase
nwn Jun 6, 2024
d3222f8
Sketch out action server construction and destruction
nwn Jun 6, 2024
e7476f9
Sketch out action client as well
nwn Jun 6, 2024
788dc52
Pass rcl_clock_t from Node to ActionServer
nwn Jun 6, 2024
2e0a1b8
Split action servers and clients into separate modules
nwn Jun 6, 2024
e4f572c
Move ServerGoalHandle to separate module
nwn Jun 6, 2024
d7ece4b
Begin implementing ActionServerGoalHandle functions
nwn Jun 6, 2024
33a90d5
Make GoalUuid into a newtype
nwn Jun 8, 2024
47cda20
Document the ServerGoalHandle struct
nwn Jun 8, 2024
83d2470
Add documentation and clean up
nwn Jun 8, 2024
ae62fb1
Take goal, cancel, and accepted callbacks in ActionServer
nwn Jun 11, 2024
f197f24
Store action clients and servers in the Node
nwn Jul 6, 2024
98eef19
Add action client/server entities to wait set
nwn Jul 7, 2024
f6d11a7
Handle action server/client readiness in WaitSet and executor
nwn Jul 7, 2024
f48a590
Add rcl_action error codes
nwn Jul 13, 2024
fb8e703
[WIP] Start defining server/client execute functions
nwn Jul 13, 2024
3083cc4
Use rcl-allocated goal handle pointer in ServerGoalHandle
nwn Jul 20, 2024
908859f
Split execute_goal_request() out into three functions
nwn Jul 20, 2024
2b5a6b5
Partial implementation of ActionServer::publish_status()
nwn Jul 25, 2024
2c8cd97
Add DropGuard convenience wrapper
nwn Aug 7, 2024
5cce85f
Complete implementation of ActionServer::publish_status()
nwn Aug 7, 2024
555b267
Move goal acceptance logic back into execute_goal_request()
nwn Aug 7, 2024
6da2e69
Integrate RMW message methods into ActionImpl
nwn Aug 7, 2024
31e38ce
Add UUID->GoalHandle hash-map to action server
nwn Aug 7, 2024
8d820f9
Add rosidl_runtime_rs::ActionImpl::create_feedback_message()
nwn Aug 9, 2024
b238d67
Add ActionServer::publish_feedback() method
nwn Aug 9, 2024
de5b094
Implement goal expiration in action server
nwn Aug 9, 2024
2fd278f
Implement goal cancel requests
nwn Aug 10, 2024
cbf4ff6
Implement action result requests in the action server
nwn Aug 16, 2024
24cc611
Fix formatting in example
nwn Aug 23, 2024
04b8c58
Hook up ServerGoalHandle callbacks into the ActionServer
nwn Aug 23, 2024
1d6cc38
Switch to create_result_response() in rclrs
nwn Aug 23, 2024
94b517c
Hook up goal termination methods for goal handles
nwn Aug 23, 2024
53ebbbe
Implement client-side trait methods for action messages
nwn Sep 28, 2024
3e8d325
Fix compilation after rebase
nwn Jun 7, 2025
fb06971
Fix linker error
nwn Jun 7, 2025
dbdebd1
Switch to shared state for action client/server
nwn Jun 7, 2025
8973176
Use option struct for create_action_{client,server} arguments
nwn Jun 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
611 changes: 611 additions & 0 deletions examples/minimal_action_client/Cargo.lock

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions examples/minimal_action_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "examples_rclrs_minimal_action_client"
version = "0.4.1"
# This project is not military-sponsored, Jacob's employment contract just requires him to use this email address
authors = ["Esteve Fernandez <esteve@apache.org>", "Nikolai Morin <nnmmgit@gmail.com>", "Jacob Hassold <jacob.a.hassold.civ@army.mil>"]
edition = "2021"

[[bin]]
name = "minimal_action_client"
path = "src/minimal_action_client.rs"

[dependencies]
anyhow = {version = "1", features = ["backtrace"]}
example_interfaces = "*"
rclrs = "0.4"
rosidl_runtime_rs = "0.4"

# This specific version is compatible with Rust 1.75
backtrace = "=0.3.74"
26 changes: 26 additions & 0 deletions examples/minimal_action_client/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<?xml-model
href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>examples_rclrs_minimal_action_client</name>
<version>0.4.1</version>
<description>Minimal action client examples for rclrs.</description>
<maintainer email="esteve@apache.org">Esteve Fernandez</maintainer>
<maintainer email="nnmmgit@gmail.com">Nikolai Morin</maintainer>
<!-- This project is not military-sponsored, Jacob's employment contract just requires him to use this email address -->
<maintainer email="jacob.a.hassold.civ@army.mil">Jacob Hassold</maintainer>
<license>Apache License 2.0</license>

<build_depend>rclrs</build_depend>
<build_depend>rosidl_runtime_rs</build_depend>
<build_depend>example_interfaces</build_depend>

<exec_depend>rclrs</exec_depend>
<exec_depend>rosidl_runtime_rs</exec_depend>
<exec_depend>example_interfaces</exec_depend>

<export>
<build_type>ament_cargo</build_type>
</export>
</package>
16 changes: 16 additions & 0 deletions examples/minimal_action_client/src/minimal_action_client.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use anyhow::{Error, Result};
use rclrs::*;

fn main() -> Result<(), Error> {
let mut executor = Context::default_from_env()?.create_basic_executor();

let node = executor.create_node("minimal_action_client")?;

let _client =
node.create_action_client::<example_interfaces::action::Fibonacci>("fibonacci")?;

executor
.spin(SpinOptions::default())
.first_error()
.map_err(|err| err.into())
}
Loading
Loading