Skip to content
Snippets Groups Projects
Commit f58d0549 authored by Johannes Mey's avatar Johannes Mey
Browse files

add README

parent 281f7493
No related branches found
No related tags found
No related merge requests found
# Simple ROS-NNG-Test
This project tests the combination of [NNG](https://nng.nanomsg.org/) and ROS.
NNG supports several communication patterns. Currently, *pub-sub* is supported; others may follow.
## Publish-Subscribe
This demonstrator contains two nodes, a publisher and a subscriber.
The publisher listens to ROS messages.
Each received message is transmitted to the subscriber using NNG.
For each received message, the subscriber publishes another ROS message.
Currently, the transmission works using TCP with the fixed NNG URL `"tcp://localhost:6576"`.
### Running the Example
- Checkout the project using git.
Since the CMake build uses git submodules, do not remove the git information!
It is not required to checkout the submodule manually, this is done using CMake.
- Build the project.
- Start ROS
```
$ roscore
```
- Start the `publisher` and `subscriber` nodes in two terminals.
Both are in the `nng_test` namespace.
```
$ rosrun nng_test publisher
```
```
$ rosrun nng_test subscriber
```
- Listen to received messages for the topic `/nnc_test/received_nng_subscription`.
```
$ rostopic echo /nnc_test/received_nng_subscription
```
- Trigger a transmission by publishing a string message to `/nnc_test/publish_to_nng`.
```
$ rostopic pub -1 /nnc_test/publish_to_nng std_msgs/String "Some Message"
```
The `rostopic echo` command will show the received message.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment