Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
how to run service client sample
  • Loading branch information
bobd988 authored Mar 25, 2024
1 parent 147bcc4 commit c36d12a
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion examples/c++-ros2-dataflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ This examples requires a sourced ROS2 installation.
- Install the turtlesim package
- Start the turtlesim node through `ros2 run turtlesim turtlesim_node`

## Running turtlesim example
## Running pub/sub example

A ROS2 client to pubish turtlesim ROS2 messages and a DORA node can subscribe and visualize it.

From terminal 1 , sourcing the ROS2 installation and start ROS2 turtlesim window
```
Expand All @@ -27,3 +28,28 @@ source /opt/ros/galactic/setup.bash
cargo run --example cxx-ros2-dataflow --features ros2-examples
```
And you will see the turtle move a few steps.

## Running service example
The current service code example is a service client. To test with service server we can test with either ROS2 demo or ros2-client
- if using ROS2 demo the the command line is:
```
ros2 run demo_nodes_cpp add_two_ints_server
```

start DORA service client from another terminal
```
cargo run --example cxx-ros2-dataflow --features ros2-examples
```

- if using ros2-client the command line is:
```
cargo run --example=ros2_service_server
```

then start DORA service client from another terminal
```
cargo run --example cxx-ros2-dataflow --features ros2-examples
```



0 comments on commit c36d12a

Please sign in to comment.