new_mode_demonstration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
new_mode_demonstration [2017/11/18 15:05] – [Programming] yuhanghe | new_mode_demonstration [2017/11/19 13:08] (current) – [Motivation and Audience] yuhanghe | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How To Add a New Mode to Darwin OP 2 ====== | + | ====== How to Add a New Mode to Darwin OP 2 ====== |
Line 6: | Line 6: | ||
**Date:** Last modified on < | **Date:** Last modified on < | ||
\\ | \\ | ||
- | **Keywords: | + | **Keywords: |
\\ | \\ | ||
\\ | \\ | ||
- | This tutorial will demonstrate how to add a new mode to Darwin OP 2's demo program. The new mode will be added alongside Autonomous Soccer, Interactive Motion, and Vision Processing mode. After starting program, use mode button on the back of Darwin OP 2 to cycle through modes and press start button to start the new mode.It takes approximately | + | This tutorial will demonstrate how to add a new mode to Darwin OP 2's demo program. The new mode will be added alongside Autonomous Soccer, Interactive Motion, and Vision Processing mode. After starting program, use mode button on the back of Darwin OP 2 to cycle through modes and press start button to start the new mode.It takes approximately |
\\ | \\ | ||
===== Motivation and Audience ===== | ===== Motivation and Audience ===== | ||
Line 29: | Line 29: | ||
* [[new_mode_demonstration# | * [[new_mode_demonstration# | ||
* [[new_mode_demonstration# | * [[new_mode_demonstration# | ||
+ | * [[new_mode_demonstration# | ||
* [[new_mode_demonstration# | * [[new_mode_demonstration# | ||
- | ==== Source Code ==== | + | ===== Source Code ===== |
It is always recommended to modify a copy of Darwin OP's source code instead of editing the source code directly. | It is always recommended to modify a copy of Darwin OP's source code instead of editing the source code directly. | ||
Line 44: | Line 45: | ||
\\ | \\ | ||
'' | '' | ||
- | ==== Programming ==== | + | ===== Programming |
This tutorial will only demonstrate parts of program that needs modification to include a new mode. | This tutorial will only demonstrate parts of program that needs modification to include a new mode. | ||
Line 72: | Line 73: | ||
//Signaling Darwin OP 2 which LED to turn on | //Signaling Darwin OP 2 which LED to turn on | ||
LinuxActionScript:: | LinuxActionScript:: | ||
- | //play an mp3 file | + | //play an mp3 file (you can use any mp3 file but make sure file name matches) |
} | } | ||
} | } | ||
Line 81: | Line 82: | ||
MotionManager:: | MotionManager:: | ||
MotionManager:: | MotionManager:: | ||
+ | // | ||
m_is_started = 1; | m_is_started = 1; | ||
LinuxActionScript:: | LinuxActionScript:: | ||
+ | //play an mp3 file (you can use any mp3 file but make sure file name matches) | ||
// Joint Enable... | // Joint Enable... | ||
Line 110: | Line 113: | ||
//copied status check condition from soccer mode to new mode | //copied status check condition from soccer mode to new mode | ||
//These codes initialize Darwin OP 2 for movement and walking | //These codes initialize Darwin OP 2 for movement and walking | ||
- | //Play mp3 and enable joint | ||
</ | </ | ||
Line 118: | Line 120: | ||
//implement new codes here to execute after pressing start button | //implement new codes here to execute after pressing start button | ||
</ | </ | ||
- | ==== Final Words ==== | ||
- | This tutorial' | + | ===== Demonstration ===== |
- | \\ | + | |
- | \\ | + | In this demonstration, |
- | Speculating future work derived from this tutorial, includes <fill in the blank>. In the big picture, the problem of <fill in the blank> can be solved with this tutorial. | + | |
+ | {{ youtube> | ||
+ | |||
+ | ===== Final Words ===== | ||
+ | |||
+ | This tutorial' | ||
\\ | \\ | ||
\\ | \\ | ||
- | For questions, clarifications, | + | For questions, clarifications, |
new_mode_demonstration.1511046307.txt.gz · Last modified: by yuhanghe