User Tools

Site Tools


drc_hubo_creating_new_al_dw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
drc_hubo_creating_new_al_dw [2016/11/19 14:19] – created dwallacedrc_hubo_creating_new_al_dw [2017/04/27 21:50] (current) dwallace
Line 20: Line 20:
 Before creating the AL, we must first make sure that PODO is setup properly within Qt. Make sure that you add all the required project to Qt according to the [[software_setup_dw|Software Tutorial]]. Make sure that all projects are set to Release, and not Debug. Before creating the AL, we must first make sure that PODO is setup properly within Qt. Make sure that you add all the required project to Qt according to the [[software_setup_dw|Software Tutorial]]. Make sure that all projects are set to Release, and not Debug.
  
-Once all of the projects are setup, right click the ALPrograms project, and select "New Subproject". Now, for the template, select "Application" in the "Projects" area, and then "Qt Console Application" in the template area.+Once all of the projects are setup, right click the ALPrograms project, and select "New Subproject" 
 + 
 +{{dylanw:huboal1.jpg?800}}\\  
 + 
 +Now, for the template, select "Application" in the "Projects" area, and then "Qt Console Application" in the template area. 
 + 
 +{{dylanw:huboal2.jpg?600}}\\ 
  
 Finally, name your project. Finally, name your project.
Line 32: Line 38:
 First, copy the text from the ALTutorial.pro file to the .pro file for your new AL. First, copy the text from the ALTutorial.pro file to the .pro file for your new AL.
  
-Next, right-click the new AL project and select "Add Existing Files...". Navigate to ~/Desktop/PODO_AL_CLASS/podo_nrl/src/ALPrograms/ALTutorial and select the folder "BasicFiles".+{{dylanw:huboal3.jpg?800}}\\  
 + 
 +Next, right-click the new AL project and select "Add Existing Files...". 
 + 
 +{{dylanw:huboal4.jpg?400}}\\  
 + 
 +Navigate to ~/Desktop/PODO_AL_CLASS/podo_nrl/src/ALPrograms/ALTutorial and select the folder "BasicFiles". 
 + 
 +{{dylanw:huboal5.jpg?600}}\\ 
  
 Finally, copy from the ALTutorial main.cpp to your new AL's main.cpp Finally, copy from the ALTutorial main.cpp to your new AL's main.cpp
 +
 +{{dylanw:huboal6.jpg?800}}\\ 
  
 ==== Changing Commands ==== ==== Changing Commands ====
  
 Once you have correctly setup and added files to your AL, you will need to make modifications in the code to give your commands unique names. See the photos below as a guideline. Once you have correctly setup and added files to your AL, you will need to make modifications in the code to give your commands unique names. See the photos below as a guideline.
 +
 +{{dylanw:huboal7a.jpg?300}}{{dylanw:huboal7b.jpg?300}}\\ 
  
 Some guidelines that must be followed when naming and creating commands: Some guidelines that must be followed when naming and creating commands:
Line 51: Line 69:
  
 First, right-click the PODOGUI project and select "Add New...". In the pop-up, select Qt int the "Files and Classes" section, and then select "Qt Designer From Class" in the template section. Name the class as you choose, but use the word dialog in the name. First, right-click the PODOGUI project and select "Add New...". In the pop-up, select Qt int the "Files and Classes" section, and then select "Qt Designer From Class" in the template section. Name the class as you choose, but use the word dialog in the name.
 +
 +{{dylanw:huboal8.jpg?600}}\\ 
  
 In the new .h file, include "CommonHeader.h", and in the private section declare a new integer value (name it ALNum_<your desired name>. In the new .h file, include "CommonHeader.h", and in the private section declare a new integer value (name it ALNum_<your desired name>.
 +
 +{{dylanw:huboal9.jpg?600}}\\ 
  
 In the new .cpp file, include "BasicFiles/PODOALDialog.h". Next, add the enum from you AL command. Finally, initialize the ALNum integer as PODOALDialog::GetALNumFromFileName(“<your AL filename>”). In the new .cpp file, include "BasicFiles/PODOALDialog.h". Next, add the enum from you AL command. Finally, initialize the ALNum integer as PODOALDialog::GetALNumFromFileName(“<your AL filename>”).
 +
 +{{dylanw:huboal10.jpg?600}}\\ 
  
 ==== Adding a GUI Button ==== ==== Adding a GUI Button ====
Line 60: Line 84:
 Now, we need to add a button to the GUI for our command.  Now, we need to add a button to the GUI for our command. 
  
-First, go to the Design tab and edit the .ul file for your new dialog. Drag out a button and rename it. Next, right-click the button and select "Go to slot...". Now, add the following to the code, and save the file:+First, go to the Design tab and edit the .ul file for your new dialog. Drag out a button and rename it. Next, right-click the button and select "Go to slot...". 
 + 
 +{{dylanw:huboal11.jpg?400}}\\  
 + 
 +Now, add the following to the code, and save the file:
  
 <code c++> <code c++>
Line 78: Line 106:
  
 Now you are ready to test your AL. Make sure that it does not break the other ALs that PODO uses. Also make sure that it performs as you have desired. Now you are ready to use you AL!  Now you are ready to test your AL. Make sure that it does not break the other ALs that PODO uses. Also make sure that it performs as you have desired. Now you are ready to use you AL! 
 +
 +==== Final Words ====
 +
 +This tutorial's objective was to teach the concepts behind creating a new AL for DRC-HUBO. Complete setup instructions for a base AL were provided. Once the concepts were conveyed the reader could successfully create and test their own AL for DRC-HUBO.
 +\\
 +\\
 +For questions, clarifications, etc, Email: <wallad3@unlv.nevada.edu>
  
drc_hubo_creating_new_al_dw.1479593996.txt.gz · Last modified: by dwallace