python
jsk_rviz_plugins
overlay_text_interface.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
from
jsk_rviz_plugins.cfg
import
OverlayTextInterfaceConfig
4
from
jsk_rviz_plugins.msg
import
OverlayText
5
from
dynamic_reconfigure.server
import
Server
6
import
rospy
7
8
class
OverlayTextInterface
():
9
def
__init__
(self, topic):
10
self.
srv
= Server(OverlayTextInterfaceConfig, self.
callback
)
11
self.
pub
= rospy.Publisher(topic, OverlayText)
12
def
callback
(self, config, level):
13
self.
config
= config
14
return
config
15
def
publish
(self, text):
16
msg = OverlayText()
17
msg.text = text
18
msg.width = self.
config
.width
19
msg.height = self.
config
.height
20
msg.top = self.
config
.top
21
msg.left = self.
config
.left
22
msg.fg_color.a = self.
config
.fg_alpha
23
msg.fg_color.r = self.
config
.fg_red
24
msg.fg_color.g = self.
config
.fg_green
25
msg.fg_color.b = self.
config
.fg_blue
26
msg.bg_color.a = self.
config
.bg_alpha
27
msg.bg_color.r = self.
config
.bg_red
28
msg.bg_color.g = self.
config
.bg_green
29
msg.bg_color.b = self.
config
.bg_blue
30
msg.text_size = self.
config
.text_size
31
self.
pub
.
publish
(msg)
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface.publish
def publish(self, text)
Definition:
overlay_text_interface.py:15
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface.config
config
Definition:
overlay_text_interface.py:13
msg
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface.__init__
def __init__(self, topic)
Definition:
overlay_text_interface.py:9
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface.pub
pub
Definition:
overlay_text_interface.py:11
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface.callback
def callback(self, config, level)
Definition:
overlay_text_interface.py:12
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface.srv
srv
Definition:
overlay_text_interface.py:10
jsk_rviz_plugins.overlay_text_interface.OverlayTextInterface
Definition:
overlay_text_interface.py:8
jsk_rviz_plugins
Author(s): Kei Okada
, Yohei Kakiuchi
, Shohei Fujii
, Ryohei Ueda
autogenerated on Fri Aug 2 2024 08:50:14