html5-img
1 / 42

SPL basic – Add Mobile Robots

SPL basic – Add Mobile Robots. SPL First Beginner Course – 05. Young Joon Kim http://www.helloapps.com. Topics. Add DifferentialDrive mobile robot Drive DifferentialDrive mobile robot Add FourByFourDrive mobile robot Drive FourByFourDrive mobile robot. Mobile robot entities in SPL.

bella
Télécharger la présentation

SPL basic – Add Mobile Robots

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. SPL basic – Add Mobile Robots SPL First Beginner Course – 05 Young Joon Kim http://www.helloapps.com

  2. Topics • Add DifferentialDrive mobile robot • Drive DifferentialDrive mobile robot • Add FourByFourDrive mobile robot • Drive FourByFourDrive mobile robot

  3. Mobile robot entities in SPL • DifferentialDrivemobile robot • Two wheels • One caster • FourByFourDrive mobile robot • Four wheels

  4. Add DifferentialDrive entity

  5. Add DifferentialDrive entity • Start with “StartSimulationEngine” and “SimState/basicsim.xml” Double-Click Double-Click

  6. Add DifferentialDrive entity • Select “Entities” tab • Add “AddDifferentialDriveEntity” command by double-clicking 1 2 Double-Click

  7. Add DifferentialDrive entity • Run script Press “F2” key

  8. Drive DifferentialDrive entity

  9. Drive DifferentialDrive entity • Select “Services” tab • Add “SimpleDashboard” command by double-clicking 1 2 Double-Click

  10. Drive DifferentialDrive entity • Run script Drag a mouse 4 Click 1 3 2 Click Double-Click

  11. Drive DifferentialDrive entity • Executed result

  12. Drive DifferentialDrive entity with script

  13. Drive DifferentialDrive entity with script • Remove “SimpleDashboard” command line remove

  14. Drive DifferentialDrive entity with script • Select “Action” tab menu • Add “FlushScript” command by double-clicking 1 2 Double-Click

  15. Drive DifferentialDrive entity with script • Type “base1”

  16. Drive DifferentialDrive entity with script • Find “[DifferentialDrive Commands]” item • Expand “[Method]” item by double-clicking Double-Click

  17. Drive DifferentialDrive entity with script • Add “Go(left, right)” command by double-clicking Double-Click

  18. Drive DifferentialDrive entity with script • Run script

  19. Drive DifferentialDrive entity with script • Go Forwards commands • base1.Go() • base1.Go(0.5) • base1.Go(0.5, 0.5) • base1.SetDrivePower(0.5, 0.5)

  20. Drive DifferentialDrive entity with script • Turn commands • base1.Go(-0.5, 0.5) • Base1.Go(0.2, 0.5) • base1.SetDrivePower(-0.5, 0.5) • base1.Turn(90, 0.3) //turn 90 degrees with 0.3 power • base1.RotateDegrees(90, 0.3)

  21. Drive DifferentialDrive entity with script • Go Distance commands • base1.GoTo(2.0, 0.5) //Go forwards 2.0m with 0.5 power • base1.DriveDistance(2.0, 0.5)

  22. Drive DifferentialDrive entity with script • Go Duration commands • base1.GoFo(0.5, 0.5, 1000) • Go with 0.5 power during 1000 milliseconds • After duration time, robot keeps its power

  23. Drive DifferentialDrive entity with script • Stop robot commands • base1.Stop() • base1.Go(0) • base1.Go(0, 0) • Base1.GoFor(0, 0, 1000) //keep stop during 1 second

  24. Drive DifferentialDrive entity with script • Apply multi-drive-commands

  25. Add FourByFourDrive entity

  26. Add FourByFourDrive entity • Start with “StartSimulationEngine” and “SimState/basicsim.xml”

  27. Add FourByFourDrive entity • Select “Entities” tab • Add “AddFourByFourEntity” command by double-clicking 1 2 Double-Click

  28. Add FourByFourDrive entity • Run script

  29. Add body for FourByFourEntity

  30. Add body for FourByFourEntity • Add “AddNewEntity” command Double-Click

  31. Add body for FourByFourEntity • Add “/ParentEntity:” option Double-Click

  32. Add body for FourByFourEntity • Type “car1”

  33. Add body for FourByFourEntity • Add “AddBoxShape” command

  34. Add body for FourByFourEntity • Modify dimensions as follows

  35. Add body for FourByFourEntity • Run script

  36. Drive FourByFourEntity

  37. Drive FourByFourEntity • Select “Action” tab menu • Add “FlushScript” command by double-clicking 1 2 Double-Click

  38. Drive FourByFourEntity • Type “car1”

  39. Drive FourByFourEntity • Find “[FourByFourDrive Commands]” and expand “[Method]” • Add “.Drive(steerAngle, power)” method by double-clicking Double-Click

  40. Drive FourByFourEntity • Run script

  41. Drive FourByFourEntity • Steer 30 degrees

  42. Drive FourByFourEntity • Multi-drive-commands

More Related