No description
Find a file
2023-11-16 16:19:25 +09:00
.github/workflows drop 2.0.0 support (#21) 2023-10-27 07:39:30 +00:00
benchmarks fix benchmark 2023-08-09 14:53:39 +09:00
binding_generator tweak rcl wrapper generator (#10) 2023-10-21 04:46:20 +00:00
dochack fix doc generation 2023-07-22 09:17:35 +09:00
src Better converters (#23) 2023-11-16 15:53:09 +09:00
tests more consistent converters (#22) 2023-11-16 06:37:57 +00:00
.gitignore add .vscode to .gitignore 2023-07-16 14:44:07 +09:00
.gitmodules update 2023-05-25 10:16:25 +09:00
config.nims fix doc generation 2023-07-22 09:17:35 +09:00
LICENSE Initial commit 2023-05-24 18:52:41 +09:00
rclnim.nimble 0.6.0 2023-11-16 16:19:25 +09:00
README.md use nim 2.0 2023-08-09 13:55:53 +09:00
valgrind.supp update 2023-05-25 10:16:25 +09:00

rclnim

ROS2 client library for Nim language.

Note

(Alpha Stage Software) This software is under development and the API is subject to change.

Example

import rclnim
import rclnim/chronossupport
import chronos
importInterface std_msgs/msg/int64

rclnim.init()

let node = newNode("test_node")
var qos = SystemDefaultQoS.withPolicies(depth=100, reliability=Reliable)
let pub = node.createPublisher(Int64, "test_topic", qos)
let sub = node.createSubscription(Int64, "test_topic", qos)

proc pubMain() {.async.} =
  for i in 0..<100:
    let msg = Int64(data: i)
    pub.publish(msg)
    echo "published: ", msg
    await sleepAsync 10

proc subMain() {.async.} =
  for i in 0..<100:
    let msg = await sub.recv()
    echo "received: ", msg

proc main() {.async.} =
  await all [pubMain(), subMain()]

try:
  waitFor main()
except ShutdownError:
  echo "Shutting down"

Dependencies

  • Nim >= 2.0
  • ROS2 Humble
  • Linux (Tested on Ubuntu 22.04)

Documentation

Features

  • Topic
    • Publisher
    • Subscription
  • Service
    • Service
    • Client
  • Executors
    • Async executor
  • Signal handling
    • Linux
  • Typesupport
    • rosidl_typesupport_c wrapper (slow because it converts Nim objects to C structures)
  • ROS Distributions
    • Humble

TODO

  • Support Action
  • Implement Parameter client
  • Implement Callback-based executor
  • Generate FastDDS typesupport for nim objects with macros
  • Support component
  • Support allocator
  • Implement zero-copy intra-process communications
  • Support ROS2 Iron
  • Support colcon

License

This project is licensed under the MIT License - see the LICENSE file for details