Welcome to final_assignment's documentation!

Indices and tables

User Interface Module

This node implements the userinterface for controlling the robot in the environment with all three different modalities.

scripts.UI.main()[source]

This function initializes the UserInterface, put all modalities in idle state and waits for the user to insert the number of modality to control the robot according to the different modalities, by relying on the rospy module. The user message is passed to the user_interface, which selet the modality to use to control the robot in the enviroment.

scripts.UI.switch()[source]

Switch function to switch between the modalities

Defining function switch(), this function will start the different modalities depending on what the user decides to choose. The variable boolprint is used to wait in the first modality the end of the task.

Modality1 Module

This node implements the first modality for controlling the robot in the environment.

Modality2 Module

This node implements the second modality for controlling the robot in the environment.

class scripts.modality2.PublishThread(rate)[source]
robot_stop()[source]

Function to stop the robot.

Parameters

self --

run()[source]

Method representing the thread's activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

scripts.modality2.getKey(key_timeout)[source]

Function to get the input from the keyboard without having the need to wait for the user to press enter.

Parameters

key_timeout --

Returns

the key.

scripts.modality2.main()[source]

The main here is really important because as the different input arrives it changes the key moving the robots. As the other two modalities, we have again active which permits the user to use the modality as he wants.

Modality3 Module

This node implements the third modality for controlling the robot in the environment.

scripts.modality3.CallbackLaser(msg)[source]

Function to check if some wall is close to the robot.

Parameters

robot (message from the odometry of the) --

class scripts.modality3.PublishThread(rate)[source]
run()[source]

Method representing the thread's activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

scripts.modality3.getKey(key_timeout)[source]

Function to get the input from the keyboard without having the need to wait for the user to press enter.

Parameters

key_timeout --

Returns

the k

scripts.modality3.main()[source]

The main here is really important because as the different input arrives it changes the key moving the robots. As the other two modalities, we have again active which permits the user to use the modality as he wants. As you could see, the modality 1 and the modality 2 are pretty equal, but here's the difference, when the robot is close to a wall, we pop the keys in the dictionary permitting the robot to move towards the robot.

scripts.modality3.pop_it(dictionary)[source]

Function to pop the key from the dictionary. As you can see it's pretty intuitive, because depending by the position of the wall we pop some precise keys.

Parameters

dictionary --