1 / 42

My first robot programming - Simple “Go”

My first robot programming - Simple “Go”. MSRDS First Beginner Course – STEP4. Young Joon Kim http://www.helloapps.com. Topics. Preparing basic environment Simple “Go” drive “Go Forwards” drive “Go Backwards” drive Stopping a robot Going around Turning round. “Go” Drive Commands.

cedna
Download Presentation

My first robot programming - Simple “Go”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. My first robot programming- Simple“Go” MSRDS First Beginner Course – STEP4 Young Joon Kim http://www.helloapps.com

  2. Topics • Preparing basic environment • Simple “Go” drive • “Go Forwards” drive • “Go Backwards” drive • Stopping a robot • Going around • Turning round

  3. “Go” Drive Commands

  4. “Go” Drive Commands • Go • Drive a robot with motor power • Motor power is set with given value and keeps its value • Usages • robotname.Go() //default power is 0.2 • robotname.Go(power) • robotname.Go(left_power, right_power) • Range of motor power values • -1.0 (Max backwards) ~ 1.0 (Max forwards) • 0: Stop the motor

  5. “Go” Drive Commands • Go forwards • Use the value above 0 • Ex) • robotname.Go() • robotname.Go(0.3) • robotname.Go(0.2, 0.2) • Go backwards • Use the negative value • Ex) • robotname.Go(-0.3) • robotname.Go(-0.2, -0.2)

  6. “Go” Drive Commands • Stopping a robot • Use the value 0 • Ex) • robotname.Go(0) • robotname.Go(0, 0) • robotname.Stop()

  7. Preparing basic environment

  8. Preparing basic environment • Launch SPL and add “StartSimulationEngine” command 1 2 Double click

  9. Preparing basic environment • Expand “/FileName:” option Click + Expanded

  10. Preparing basic environment • Double click “SimState/basicsim.xml” Double click

  11. Preparing basic environment • Add “AddDifferentialDriveEntity” command on the “Entities” tab 1 Double click 2

  12. Preparing basic environment • Add “FlushScript” command on the Actions tab 1 2 Double click

  13. Preparing basic environment • Save as “script/SimpleGo.txt”

  14. Preparing basic environment • Run SPL by pressing “F5” key or clicking “Run (F5)” icon

  15. Preparing basic environment • Execution result

  16. Simple “Go” drive

  17. Simple “Go” drive • Check available method for DriveEntity under the Actions tab

  18. Simple “Go” drive • How to use drive methods • “robot_name” + “.” + method • Ex) • Robot name: “base1” • Method: “.Go()” base1.Go()

  19. Simple “Go” drive • Add “base1.Go()” command as follows

  20. Simple “Go” drive • Run SPL by pressing “F5” key or clicking “Run” icon

  21. “Go Forwards” drive

  22. “Go Forwards” drive • Change drive command as follows • base1.Go() -> base1.Go(0.5) • Left and right power will be set with 0.5

  23. “Go Forwards” drive • Change command as follows

  24. “Go Forwards” drive • Run SPL by pressing “F5” key or clicking “Run” icon

  25. “Go Backwards” drive

  26. “Go Backwards” drive • Change drive command as follows • base1.Go(0.5) -> base1.Go(-0.3) • Left and right power will be set with -0.3

  27. “Go Backwards” drive • Change command as follows

  28. “Go Backwards” drive • Execution result

  29. Stopping a robot

  30. Stopping a robot • Add time delay command • Wait milliseconds • Ex) wait 5 seconds • Wait 5000

  31. Stopping a robot • Add “wait 5000” command as follows

  32. Stopping a robot • Add new drive command as follows • base1.Go(0.0) • Left and right power will be set with 0.0

  33. Stopping a robot • Add “base1.Go(0.0)” as follows

  34. Stopping a robot • Execution result Go backwards 1 Stop 2

  35. Going around

  36. Going around • Change drive command as follows • base1.Go(-0.3) -> base1.Go(0.2, 0.4) • Left power will be set with 0.2 • Right power will be set with 0.4

  37. Going around • Change command as follows

  38. Going around • Execution result

  39. Turning round

  40. Going around • Change drive command as follows • base1.Go(0.2, 0.4) -> base1.Go(-0.2, 0.2) • Left power will be set with -0.2 • Right power will be set with 0.2

  41. Going around • Change command as follows

  42. Turning round • Execution result

More Related