Wednesday, April 13, 2011

[Programming] How to use VSRC003 SDK ~Play Motion File~

Please Prepare Following

  • VC++2010 Express, or VS2010
  • VSRC003 SDk
  • KTX robot or VSRC003 with servo motor
You can download complete project file for VSC++ Express here>>
SDK examples are only available for those who have SDK licence from us...

1.  Start VC++ and Create new project
     (1)  Start VC++
     (2)  File -> New -> Project -> General -> Empty Project
     (3)  Enter Project name "PlayMotionFile"
     (4)  Enter Solution name "VSRC003SDK Examples"
     (5)  Click "OK"

2. Copy SDK to Solution folder
    (1)  Create Directory called "VSRC003SDK" inside solution directory
    (2)  Copy "VSRC003_SDK.h", "VSRC003_SDK.lib", "VSRC003_SDK.dll", and "rclib.dll"

3.  Writing Code
     (1)  Create a new c++ file called "main.cpp", right click on "source files" -> add -> new and select cpp file and enter a name.
     (2)  Write code....
            Please download files here and look at the code...
4.  Build  Solution
     (1)  Go to Project Property -> Linker -> Input -> additional Dependency  -> edit and add "VSRC003_SDK.lib"
     (2)  Build solution

5.  Prepare motion file
     (1)  Create init motion

            Open RM2 and create init motion.  your initi motion should contain 3 to 5 poses of your starting pose.
            For example, if the motion you would play starts from standing up position, you will be creating init motion with standing poses.
            If you need shorter activation time for your software, you can decrease step size to smaller value.
     (2)  Create motion file

            You can create or use existing motion for the demonstration.
            To use "loop" feature of VSRC003_PlayMotion(int loopnumber), you must have loop block inside the motion file.

6.  Run 
     (1)  Add "VSRC003_SDK.dll", and "rclib.dll" to your output directory (VSRC003SDK Examples/Debug)
     (2)  start debugging

7. Play motion file
     (1)  Chose init motion
            If you run the code, it will first ask you to select init motion.
            Please select the init motion you created.
     (2)  Chose motion file you want to play
     (3)  enter number of loop.  Enter -1 for infinit
     (4)  You can press ESC key to stop playing motion.

No comments:

Post a Comment