ROS Package bob_topic_tools
This ROS Package is part of Bob’s NLP and LLM tools.
The contained ROS Nodes are a collection of std_msgs/String topic tools. It extends the already existing ROS package topic_tools but more dedicated to NLP tasks.
ROS Node Filter
String topic filter ROS node. It supports also dynamic parameter reconfigure during runtime.
Parameters
Name |
Type |
Description |
|---|---|---|
|
string array |
String array with white list rules. Can also be set via environment variable |
|
string array |
String array with blacklist rules. Can also be set via environment variable |
|
string |
White list file. This overrides parameter |
|
string |
Black list file. This overrides parameter |
|
string array |
Substitutions using regex. Expects pairs: |
|
boolean |
If |
|
string |
Characters to trim if |
|
boolean |
If |
Topics
Name |
Type |
Description |
|---|---|---|
|
|
Read input data from topic. |
|
|
Publish filtered output. |
|
|
Publish rejected output. |
ROS Node Stream Filter
String Stream topic filter node. Can redirect text portion enclosured in start/end tags.
Parameters
Name |
Type |
Description |
|---|---|---|
|
integer |
Input buffer size, default: 65535. Can also be set via environment variable |
|
string |
End tag of the area to filter out, default |
|
string |
Start tag of the area to sort out, default |
|
integer |
Rolling window size to detect the tags. This should be > then max tag length, default: 32. Can also be set via environment variable |
Topics
Name |
Type |
Description |
|---|---|---|
|
|
Read input string stream from topic. |
|
|
Publish data outside of the enclosing tags. |
|
|
Publish data within the enclosing tags. |
ROS Node Aggregator
String Stream aggregator node.
Parameters
Name |
Type |
Description |
|---|---|---|
|
string array |
List of delimiter strings where to stop aggregating. Supports multi-character delimiters like |
|
integer |
Auto-flush timer in milliseconds. Default 1500ms. |
Topics
Name |
Type |
Description |
|---|---|---|
|
|
Read input string stream from topic. |
|
|
Publish aggregated output. |
ROS Node Drain
String topic forwarding node with drain behavior. Controls the flow of messages to the output topic at a specified frequency.
Parameters
Name |
Type |
Description |
|---|---|---|
|
double |
Frequency in seconds to forward incoming messages to output topic. Default |
Topics
Name |
Type |
Description |
|---|---|---|
|
|
Input stream topic. |
|
|
Buffered output stream topic. |
ROS Node Terminal
Basic String topic IO terminal ROS Node with syntax highlighting.
Dependencies
The required QT5 libraries should already exist if ROS is installed. If missing use below installation to get them.
sudo apt install python3-pyqt5
sudo apt install python3-pyqt5.qsci
Usage
# run frameless terminal window using ROS parameter
ros2 run bob_topic_tools terminal --ros-args -p frameless:=true -p geometry:=[300,300,600,480]
# show window on another display
# display what will be received from socket
netcat -U /tmp/some.sock | ros2 run bob_topic_tools terminal --ros-args -p display:=1 -p geometry:=[300,300,600,480]
Parameters
Name |
Type |
Description |
|---|---|---|
|
integer |
Display where to show window. Can also be set via environment variable |
|
string |
Window fontname. Can also be set via environment variable |
|
integer |
Window fontsize. Can also be set via environment variable |
|
boolean |
Switch off window caption. Can also be set via environment variable |
|
integer array |
Window geometry. |
|
boolean |
Enables or disables the text input field. Can also be set via environment variable |
|
integer |
Maximum line count in the text area. 0 = unlimited. If exceeded, lines are removed from the top. Can also be set via environment variable |
|
integer array |
Window inner margin. |
|
double |
Window opacity. Can also be set via environment variable |
|
string |
Stylesheet qss of PlainText area. Can also be set via environment variable |
|
string |
Stylesheet qss of Window area. Can also be set via environment variable |
|
string |
Title of window. Can also be set via environment variable |
|
string |
The lexer to be used: |
|
boolean |
Start with image view option. Default: |
|
string |
Background color (named or HEX). Default: |
|
string |
Text color (named or HEX). Default: |
Topics
Name |
Type |
Description |
|---|---|---|
|
|
Read input data from topic. |
|
|
Read input data and append newline. |
|
|
Publish text entered in terminal. |
|
|
Optional image subscription. |