Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
110a7931
Commit
110a7931
authored
5 years ago
by
TSC21
Committed by
Lorenz Meier
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
microRTPS bridge generation: improve fastrtpsgen verbosity
parent
3536c9dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
msg/tools/generate_microRTPS_bridge.py
+15
-10
15 additions, 10 deletions
msg/tools/generate_microRTPS_bridge.py
with
15 additions
and
10 deletions
msg/tools/generate_microRTPS_bridge.py
+
15
−
10
View file @
110a7931
...
...
@@ -195,7 +195,7 @@ px_generate_uorb_topic_files.append_to_include_path(
{
msg_dir
},
px_generate_uorb_topic_files
.
INCL_DEFAULT
,
package
)
# Agent files output path
agent_out_dir
=
os
.
path
.
abspath
(
args
.
agentdir
)
agent_out_dir
=
os
.
path
.
abspath
(
args
.
agentdir
)
# Client files output path
client_out_dir
=
os
.
path
.
abspath
(
args
.
clientdir
)
...
...
@@ -250,15 +250,15 @@ if agent and os.path.isdir(os.path.join(agent_out_dir, "idl")):
shutil
.
rmtree
(
os
.
path
.
join
(
agent_out_dir
,
"
idl
"
))
# uORB templates path
uorb_templates_dir
=
(
args
.
uorb_templates
if
os
.
path
.
isabs
(
args
.
uorb_templates
)
\
uorb_templates_dir
=
(
args
.
uorb_templates
if
os
.
path
.
isabs
(
args
.
uorb_templates
)
else
os
.
path
.
join
(
msg_dir
,
args
.
uorb_templates
))
# uRTPS templates path
urtps_templates_dir
=
(
args
.
urtps_templates
if
os
.
path
.
isabs
(
args
.
urtps_templates
)
\
urtps_templates_dir
=
(
args
.
urtps_templates
if
os
.
path
.
isabs
(
args
.
urtps_templates
)
else
os
.
path
.
join
(
msg_dir
,
args
.
urtps_templates
))
# parse yaml file into a map of ids
classifier
=
(
Classifier
(
os
.
path
.
abspath
(
args
.
yaml_file
),
msg_dir
)
if
os
.
path
.
isabs
(
args
.
yaml_file
)
\
classifier
=
(
Classifier
(
os
.
path
.
abspath
(
args
.
yaml_file
),
msg_dir
)
if
os
.
path
.
isabs
(
args
.
yaml_file
)
else
Classifier
(
os
.
path
.
join
(
msg_dir
,
args
.
yaml_file
),
msg_dir
))
# check if there are no ID's repeated
...
...
@@ -322,12 +322,17 @@ def generate_agent(out_dir):
os
.
chdir
(
os
.
path
.
join
(
out_dir
,
"
fastrtpsgen
"
))
if
not
glob
.
glob
(
os
.
path
.
join
(
idl_dir
,
"
*.idl
"
)):
raise
Exception
(
"
No IDL files found in %s
"
%
idl_dir
)
for
idl_file
in
glob
.
glob
(
os
.
path
.
join
(
idl_dir
,
"
*.idl
"
)):
ret
=
subprocess
.
call
(
fastrtpsgen_path
+
"
-d
"
+
out_dir
+
"
/fastrtpsgen -example x64Linux2.6gcc
"
+
fastrtpsgen_include
+
idl_file
,
shell
=
True
)
if
ret
:
raise
Exception
(
"
fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag
"
)
if
(
os
.
path
.
exists
(
fastrtpsgen_path
)):
for
idl_file
in
glob
.
glob
(
os
.
path
.
join
(
idl_dir
,
"
*.idl
"
)):
ret
=
subprocess
.
call
(
fastrtpsgen_path
+
"
-d
"
+
out_dir
+
"
/fastrtpsgen -example x64Linux2.6gcc
"
+
fastrtpsgen_include
+
idl_file
,
shell
=
True
)
if
ret
:
raise
Exception
(
"
fastrtpsgen failed with code error %s
"
%
ret
)
else
:
raise
Exception
(
"
fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag
"
)
rm_wildcard
(
os
.
path
.
join
(
out_dir
,
"
fastrtpsgen/*PubSubMain*
"
))
rm_wildcard
(
os
.
path
.
join
(
out_dir
,
"
fastrtpsgen/makefile*
"
))
rm_wildcard
(
os
.
path
.
join
(
out_dir
,
"
fastrtpsgen/*Publisher*
"
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment