In the last few tutorials, we verified created a control algorithm project and verified our setup by performing a simple user-defined motion on both the virtual and actual Allegro Hands. We did all this ignoring the features of Allegro Hand Application Studio (AHAS) as a robust GUI interface for controlling the hand and visualizing certain data.

In this tutorial, we will take advantage of buttons in AHAS and use them to invoke our own algorithms and those supplied along with AHAS in the BHand Library.

AHAS Buttons

In your AHAS bin/controls directory, locate the file ALLEGROHAND1.lua. This is the file that we made in Tutorial 1 which links to out new controller. Copy this file to your Desktop.

Note: Once again, we must copy this file to the desktop for editing then move it back to the controls folder when we are finished.

From the Desktop, let's open up ALLEGROHAND1.lua and take a look.

The function OnGUI() is the area of interest. This function contains the buttons and joint angle sliders we seen on the AHAS GUI. To create a button and link its press to a command is as simple as follows:

    -- if button is pressed
    -- GUIButton(x-pos, y-pos, width, height, "name")
    if (GUIButton(5, 35, 120, 25, "Home")) then
      -- command to be send to controller:
      -- RCMD_GO_HOME, RCMD_GO_READY or RCMD_USER + #
      sendCommand("HandController", RCMD_GO_HOME, VK_H)
      -- command prompt output
      print("Home button pressed")
    end

This button




You are not allowed to post comments.




Copyright & Trademark Notice
Allegro, the Allegro logo, RoboticsLab, the RoboticsLab logo, and all related files and documentation are Copyright ⓒ 2008-2020 Wonik Robotics Co., Ltd. All rights reserved. RoboticsLab and Allegro are trademarks of Wonik Robotics. All other trademarks or registered trademarks mentioned are the properties of their respective owners.

Wonik Robotics's Allegro Hand is based on licensed technology developed by the Humanoid Robot Hand research group at the Korea Institute of Industrial Technology (KITECH).

Any references to the BHand Library or the Allegro Hand Motion and/or Grasping Library refer to a library of humanoid robotic hand grasping algorithms and motions developed and published by KITECH researchers.
J.-H. Bae, S.-W. Park, D. Kim, M.-H. Baeg, and S.-R. Oh, "A Grasp Strategy with the Geometric Centroid of a Groped Object Shape Derived from Contact Spots," Proc. of the 2012 IEEE Int. Conf. on Robotics and Automation (ICRA2012), pp. 3798-3804

Wiki maintained by Sean Yi <seanyi@wonikrobotics.com>

KitechLogo.jpg Wonikrobotics logo.png





Whos here now:   Members 0   Guests 0   Bots & Crawlers 1