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
- Open the PODO project (including PODOGUI, ALTutorial, sub-projects)
- Check for correct build settings
- Create a sub-project (Qt console application
- Copy the Basic Files folder from src/ALPrograms/ALTutorial into the sub-project folder
- Navigate to the main.cpp
- Open the ALTutorial project and copy the code in main.cpp into the sub-projects main.cpp to utilize as a template
- Rebuild your sub-project
- Add to Git version control
- Change AL Name to unique name
- In main.cpp, declare an enum (must be >= 100)
- In PODOGUI subproject, add new > Qt > Designer Form Class
- Select Dialog with Buttons
- Name everything the same as the AL to make your life simpler when debugging
- In the projectdialog.h, include CommonHeader.h
- Declare a private int for enum commands
- In Dialog.cpp include PODOALDialog.h
- Declare the same enum in the dialog.cpp
- Set the dialog function, set the enum to = PODODialog::GetALNumFromFileName(“ALName”)
- In dialog.ui, make a button
- In the QDialog menu, change the object name
- Right click the button and go to Slot, and select clicked() event
- In dialog.cpp, in button function clicked() add
- USER_COMMAND cmd;
- cmd.COMMAND_DATA_USER_COMMAND = [enum_identifier];
- cmd.COMMAND_TARGET = [int_identifier];
- pLan→SendCommand(cmd);
- In PODOGUI sub-project, under GUIMainWindow.h and include dialog.h
- Under the User Dialog section, make a pointer to the dialog class - In GUIMainWindow.cpp, under the section under Expandable Dialogs, add
- ui→MAIN_TAB→addTab1)dialogpointer, “tab name”);
- In the Ubuntu Software Center, download and install the SQL Database browser
- Open it up and stuff and go to AL table > New Record
- Add [ALName], FileName, and set the Pathname (similar to the ones before it)
- In General Table, increment PODO AL amount by 1
- Write Changes
Giving the New AL Functionality
- In the main.cpp of the AL, add a switch statement with a case equal to your enum
- Ensure the enum is declared in your main.cpp
- Copy the case code from case: 999
- Change the SetMoveJoint to RSP
- Change to MOVE_RELATIVE
- The line after is the “Don't Do Shit Anymore” command
- Santiago Ricoy
- Rebuild the project
Using the New AL in PODOGUI
- Launch PODOLauncher
- Start Daemon and GUI
- SQL Build path to /Subproject Folder
- Select the new AL in the AL Modules
- 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