User Tools

Site Tools


drc_hubo_creating_new_al_ap

This is an old revision of the document!


Creating a New AL for HUBO

Author: Alvaro Pintado Email: [email protected]
Date: Last modified on 11/19/16
Keywords: Humanoid, HUBO, Software, PODO, AL Creation

Follow this lengthy set of steps in order to kind of create a new AL for HUBO.

Setting up a new AL Sub-project in Qt

  1. Open the PODO project (including PODOGUI, ALTutorial, sub-projects)
  2. Check for correct build settings
  3. Create a sub-project (Qt console application
  4. Copy the Basic Files folder from src/ALPrograms/ALTutorial into the sub-project folder
  5. Navigate to the main.cpp
  6. Open the ALTutorial project and copy the code in main.cpp into the sub-projects main.cpp to utilize as a template
  7. Rebuild your sub-project
  8. Add to Git version control
  9. Change AL Name to unique name
  10. In main.cpp, declare an enum (must be >= 100)
  11. In PODOGUI subproject, add new > Qt > Designer Form Class
  12. Select Dialog with Buttons
  13. Name everything the same as the AL to make your life simpler when debugging
  14. In the projectdialog.h, include CommonHeader.h
  15. Declare a private int for enum commands
  16. In Dialog.cpp include PODOALDialog.h
  17. Declare the same enum in the dialog.cpp
  18. Set the dialog function, set the enum to = PODODialog::GetALNumFromFileName(“ALName”)
  19. In dialog.ui, make a button
  20. In the QDialog menu, change the object name
  21. Right click the button and go to Slot, and select clicked() event
  22. In dialog.cpp, in button function clicked() add
    1. USER_COMMAND cmd;
    2. cmd.COMMAND_DATA_USER_COMMAND = [enum_identifier];
    3. cmd.COMMAND_TARGET = [int_identifier];
    4. pLan→SendCommand(cmd);
  23. In PODOGUI sub-project, under GUIMainWindow.h and include dialog.h
  24. Under the User Dialog section, make a pointer to the dialog class - In GUIMainWindow.cpp, under the section under Expandable Dialogs, add
    1. ui→MAIN_TAB→addTab1)dialogpointer, “tab name”);
  25. In the Ubuntu Software Center, download and install the SQL Database browser
  26. Open it up and stuff and go to AL table > New Record
  27. Add [ALName], FileName, and set the Pathname (similar to the ones before it)
  28. In General Table, increment PODO AL amount by 1
  29. Write Changes

Giving the New AL Functionality

  1. In the main.cpp of the AL, add a switch statement with a case equal to your enum
    1. Ensure the enum is declared in your main.cpp
  2. Copy the case code from case: 999
  3. Change the SetMoveJoint to RSP
  4. Change to MOVE_RELATIVE
  5. The line after is the “Don't Do Shit Anymore” command
    1. Santiago Ricoy
  6. Rebuild the project

Using the New AL in PODOGUI

  1. Launch PODOLauncher
  2. Start Daemon and GUI
  3. SQL Build path to /Subproject Folder
  4. Select the new AL in the AL Modules
  5. Under the newly created tab will be the new button made for the functionality of the AL
1)
QWidget*
drc_hubo_creating_new_al_ap.1479594566.txt.gz · Last modified: 2016/11/19 14:29 by alvaropintado