bob_topic_tools.terminal

Classes

RosNode

String topic IO terminal ROS Node with syntax highlighting.

StdinThread

QThread class to handle stdin reading.

Window

Main Window with terminal.

Functions

sigint_handler(*args)

Handle SIGINT signal.

main()

Run the main ROS 2 node.

Module Contents

class bob_topic_tools.terminal.RosNode

Bases: rclpy.node.Node

String topic IO terminal ROS Node with syntax highlighting.

title
lexer_name
image_view_enabled
opacity
frameless
fontname
fontsize
geometry
display
margin
input_enabled
stylesheet
stylesheet_window
line_count
color_paper
color_text
pub
sub1 = None
sub2 = None
sub_image = None
on_parameter_change(params)

Handle parameter changes at runtime.

publish(s)

Publish String message on topic.

create_input_subscriptions(callback, callback_cr, callback_image)

Create topic subscriptions.

class bob_topic_tools.terminal.StdinThread

Bases: PyQt5.QtCore.QThread

QThread class to handle stdin reading.

result
running = True
run()

Read stdin loop function.

stop()

Mark thread to stop the loop.

class bob_topic_tools.terminal.Window(node: RosNode)

Bases: PyQt5.QtWidgets.QMainWindow

Main Window with terminal.

node
worker
oldPosition
tarea
text = ''
tedit
splitter
timer
create_image_widget()

Create image widget with slider.

spin_once()

Spin periodically once the ROS node.

start_read_stdin()

Start the worker to read the incoming stdin stream.

set_lexer_styles()

Set all styles background.

update_settings(prefix='lexer.markdown', read=False, write=True)

Update settings with given options.

set_tarea_colors()

Set area colors.

update_text(s: str)

Append given text in the PlainText area.

update_image()

Update image view from original cv image.

resize_image(value)

Resize image based on slider value.

input_callback(msg: std_msgs.msg.String)

Receive input text via ROS topic.

input_callback_cr(msg: std_msgs.msg.String)

Receive input text via ROS topic with CR.

input_callback_image(msg: sensor_msgs.msg.Image)

Receive input image via ROS topic.

input_changed(text)

Input edit change text callback.

input_enter()

Input edit enter callback.

closeEvent(event)

Stop stdin worker thread on close.

mousePressEvent(event)

Handle window moving without caption.

mouseMoveEvent(event)

Handle window moving without caption.

bob_topic_tools.terminal.sigint_handler(*args)

Handle SIGINT signal.

bob_topic_tools.terminal.main()

Run the main ROS 2 node.