Skip to content

console

Classes

Name
class console::CallbackEcho
class console::ERROR_Struct
class console::HTTP_Handler
class console::ROSTopicException
class console::ROSTopicIOException
class console::subscriber_Thread
class console::ThreadedHTTPServer
class console::Topic_Struct

Functions

Name
def get_topic_class(topic topic, blocking blocking =False)
def get_topic_type(topic topic, blocking blocking =False)
def msgevalgen(pattern pattern)
def ros2xml(msg msg, name name, depth depth =0)
def moos2xml(msg msg, name name, time time, depth depth =0)
def create_publisher(topic_name topic_name, topic_type topic_type)
def publish_message(pub pub, msg_class msg_class, pub_args pub_args)
def cmd_set_topic(args args)
def getfiles(dirpath dirpath)
def populenv(self self)
def signal_handler(signal signal, frame frame)

Attributes

Name
string NAME
string MISSION_PATH
string pages_folder
int NFILE
ALL_TOPICS
SUBSCRIBED_TOPICS
UNKNOWN_TOPICS
ALL_ERRORs
int g_list_topic_thrsh
int g_list_topic_stamp
SIGNALS_TO_NAMES_DICT
argv
anonymous
True
disable_rosout
disable_rostime
server_port
ROOT_NAMESPACE
command
server

Functions Documentation

function get_topic_class

def get_topic_class(
    topic topic,
    blocking blocking =False
)
Get the topic message class
:returns: message class for topic, real topic
  name, and function for evaluating message objects into the subtopic
  (or ``None``). ``(Message, str, str)``
:raises: :exc:`ROSTopicException` If topic type cannot be determined or loaded

function get_topic_type

def get_topic_type(
    topic topic,
    blocking blocking =False
)
Get the topic type.

:param topic: topic name, ``str``
:param blocking: (default False) block until topic becomes available, ``bool``

:returns: topic type, real topic name and fn to evaluate the message instance
  if the topic points to a field within a topic, e.g. /rosout/msg. fn is None otherwise. ``(str, str, fn)``
:raises: :exc:`ROSTopicException` If master cannot be contacted

function msgevalgen

def msgevalgen(
    pattern pattern
)
Generates a function that returns the relevant field (aka 'subtopic') of a Message object
:param pattern: subtopic, e.g. /x. Must have a leading '/' if specified, ``str``
:returns: function that converts a message into the desired value, ``fn(Message) -> value``

function ros2xml

def ros2xml(
    msg msg,
    name name,
    depth depth =0
)

function moos2xml

def moos2xml(
    msg msg,
    name name,
    time time,
    depth depth =0
)

function create_publisher

def create_publisher(
    topic_name topic_name,
    topic_type topic_type
)
Create rospy.Publisher instance from the string topic name and
type. This is a powerful method as it allows creation of
rospy.Publisher and Message instances using the topic and type
names. This enables more dynamic publishing from Python programs.

:param topic_name: name of topic, ``str``
:param topic_type: name of topic type, ``str``
:param latch: latching topic, ``bool``
:returns: topic :class:`rospy.Publisher`, :class:`Message` class

function publish_message

def publish_message(
    pub pub,
    msg_class msg_class,
    pub_args pub_args
)
Create new instance of msg_class, populate with pub_args, and publish. This may
print output to screen.

:param pub: :class:`rospy.Publisher` instance for topic
:param msg_class: Message type, ``Class``
:param pub_args: Arguments to initialize message that is published, ``[val]``

function cmd_set_topic

def cmd_set_topic(
    args args
)

function getfiles

def getfiles(
    dirpath dirpath
)

function populenv

def populenv(
    self self
)

function signal_handler

def signal_handler(
    signal signal,
    frame frame
)

Attributes Documentation

variable NAME

string NAME = 'Console';

variable MISSION_PATH

string MISSION_PATH = "/home/cog/cog-sw/Missions_FOLDER";

variable pages_folder

string pages_folder =  "";

variable NFILE

int NFILE = 0;

variable ALL_TOPICS

ALL_TOPICS =  Topic_Struct();

variable SUBSCRIBED_TOPICS

SUBSCRIBED_TOPICS =  Topic_Struct();

variable UNKNOWN_TOPICS

UNKNOWN_TOPICS =  Topic_Struct();

variable ALL_ERRORs

ALL_ERRORs =  ERROR_Struct();

variable g_list_topic_thrsh

int g_list_topic_thrsh =  30;

variable g_list_topic_stamp

int g_list_topic_stamp =  0;

variable SIGNALS_TO_NAMES_DICT

SIGNALS_TO_NAMES_DICT =  dict((getattr(signal, n), n) \
    for n in dir(signal) if n.startswith('SIG') and '_' not in n );

variable argv

argv =  sys.argv;

variable anonymous

anonymous;

variable True

True;

variable disable_rosout

disable_rosout;

variable disable_rostime

disable_rostime;

variable server_port

server_port =  rospy.get_param('~PORT',7080);

variable ROOT_NAMESPACE

ROOT_NAMESPACE =  rospy.get_param('~ROOT_NAMESPACE',True);

variable command

command =  argv[1];

variable server

server =  ThreadedHTTPServer(('', server_port), HTTP_Handler);

Updated on 2024-03-07 at 10:30:48 +0000


Last update: March 7, 2024