Embedded Motion Control 2015 Group 5: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Line 35: Line 35:
</table>
</table>


=Software Design assignment=
[[Media:Example.ogg]]


[[:File:EMC design document.pdf]]
<?php
# Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.
if (!defined('MEDIAWIKI')) {
        echo <<<EOT
To install this extension, put the following line at the end of LocalSettings.php:
require_once "\$IP/extensions/UploadPDF/UploadPDF.php";
EOT;
        exit( 1 );
}
$wgExtensionCredits['UploadPDF'][] = array(
        'path' => __FILE__,
        'name' => 'UploadPDF',
        'author' => 'Floyd Williams',
        'url' => 'https://www.mediawiki.org/wiki/Extension:UploadPDF',
        'descriptionmsg' => 'Adds an automatic conversion of PDF to JPEG files upon uploading files',
        'version' => '0.0.1'
);
 
$dir = dirname( __FILE__ ) . '/';
$wgAutoloadClasses['UploadPDF'] = $dir . 'UploadPDF-body.php';
 
function pdfCheckIntercept($type, &$className ) {
                global $wgAutoloadClasses;
                wfDebug( __METHOD__ . "Detected type: $type\n");
 
        if ($type == 'File') {
        global $wgOut;
                $request = RequestContext::getMain()->getRequest();
                $upload = $request->getUpload( 'wpUploadFile');
                $filename= $upload->getName();
                if ($filename == null) {return 1;}
                wfDebug( __METHOD__ . "Detected upload file: $filename\n");
                $extension = pdfgetExtension ($filename);
                wfDebug( __METHOD__ . "Detected upload file extension : $extension\n");
                        if ($extension == 'pdf'){$className = 'UploadPDF';
                        wfDebug( __METHOD__ . "Detected pdf upload file: $filename. Changed class to: $className\n");}
                return 1;
                }
                return 1;
        }
 
function pdfgetExtension ( $filename){
                $bits = explode( '.', $filename );
                $basename = array_shift( $bits );
                if( count( $bits ) ) {return trim( $bits[count( $bits ) - 1] );}
        }
                     
$wgHooks['UploadCreateFromRequest'][]= 'pdfCheckIntercept';


=Corridor challenge=
=Corridor challenge=

Revision as of 12:55, 13 May 2015

Group Members

Name: Student id:
Bart van Willigen 0770142
Joost Peters 0747630
Robin Loose 0771575
Koen Bos 0763939
Joost Franssen 0824821
Lotte de Koning 0655209
Marjon 't Klooster 0819200

Media:Example.ogg

<?php

  1. Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.

if (!defined('MEDIAWIKI')) {

       echo <<<EOT

To install this extension, put the following line at the end of LocalSettings.php: require_once "\$IP/extensions/UploadPDF/UploadPDF.php"; EOT;

       exit( 1 );

} $wgExtensionCredits['UploadPDF'][] = array(

       'path' => __FILE__,
       'name' => 'UploadPDF',
       'author' => 'Floyd Williams',
       'url' => 'https://www.mediawiki.org/wiki/Extension:UploadPDF',
       'descriptionmsg' => 'Adds an automatic conversion of PDF to JPEG files upon uploading files',
       'version' => '0.0.1'

);

$dir = dirname( __FILE__ ) . '/'; $wgAutoloadClasses['UploadPDF'] = $dir . 'UploadPDF-body.php';

function pdfCheckIntercept($type, &$className ) {

               global $wgAutoloadClasses;
               wfDebug( __METHOD__ . "Detected type: $type\n");
       if ($type == 'File') {
       global $wgOut;
               $request = RequestContext::getMain()->getRequest();
               $upload = $request->getUpload( 'wpUploadFile');
               $filename= $upload->getName();
               if ($filename == null) {return 1;}
               wfDebug( __METHOD__ . "Detected upload file: $filename\n");
               $extension = pdfgetExtension ($filename);
               wfDebug( __METHOD__ . "Detected upload file extension : $extension\n");
                       if ($extension == 'pdf'){$className = 'UploadPDF';
                       wfDebug( __METHOD__ . "Detected pdf upload file: $filename. Changed class to: $className\n");}
               return 1;
               }
               return 1;
       }

function pdfgetExtension ( $filename){

               $bits = explode( '.', $filename );
               $basename = array_shift( $bits );
               if( count( $bits ) ) {return trim( $bits[count( $bits ) - 1] );}
       }
                      

$wgHooks['UploadCreateFromRequest'][]= 'pdfCheckIntercept';

Corridor challenge

Approach

Development

Main

Tasks

Skills

After a first succesful brainstorm, the first draft of the system interface is determined. In this schematic the different contexts are presented. The goal to solve the maze is monitored by the Task monitor. Based on the observed environment and the maze solving algorithm, a set of skills is selected. Task control feedforward is used when no deterministic choice can be made. These skills are based on the robot's basic functions.

System interfaces.
System interfaces.

Conclusion

Maze challange

Aligning and centering the robot

In order to center the robot, two laser bundles perpendicular to the robot's driving direction are used to determine the distance to the wall on the left and right side of the robot. Based on the difference between these distances, a lateral velocity is send to the robot, using a proportional controller. This controller drives the robot to the middle of the corridor. To align the robot along the corridor, three laser bundles are used. One laser bundle measures the distance to the wall perpendicular to the driving direction, and two bundles around the perpendicular bundle measure the distance to the wall. When the perpendicular bundle does not measure the smallest distance, a rotational velocity, based on the differences between the other bundles, is sent to the robot.