plotjuggler_plugins
ParserROS
ros2_parser.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
PlotJuggler/messageparser_base.h
"
4
5
#include <QCheckBox>
6
#include <QSettings>
7
#include <QDebug>
8
#include <string>
9
10
#include "
ros_parser.h
"
11
12
using namespace
PJ
;
13
14
class
ParserFactoryROS2
:
public
ParserFactoryPlugin
15
{
16
Q_OBJECT
17
Q_PLUGIN_METADATA(IID
"facontidavide.PlotJuggler3.ParserFactoryPlugin"
)
18
Q_INTERFACES(
PJ::ParserFactoryPlugin
)
19
20
public
:
21
ParserFactoryROS2
() =
default
;
22
23
const
char
*
name
()
const override
24
{
25
return
"ParserFactoryROS2"
;
26
}
27
const
char
*
encoding
()
const override
28
{
29
return
"ros2msg"
;
30
}
31
32
MessageParserPtr
createParser
(
const
std::string& topic_name,
33
const
std::string&
type_name
,
const
std::string& schema,
34
PlotDataMapRef
&
data
)
override
35
{
36
std::string
msg_type
=
37
QString::fromStdString(
type_name
).replace(
"/msg/"
,
"/"
).toStdString();
38
39
auto
parser
= std::make_shared<ParserROS>(
40
topic_name,
msg_type
, schema,
new
RosMsgParser::ROS2_Deserializer
(),
data
);
41
QSettings settings;
42
parser
->enableTruncationCheck(
43
settings.value(
"Preferences::truncation_check"
,
true
).toBool());
44
return
parser
;
45
}
46
};
PJ::MessageParserPtr
std::shared_ptr< MessageParser > MessageParserPtr
Definition:
messageparser_base.h:136
ParserFactoryROS2::encoding
const char * encoding() const override
Definition:
ros2_parser.h:27
sol::type_name
std::string type_name(lua_State *L, type t)
Definition:
sol.hpp:8079
ParserFactoryROS2
Definition:
ros2_parser.h:14
ParserFactoryROS2::name
const char * name() const override
Name of the plugin type, NOT the particular instance.
Definition:
ros2_parser.h:23
PJ::ParserFactoryPlugin
Definition:
messageparser_base.h:139
udp_client.parser
parser
Definition:
udp_client.py:9
ParserFactoryROS2::createParser
MessageParserPtr createParser(const std::string &topic_name, const std::string &type_name, const std::string &schema, PlotDataMapRef &data) override
Definition:
ros2_parser.h:32
PJ
Definition:
dataloader_base.h:16
mqtt_test.data
dictionary data
Definition:
mqtt_test.py:22
msg_type
def msg_type(f)
PJ::PlotDataMapRef
Definition:
plotdata.h:34
ros_parser.h
RosMsgParser::FastCDR_Deserializer
Definition:
deserializer.hpp:108
messageparser_base.h
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46