Commit 7871fd86 authored by Barcis, Michal's avatar Barcis, Michal

Merge branch 'master' of gitlab.aau.at:aau-nav/development/camera_streaming into master

parents c8067f57 f154bd2a
......@@ -74,7 +74,11 @@ class CameraSubscriber(Node, MissionExecutor):
self.saved = 0
self.last_saved = datetime.now().timestamp()
self.resolution = (480, 640, 3)
SOURCE_IMG_SIZE = (640, 480)
# SOURCE_IMG_SIZE = (800, 600)
# SOURCE_IMG_SIZE = (1280, 960)
self.resolution = (SOURCE_IMG_SIZE[1], SOURCE_IMG_SIZE[0], 3)
hosts_num = len(self.hosts.keys())
self.shape = (
int(np.floor(np.sqrt(hosts_num))),
......@@ -276,7 +280,10 @@ class CameraSubscriber(Node, MissionExecutor):
self.fps[host] = round(
(
0.8 * self.fps[host] +
0.2 * 1/(t_gen - self.last_frame[host]).total_seconds()
0.2 * 1/(
(t_gen - self.last_frame[host]).total_seconds()
or 1
)
),
2
)
......@@ -289,6 +296,7 @@ class CameraSubscriber(Node, MissionExecutor):
) / 2
native_message = ROS2NativeMessage(
msg=msg,
size=len(msg.data),
sender=host[-1],
receivers=['base_station'],
data_type_name=f'v{host[-1]}',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment