1 / 40

Elegant avoiding of obstacle

Elegant avoiding of obstacle. MSRDS First Beginner Course – STEP5. Young Joon Kim http://www.helloapps.com. Topics. Preparing basic environment Detecting distance by using laser distance sensor Stopping robot driving Avoiding obstacles. Preparing basic environment.

Télécharger la présentation

Elegant avoiding of obstacle

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. Elegantavoiding of obstacle MSRDS First Beginner Course – STEP5 Young Joon Kim http://www.helloapps.com

  2. Topics • Preparing basic environment • Detecting distance by using laser distance sensor • Stopping robot driving • Avoiding obstacles

  3. Preparing basic environment

  4. Preparing basic environment • Add a “Data” activity and “SPL Engine” • Type “Script/BasicEnv4.txt” in the “Data” activity

  5. Preparing basic environment • Execution result

  6. Detecting distance by using laser distance sensor

  7. Detecting distance by using laser sensor • Laser distance sensor • Detect distance against target • Notify distance with millimeter unit • Max distance is 8000 millimeter • SPL Engine provides notification data for laser sensor • LRFNotify • EntityName • SensorData • DistanceMeasurements

  8. Detecting distance by using laser sensor • Copy and paste “SPL Engine” service 1 Copy by pressing Ctrl+C Paste by pressing Ctrl+V 2

  9. Detecting distance by using laser sensor • Add a “HelloApps Console” service

  10. Detecting distance by using laser sensor • Add a “Calculate” activity

  11. Detecting distance by using laser sensor • Connect the notification point of “SPL Engine” to the input point of “Calculate” activity

  12. Detecting distance by using laser sensor • Select “LRFNotify” item from the left list

  13. Detecting distance by using laser sensor • Type ““Distance is “ +” in the Calculate • Select “SensorData” from the list

  14. Detecting distance by using laser sensor • Add “.” • Select “DistanceMeasurements” item from the list

  15. Detecting distance by using laser sensor • Add “[180]” • “Distance is “ + SensorData.DistanceMeasurements[180]

  16. Laser Sensor Data • DistanceMeasurements • Array of 361 distances For 180 angles, Detect distances by 0.5 degrees 180th 90th 270th 0thindex 360th Millimeter unit,max distance is8m(8000 millimeter)

  17. Laser Sensor Data • Distance for the front direction • SensorData.DistanceMeasurements[180] • Distance for the right 45 degrees direction • SensorData.DistanceMeasurements[90] • Distance for the left 45 degrees direction • SensorData.DistanceMeasurements[270] • Distance for the right direction • SensorData.DistanceMeasurements[0] • Distance for the left direction • SensorData.DistanceMeasurements[360]

  18. Detecting distance by using laser sensor • Connect the output point of “Calculate” activity to the input point of “Console” service

  19. Detecting distance by using laser sensor • Select “WriteLine” item from the right list

  20. Detecting distance by using laser sensor • Select “value” item from the left list

  21. Detecting distance by using laser sensor • Save and run diagram

  22. Detecting distance by using laser sensor • Execution results

  23. Stopping robot driving

  24. Stopping robot driving • If the distance from obstacle is below 1m(1000millimeter), make a robot stop • If(SensorData.DistanceMeasurements[180] < 1000) • myrobot.Stop()

  25. Stopping robot driving • Remove “Calculate” activity and “Console” service

  26. Stopping robot driving • Add a “If” activity

  27. Stopping robot driving • Connect the notification point of “SPL Engine” to the input point of “If” activity

  28. Stopping robot driving • Select “LRFNotify” item from the list

  29. Stopping robot driving • Click textbox in the “If” activity • Select “SensorData” item from the list

  30. Stopping robot driving • Type “.” • Select “DistanceMeasurements” item from the list

  31. Stopping robot driving • Type “[180] < 1000”

  32. Stopping robot driving • Add “Stop driving” diagram Add diagram

  33. Stopping robot driving • Connect the output point of “If” condition to the input point of “Data” activity

  34. Stopping robot driving • Save and run diagram

  35. Stopping robot driving • Execution result Stop

  36. Avoiding obstacles

  37. Avoiding obstacles • Modify “Stop driving” diagram into “Turn 45 degrees” • Turn(45, 0.2)

  38. Avoiding obstacles • Add “Go forwards” diagram and connect them • Go(0.2)

  39. Avoiding obstacles • Save and run diagram

  40. Avoiding obstacles • Execution result

More Related