Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 29, 2018, 12:15:19 PM (6 years ago)
Author:
dreherm
Message:

Update for ghost controller and ghost class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS18/src/modules/3DPacman/PacmanGhost.cc

    r11832 r11834  
    5050        this->localLinearAcceleration_.setValue(0, 0, 0);
    5151        this->localAngularAcceleration_.setValue(0, 0, 0);
    52         this->primaryThrust_  = 100;
    53         this->auxiliaryThrust_ = 100;
    54         this->rotationThrust_ = 10;
    5552
    5653        this->setCollisionType(CollisionType::Dynamic);
     54
     55        Vector3 resetposition = new Vector3(0,0,0); //Set Default start position
     56
    5757    }
    5858
     
    7878
    7979        XMLPortParam(PacmanGhost, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
    80         // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort.
    81         // Variables can be added by the following command
    82         // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunctionName, getFunctionName, xmlelement, mode);
    83         // Also make sure that you also create the get- and set-functions in AutonomousDrone.h. As you can see, the get- and set-functions for the variable primaryThrust_ has already been specified there, so you can get your inspiration from there.
     80        XMLPortParam(PacmanGhost, "auxilliaryThrust", setAuxillaryThrust, getAuxillaryThrust, xmlelement, mode);
     81        XMLPortParam(PacmanGhost, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
     82        XMLPortParam(PacmanGhost, "resetposition", setResetPosition, getResetPosition, xmlelement, mode);
    8483    }
    8584
Note: See TracChangeset for help on using the changeset viewer.