Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AAU NAV
development
camera_streaming
Commits
c8067f57
Commit
c8067f57
authored
Sep 25, 2020
by
Barcis, Michal
Browse files
changed robot ids
parent
1186226c
Changes
1
Hide whitespace changes
Inline
Side-by-side
camera_streaming/camera_stream.py
View file @
c8067f57
...
...
@@ -49,17 +49,35 @@ CUSTOM_QOS = QoSProfile(
class
CameraStream
(
Node
,
MissionExecutor
):
def
__init__
(
self
):
super
().
__init__
(
'camera_stream'
)
"""
Throughout the code there is an assumption that only hosts with
single-digit ids are going to be used. That was true at the beginning,
but is not true anymore, hence we are remapping names of
hosts with higher ids. Hopefully at some point the code will be
refactored to allow for two-digit ids.
"""
hostname_remapping
=
{
'fdrones_b01'
:
'fdrones_b01'
,
'fdrones_b02'
:
'fdrones_b02'
,
'fdrones_b03'
:
'fdrones_b03'
,
'fdrones_b08'
:
'fdrones_b08'
,
'fdrones_b09'
:
'fdrones_b09'
,
'fdrones_b12'
:
'fdrones_b06'
,
'fdrones_b13'
:
'fdrones_b05'
,
'fdrones_b14'
:
'fdrones_b04'
,
}
self
.
hosts
=
{
'fdrones_b01'
:
0
,
'fdrones_b02'
:
1
,
'fdrones_b03'
:
2
,
'fdrones_b0
5
'
:
3
,
'fdrones_b0
6
'
:
4
,
'fdrones_b0
7
'
:
5
,
'fdrones_b0
4
'
:
3
,
'fdrones_b0
5
'
:
4
,
'fdrones_b0
6
'
:
5
,
'fdrones_b08'
:
6
,
'fdrones_b09'
:
7
,
}
self
.
hostname
=
socket
.
gethostname
()
self
.
hostname
=
hostname_remapping
[
socket
.
gethostname
()
]
self
.
publisher
=
self
.
create_publisher
(
CompressedImage
,
'/{}/camera'
.
format
(
self
.
hostname
),
...
...
@@ -213,6 +231,7 @@ class CameraStream(Node, MissionExecutor):
rate_constraint
=
self
.
constraints
[
'RATE'
]
pickle
.
dump
(
{
'generated_msgs'
:
self
.
agent
.
generated_messages
,
'received_msgs'
:
self
.
agent
.
received_messages
,
'sent_msgs'
:
self
.
agent
.
received_messages
,
'train_data'
:
rate_constraint
.
train_data
,
...
...
Write
Preview
Markdown
is supported
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