-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add passthrough_nodelet documentation
- Loading branch information
1 parent
ef39480
commit 7392d55
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Passthrough | ||
|
||
`jsk_topic_tools/Passthrough` is a node/nodelet to relay topics only for specified duration. You can use the service call to turn relay on and off. By default, the topic relay is turned off. | ||
|
||
## Subscribing Topics | ||
|
||
* `~input` (`AnyMsg`) | ||
|
||
Incoming topic to be relayed | ||
|
||
## Publishing Topics | ||
|
||
* `~output` (`AnyMsg`, same type as `~input`) | ||
|
||
Outgoing topic to publish on | ||
|
||
## Services | ||
|
||
* `~request` (`std_srvs/Empty`) | ||
|
||
Start topic relay | ||
|
||
* `~stop` (`std_srvs/Empty`) | ||
|
||
Stop topic relay | ||
|
||
* `~request_duration` (`jsk_topic_tools/PassthroughDuration`) | ||
|
||
Perform topic relay for a specified duration | ||
|
||
## Parameters | ||
|
||
* `~default_duration` (`double`, default: `10.0`) | ||
|
||
Duration [s] to relay the topic. | ||
|
||
## Usage | ||
``` | ||
# Terminal 1 | ||
$ roslaunch jsk_topic_tools passthrough_sample.launch | ||
# Terminal 2 | ||
$ rostopic pub /passthrough_sample/input std_msgs/String "data: 'hello'" -r10 | ||
# Terminal 3 | ||
$ rostopic echo /passthrough_sample/input | ||
# Terminal 4 | ||
$ rostopic echo /passthrough_sample/output | ||
# Terminal 5 | ||
$ rosservice call /passthrough_sample/request | ||
$ rosservice call /passthrough_sample/stop | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<launch> | ||
<arg name="input" default="input" /> | ||
<arg name="output" default="output" /> | ||
<arg name="default_duration" default="10" /> | ||
|
||
<node pkg="jsk_topic_tools" name="passthrough_sample" type="passthrough"> | ||
<remap from="~input" to="$(arg input)" /> | ||
<remap from="~output" to="$(arg output)" /> | ||
<rosparam subst_value="true"> | ||
default_duration: $(arg default_duration) | ||
</rosparam> | ||
</node> | ||
|
||
</launch> |