- Notifications
You must be signed in to change notification settings - Fork0
sequenceplanner/r2r_regular_markers
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Ther2r_regular_markers
is a Rust module that manages and publishes markers using ROS2. It allows you to add, modify, and delete markers, which are periodically published asMarkerArray
messages on a specified ROS topic.
- Add Markers: Insert new markers or update existing ones by name.
- Delete Markers: Remove markers by their unique names.
- Apply Changes: Commit pending updates to be published.
- Periodic Publishing: Automatically publishes markers at regular intervals.
- Thread-Safe: Utilizes
Arc
andMutex
for safe concurrent access.
- Marker Management: Maintains a list of active markers and pending updates.
- Pending Updates: Changes are first added to a pending updates list.
- Apply Changes: Calling
apply_changes
commits pending updates to the active marker list. - Periodic Publishing: A background task publishes the active markers at regular intervals (every 20 milliseconds by default).
- Rust programming language
- ROS2 environment
r2r
crate for ROS2 communicationtokio
for asynchronous operations
Add the following to yourCargo.toml
:
[dependencies]r2r ="0.9.0"r2r_regular_markers = {git ="https://github.com/sequenceplanner/r2r_regular_markers",tag ="v0.0.2" }tokio = {version ="1.36.0",features = ["full"] }
let context =Context::create()?;let node = r2r::Node::create(context,"my_marker","")?;let arc_node =Arc::new(Mutex::new(node));let server =RegularMarkerServer::new("my_ns","my_topic", arc_node);
letmut marker =Marker::default();// Configure your marker properties heremarker_server.insert("unique_marker_name", marker);
marker_server.delete("unique_marker_name");
marker_server.apply_changes();
Contributions are welcome! Please open an issue or submit a pull request for any improvements.
This project is open-source and available under theTODO: License.
About
A server for maintaining and publishing regular markers for use with r2r
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.