Saturday, May 4, 2013

Android Application


The android application developed has a very intuitive and simple User Interface . This application allows the user to control the robot as well as watch the video stream on the phone.

FUNCTIONALITIES:


The main functionalities on the android application are :

1. The robot can be controlled using the phone.
2. The video stream from the robot can be watched on the android phone.
3. The user can connect and disconnect from the robot at any point of time
4. The application displays the distance to the nearest obstacle
5. The application allows the user to turn on/o the ping sensors The user can also set the
distance at which the robot needs to come to halt from the obstacle


CONTROL OF THE ROBOT USING THE APPLICATION:

The robot movements are controlled based on the inputs from the user on the phone. The movement of the robot forward or backward is controlled by the slider bar which is present on the Main Screen of the phone. By pushing the slider forward the user can make the robot move forward and by sliding the slider backwards the user can make the robot move backwards. The side ways movement of the robot is controlled by the accelerometer inputs from the phone. The user can tilt the phone to the right to make the robot turn right or tilt the phone to the left to make the robot turn left. The amount of turn that the robot makes depends on the amount of tilt. The robot tries to maintain a constant speed of one wheel and will reduce the speed of the other wheel. The amount by which the speed of the other wheel is reduced depends on the amount of tilt. If the tilt is very high, then the wheel will start to turn in the opposite direction. The slider ensures that the robot moves with the same speed as long the slide remains in the same position. This enables us to maintain a constant speed.

LIVE VIDEO STREAM FROM THE ROBOT:

The video stream is transmitted by the robot over a TCP connection on PORT 5000. To obtain the video stream on the Android application the Gstreamer SDK has been used . The native functions of the SDK have been used to initialize, play and pause the video. The user can watch the live video stream on the Main Screen of the application. When the user decides the pause the robot, the video stream also pauses. The video stream starts playing once the user starts controlling the robot again.

CONNECTION OF THE ROBOT:


The user can connect and disconnect from the robot at any point of time. When the user connects to the robot , the three sockets are opened and connected to the server on the robot. If the sockets cannot be opened or the communication channel between the robot and the phone cannot be established then a dialog box is displayed saying that the application couldn't connect to the robot.  At any point of time once the connection is established with the robot the user can disconnect from the robot. When the user decides to disconnect from the robot the application ensures that the robot is brought to a stop and then closes the socket connection with robots. The user can reconnect to the robot at any point of time.



PING SENSOR DATA:

The application displays the distance to the obstacle on the Main screen of the application. The distance is displayed on the top of the screen. When the ping sensors have been disabled the distance shown by the ping sensor is 0 cm.

Disable/Enable Ping Sensor:

The user can either disable or enable ping sensor from the android application. To do so the user has to open the settings menu of the application and select/deselect the check-box pertaining to the ping sensor.

Distance at which the robot has to come to a halt: 

The user can select the distance at which the robot has to come to a halt . The user has five options: 10 cm, 15 cm, 20 cm, 30 cm, 40 cm. To do so the user has to open the settings menu of the application and select the distance at which the robot has to come to a stop.




No comments:

Post a Comment