Skip to content

Commit 9e90d24

Browse files
committed
coherent file naming scheme; documentation of camera_data module;
1 parent cff1950 commit 9e90d24

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

camera_data/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Camera Data Module
2+
3+
This module read and writes data from available camera feeds to the `/camera_frames` topic.
4+
5+
### Messages
6+
7+
- `v_angle`: Vertical orientation tilt of the camera enclosed in [-90, 90] degrees (The pitch axis of rotation).
8+
- `h_angle`: Horizontal orientation tilt of the camera enclosed in [-90, 90] degrees (The Yaw axis of rotation).
9+
10+
### Scripts
11+
12+
- `camera_feeds.py`: Collects available camera ports and outputs them all in distinct windows.
13+
- `camera_subscriber.py`: Subscriber to the `/camera_frames` topic that displays the images to screen.
14+
- `camera_publisher.py`: Publishes frames from the selected camera (from the `camera_selection` topic) to the
15+
`/camera_frames` topic at a rate of __30fps__.
16+
17+
### Tests
18+
19+
- `test_get_cameras.py`: Tests the camera feed collection from the `camera_feeds.py` script.

camera_data/src/getCameraFeeds.py renamed to camera_data/src/camera_feeds.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ def __init__(self):
1414
self.available_cameras.append(newCap)
1515

1616
def get_all_feeds(self):
17-
retAndFrame = []
17+
ret_frame = []
1818
# read each capture object in vids and add as a tuple to retAndFrame
1919
for camera in self.available_cameras:
2020
newFeed = camera.read()
21-
retAndFrame.append((newFeed[0], newFeed[1]))
21+
ret_frame.append((newFeed[0], newFeed[1]))
2222

23-
return retAndFrame
23+
return ret_frame
2424

2525
def run_feeds(self):
2626
while True:
@@ -38,5 +38,5 @@ def run_feeds(self):
3838

3939
# Runnable to display camera feeds
4040
if __name__ == '__main__':
41-
camHandler = CameraHandler()
42-
camHandler.run_feeds()
41+
camera_handler = CameraHandler()
42+
camera_handler.run_feeds()

camera_data/test/test_getCam.py renamed to camera_data/test/test_get_cameras.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
import getCameraFeeds as gcf
1010

1111
# Runnable to display camera feeds
12-
camHandler = gcf.CameraHandler()
13-
camHandler.run_feeds()
12+
camera_handler = gcf.CameraHandler()
13+
camera_handler.run_feeds()

0 commit comments

Comments
 (0)