bob_llama_cpp.terminal

Classes

RosNode

Basic ROS Node

StdinThread

QThread class to handle stdin reading.

Window

Main Window with terminal.

Functions

sigint_handler(*args)

main()

Module Contents

class bob_llama_cpp.terminal.RosNode

Bases: rclpy.node.Node

Basic ROS Node

pub
sub1 = None
sub2 = None
title
opacity
frameless
fontname
fontsize
geometry
display
stylesheet
stylesheet_window
margin
input
line_count
publish(s)

Publish message on topic.

create_input_subscriptions(callback, callback_cr)
class bob_llama_cpp.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_llama_cpp.terminal.Window(node: RosNode)

Bases: QWidget

Main Window with terminal.

node
worker
oldPosition
tarea
text = ''
tedit
timer
spin_once()

Spin periodically once the ROS node.

start_read_stdin()

Start the worker to read the incomming GPT generator output.

update_text(s: str)

Append given text in the PlainText area.

input_callback(msg: std_msgs.msg.String)

Receive input text via ROS topic and update text.

input_callback_cr(msg: std_msgs.msg.String)

Receive input text via ROS topic and update text with CR

input_changed(text)

Input edit change text callback.

input_enter()

Input edit enter callback.

closeEvent(event)

Window close callback. This stops also the stdin worker thread.

mousePressEvent(event)

Mouse press callback. Handles also window moving without caption.

mouseMoveEvent(event)

Mouse move callback. Handles also window moving without caption.

bob_llama_cpp.terminal.sigint_handler(*args)
bob_llama_cpp.terminal.main()