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
4ec40049
Commit
4ec40049
authored
6 years ago
by
TSC21
Committed by
Beat Küng
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
micrortps_bridge: pass absolute path for yaml file and urtps templates
parent
bda60ecf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
msg/tools/generate_microRTPS_bridge.py
+12
-4
12 additions, 4 deletions
msg/tools/generate_microRTPS_bridge.py
msg/tools/uorb_rtps_classifier.py
+7
-4
7 additions, 4 deletions
msg/tools/uorb_rtps_classifier.py
with
19 additions
and
8 deletions
msg/tools/generate_microRTPS_bridge.py
+
12
−
4
View file @
4ec40049
...
...
@@ -177,9 +177,9 @@ parser.add_argument("-t", "--topic-msg-dir", dest='msgdir', type=str,
parser
.
add_argument
(
"
-b
"
,
"
--uorb-templates-dir
"
,
dest
=
'
uorb_templates
'
,
type
=
str
,
help
=
"
uORB templates dir, by default msgdir/templates/uorb_microcdr
"
,
default
=
default_uorb_templates_dir
)
parser
.
add_argument
(
"
-q
"
,
"
--urtps-templates-dir
"
,
dest
=
'
urtps_templates
'
,
type
=
str
,
help
=
"
uRTPS templates
dir, by default msgdir/
templates/urtps
"
,
default
=
default_urtps_templates_dir
)
help
=
"
uRTPS templates
abolsute path, by default use relative path to msg,
templates/urtps
"
,
default
=
default_urtps_templates_dir
)
parser
.
add_argument
(
"
-y
"
,
"
--rtps-ids-file
"
,
dest
=
'
yaml_file
'
,
type
=
str
,
help
=
"
RTPS msg IDs definition file
, relative to the msgdir, by default
tools/uorb_rtps_message_ids.yaml
"
,
default
=
default_rtps_id_file
)
help
=
"
RTPS msg IDs definition file
absolute path, by default use relative path to msg,
tools/uorb_rtps_message_ids.yaml
"
,
default
=
default_rtps_id_file
)
parser
.
add_argument
(
"
-p
"
,
"
--package
"
,
dest
=
'
package
'
,
type
=
str
,
help
=
"
Msg package naming, by default px4
"
,
default
=
default_package_name
)
parser
.
add_argument
(
"
-o
"
,
"
--agent-outdir
"
,
dest
=
'
agentdir
'
,
type
=
str
,
nargs
=
1
,
...
...
@@ -262,9 +262,17 @@ if agent and os.path.isdir(os.path.join(agent_out_dir, "idl")):
shutil
.
rmtree
(
os
.
path
.
join
(
agent_out_dir
,
"
idl
"
))
uorb_templates_dir
=
os
.
path
.
join
(
msg_folder
,
args
.
uorb_templates
)
urtps_templates_dir
=
os
.
path
.
join
(
msg_folder
,
args
.
urtps_templates
)
if
args
.
urtps_templates
!=
default_urtps_templates_dir
:
urtps_templates_dir
=
os
.
path
.
abspath
(
args
.
urtps_templates
)
else
:
urtps_templates_dir
=
os
.
path
.
join
(
msg_folder
,
args
.
urtps_templates
)
# parse yaml file into a map of ids
classifier
=
Classifier
(
os
.
path
.
join
(
msg_folder
,
args
.
yaml_file
),
msg_folder
)
if
args
.
yaml_file
!=
default_rtps_id_file
:
classifier
=
Classifier
(
os
.
path
.
abspath
(
args
.
yaml_file
),
msg_folder
)
else
:
classifier
=
Classifier
(
os
.
path
.
join
(
msg_folder
,
args
.
yaml_file
),
msg_folder
)
# check if there are no ID's repeated
check_rtps_id_uniqueness
(
classifier
)
...
...
This diff is collapsed.
Click to expand it.
msg/tools/uorb_rtps_classifier.py
+
7
−
4
View file @
4ec40049
...
...
@@ -117,8 +117,8 @@ if __name__ == "__main__":
parser
.
add_argument
(
"
-m
"
,
"
--topic-msg-dir
"
,
dest
=
'
msgdir
'
,
type
=
str
,
help
=
"
Topics message dir, by default msg/
"
,
default
=
"
msg
"
)
parser
.
add_argument
(
"
-y
"
,
"
--rtps-ids-file
"
,
dest
=
'
yaml_file
'
,
type
=
str
,
help
=
"
RTPS msg IDs definition file
, relative to the msg_dir, by default
tools/uorb_rtps_message_ids.yaml
"
,
default
=
"
tools/uorb_rtps_message_ids.yaml
"
)
help
=
"
RTPS msg IDs definition file
absolute path, by default use relative path to msg,
tools/uorb_rtps_message_ids.yaml
"
,
default
=
'
tools/uorb_rtps_message_ids.yaml
'
)
# Parse arguments
args
=
parser
.
parse_args
()
...
...
@@ -126,8 +126,11 @@ if __name__ == "__main__":
msg_folder
=
args
.
msgdir
if
args
.
msgdir
==
'
msg
'
:
msg_folder
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
classifier
=
Classifier
(
os
.
path
.
join
(
msg_folder
,
args
.
yaml_file
),
msg_folder
)
if
args
.
yaml_file
!=
'
tools/uorb_rtps_message_ids.yaml
'
:
classifier
=
Classifier
(
os
.
path
.
abspath
(
args
.
yaml_file
),
msg_folder
)
else
:
classifier
=
Classifier
(
os
.
path
.
join
(
msg_folder
,
args
.
yaml_file
),
msg_folder
)
if
args
.
send
:
if
args
.
path
:
...
...
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