User Tools

Site Tools


darwin_walk_backward

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
darwin_walk_backward [2017/11/21 10:18] yuhanghedarwin_walk_backward [2017/11/21 11:37] (current) – [Programming] yuhanghe
Line 10: Line 10:
 {{ ::yuhang:darwin_sprint:darwin_target.jpg?700 |}} {{ ::yuhang:darwin_sprint:darwin_target.jpg?700 |}}
 \\  \\ 
-This tutorial will demonstrate how to program Darwin OP 2 to walk backward. The walking algorithm for backward motion is included in Darwin OP 2's source code by Robotis. However, there is no on-line, or barely any, documentation of this process. This tutorial take approximately 1 hour to complete.+This tutorial will demonstrate how to program Darwin OP 2 to walk backward. The walking algorithm for backward motion is included in Darwin OP 2's source code by Robotis. However, there is no on-line, or barely any, documentation of this process. This tutorial will provide some insight into the process and it will take approximately 1 hour to complete.
 \\  \\ 
  
 ===== Motivation and Audience ===== ===== Motivation and Audience =====
  
-This tutorial's motivation is to demonstrate how to program Darwin OP 2 to walk toward a target. This tutorial assumes the reader has the following background and interests: +This tutorial's motivation is to demonstrate and document how to program Darwin OP 2 to walk backward. This tutorial assumes the reader has the following background and interests: 
  
   * Familiar with handling Darwin OP 2   * Familiar with handling Darwin OP 2
Line 29: Line 29:
 ===== Programming ===== ===== Programming =====
  
-Following a target can be accomplished through BallFollower ClassThere is a [[http://support.robotis.com/en/product/darwin-op/development/tutorials/linux/walking_control.htm| tutorial]] on Robotis' online manual that may provide further detail+Darwin OP 2's Walking class calculates motor positions for walking algorithm internally based on parameters. Most of these parameters can be edited through walking_tuner programHere is a detailed [[http://support.robotis.com/en/product/darwin-op/development/tools/walking_tuner.htm | tutorial ]] from Robotis on how to use walking_tuner. 
-\\  +\\ \\  
-This tutorial will only demonstrate parts of program that needs modification to include program Darwin OP 2 to walk toward target.+There are 3 parameter in walking_tuner that cannot be saved: ''Step forward/back (mm), Step right/left (mm), and Step Direction (degree)''. Instead, these variables should be updated constantly by your program during Darwin OP 2's walking process.  
 +\\ \\  
 +Below is a sample program that demonstrates Darwin OP 2 walking backward. Place both ''main.cpp'' and ''Makefile'' inside new folder in directory **''robotisop2/Linux/project/tutorial/''**Then, type ''make'' command to compile  executable and type ''./walk_backward'' to execute program. 
  
 <code cpp | main.cpp> <code cpp | main.cpp>
Line 128: Line 131:
                 Walking::GetInstance()->X_MOVE_AMPLITUDE = -15.0;                 Walking::GetInstance()->X_MOVE_AMPLITUDE = -15.0;
                 //X_MOVE_AMPLITUDE is a variable in Walking class that controls Darwin OP 2's walking step length,                  //X_MOVE_AMPLITUDE is a variable in Walking class that controls Darwin OP 2's walking step length, 
-                //each unit corresponds to approximately 1 cm. Set X_MOVE_AMPLITUDE to negative numbers to program +                //each unit corresponds to approximately 1 mm. Set X_MOVE_AMPLITUDE to negative numbers to program 
                 //Darwin OP 2 to walk backwards. The Walking class calculates corresponding motor positions                  //Darwin OP 2 to walk backwards. The Walking class calculates corresponding motor positions 
                 //internally                 //internally
Line 134: Line 137:
                 Walking::GetInstance()->A_MOVE_AMPLITUDE = 0.0;                 Walking::GetInstance()->A_MOVE_AMPLITUDE = 0.0;
                 //A_MOVE_AMPLITUDE is a variable in Walking class that controls Darwin OP 2's yaw movement. Each                  //A_MOVE_AMPLITUDE is a variable in Walking class that controls Darwin OP 2's yaw movement. Each 
-                //unit correspond approximately to 1 degree. +                //unit correspond approximately to 1 degree. Positive degrees for Darwin OP 2 to turn  
 +                //counterclockwise, negative degree for clockwise
                                  
                 Walking::GetInstance()->Start();                 Walking::GetInstance()->Start();
Line 188: Line 192:
 ===== Demonstration ===== ===== Demonstration =====
  
-In this demonstration,created a new mode called Sprint mode following the previous step and successfully execute it on Darwin OP 2.+In this demonstration, I successfully compile and execute the above programs
  
-{{ youtube>HaZladeEsJo?large }} +{{ youtube>GQ8AyZpQ9NU?large }} 
  
 ===== Final Words ===== ===== Final Words =====
  
-This tutorial's objective was to demonstrate how to program Darwin OP 2 to walk toward target+This tutorial's objective was to demonstrate how to program Darwin OP 2 to walk backward
 \\ \\
 \\ \\
darwin_walk_backward.1511288307.txt.gz · Last modified: 2017/11/21 10:18 by yuhanghe