Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2RosCpp
Commits
68f78782
Commit
68f78782
authored
Apr 12, 2019
by
Alexander David Hellwig
Browse files
Move struct_msgs package check to viewmodel creation, enable find_package(struct_msgs) for ros2
parent
6837cb3f
Pipeline
#118144
failed with stages
in 50 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/generator/roscpp/GeneratorRosCpp.java
View file @
68f78782
...
...
@@ -69,7 +69,7 @@ public class GeneratorRosCpp {
private
List
<
FileContent
>
generateRosAdapter
(
EMAComponentInstanceSymbol
component
)
{
List
<
FileContent
>
res
=
new
ArrayList
<>();
if
(
TagHelper
.
rosConnectionsValid
(
component
))
{
if
(
TagHelper
.
rosConnectionsValid
(
component
,
ros2Mode
))
{
List
<
EMAPortSymbol
>
rosPorts
=
component
.
getPortInstanceList
().
stream
()
.
filter
(
EMAPortSymbol:
:
isRosPort
)
.
collect
(
Collectors
.
toList
());
...
...
@@ -122,6 +122,8 @@ public class GeneratorRosCpp {
.
map
(
RosConnectionSymbol:
:
getTopicType
)
.
map
(
Optional:
:
get
)
.
map
(
n
->
n
.
split
(
"/"
)[
0
])
//dont add struct_msgs if we are in ros1 mode
.
filter
(
s
->
ros2Mode
||
!
s
.
equals
(
"struct_msgs"
))
.
forEach
(
allPackages:
:
add
);
allPackages
.
forEach
(
model:
:
addPackage
);
...
...
src/main/resources/de/monticore/lang/monticar/generator/roscpp/template/CMakeLists.ftl
View file @
68f78782
...
...
@@ -4,9 +4,7 @@ set (CMAKE_CXX_STANDARD 14)
set
(AMENT_CMAKE_UNINSTALL_TARGET FALSE)
<#
list
model.getPackages() as pack>
<#if pack != "struct_msgs">
find_package
(${
pack
}
REQUIRED)
</#if>
</#
list
>
add_library
(${
model
.name
}
$
{
model
.name
}
.cpp)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment