On Computer System Architecture

The Socket Server

The “On Computer System” has two things listening on the socket and they are the toggle_checker and listener.py .

Listener.py

Listener.py listens on the “cm-initialize-mission” event and the comment of which mission you wish. This can range from “mission1” to “mission4”. This activates a subprocess which opens up a roslaunch in a new terminal which handles all of the functions and all the standard outputs.

Toggle_checker

Toggle_checker is a rosnode that runs simultaneously to listener.py . Toggle_checker listens on the Socket Server for a message of 1,2,3, or 4. It then publishes what message it receives on a rostopic that each of the talkers are listening to. If that number is equal to the robots number, it will stop the talker publishing process. This process will be stopped until it receives this message again. Thus the name “toggle_checker”.

Talker(1-4).py

Talker subscribes to toggle and subscribes to the footprint. When it acquires the footprint, it gets the x and y of the robot and saves it to the global. We use the x and y later to compare to the list of numbers on line 114 of the script to figure out which is the closest room to travel too. All rooms are predefined locations thats we set which are a 2D array structure with first dimensions being room and second dimension being the points of the room.

results matching ""

    No results matching ""