Skip to content

Commit 93649f4

Browse files
author
timothy.tamm
committed
move over to robomodules
1 parent e9e2f47 commit 93649f4

20 files changed

+41
-495
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "robomodules"]
2+
path = robomodules
3+
url = https://github.com/HarvardURC/robomodules.git

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
Code for The Harvard Undergraduate Robotics Club's MATE ROV team.
44

5-
The code consist of separate modules that are run on either the ROV or on a ground base. Inter-module communications are orchestrated by the RovController (rovController.py), which acts like a server. Modules send messages to the rovController and subscribe to certain messagetypes. When the RovController receives a message of a certain type, it forwards it to all the modules that have subscribed to that message type.
5+
The code consist of separate modules that are run on either the ROV or on a ground base. Inter-module communications are orchestrated by the Server (server.py). Modules send messages to the server and subscribe to certain message types. When the server receives a message of a certain type, it forwards it to all the modules that have subscribed to that message type.
66

77
## How to run
88

9-
1. Execute ./rovController
9+
1. Execute ./server.py
1010
2. Execute all of your modules
1111

1212
## Adding new modules
1313

1414
1. If necessary, create a new protocol buffer for your data.
15-
- Create a new .proto file describing your buffer in the comm folder.
16-
- Add your new .proto file to the Makefile in the comm folder.
15+
- Create a new .proto file describing your buffer in the messages folder.
16+
- Add your new .proto file to the Makefile in the messages folder.
1717
- Before:
1818
```
1919
protobuf: first.proto
@@ -26,7 +26,7 @@ The code consist of separate modules that are run on either the ROV or on a grou
2626
protoc -I=./ --python_out=./ ./second.proto
2727
```
2828
- Run the make command in the comm folder.
29-
- In comm/constants.py do the following:
29+
- In messages/__init__.py do the following:
3030
- Import your new compiled buffer.
3131
- Add a message type enum for your new buffer.
3232
- Add the new message type and the associated buffer to message_buffers.
@@ -58,4 +58,4 @@ The code consist of separate modules that are run on either the ROV or on a grou
5858
MsgType.SECOND: SecondMsg
5959
}
6060
```
61-
2. Make a new module class that inherits from modules.ProtoModule. Look at MockGuiModule.py and MockSensorModule for examples on modules
61+
2. Make a new module class that inherits from robomodules.ProtoModule. Look at MockGuiModule.py and MockSensorModule for examples on modules

comm/Makefile

-3
This file was deleted.

comm/README.md

-1
This file was deleted.

comm/__init__.py

-21
This file was deleted.

comm/asyncClient.py

-57
This file was deleted.

comm/asyncProto.py

-49
This file was deleted.

comm/constants.py

-20
This file was deleted.

comm/mockMsg.proto

-8
This file was deleted.

comm/mockMsg_pb2.py

-69
This file was deleted.

comm/serverProto.py

-17
This file was deleted.

comm/subscribe.proto

-13
This file was deleted.

0 commit comments

Comments
 (0)