Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A server for maintaining and publishing regular markers for use with r2r

NotificationsYou must be signed in to change notification settings

sequenceplanner/r2r_regular_markers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Features

  • 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: UtilizesArc andMutex for safe concurrent access.

How It Works

  • Marker Management: Maintains a list of active markers and pending updates.
  • Pending Updates: Changes are first added to a pending updates list.
  • Apply Changes: Callingapply_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).

Getting Started

Prerequisites

  • Rust programming language
  • ROS2 environment
  • r2r crate for ROS2 communication
  • tokio for asynchronous operations

Installation

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"] }

Usage

Creating a RegularMarkerServer

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);

Adding a Marker

letmut marker =Marker::default();// Configure your marker properties heremarker_server.insert("unique_marker_name", marker);

Deleting a Marker

marker_server.delete("unique_marker_name");

Applying Changes

marker_server.apply_changes();

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements.

License

This project is open-source and available under theTODO: License.

About

A server for maintaining and publishing regular markers for use with r2r

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp