Asked — Edited
Resolved Resolved by thetechguru!

Ultrasound, Ping And Object Avoidancec On The Ezb-V3

Richard, would you know what script the Object Avoidance was for the v3. I have One PING unit with One sharp IR. . that's it. I just want to find that little algorythm.

I used to know this site like the palm of my hand. But, I have forgotten a lot in the last many years.

I am down to one robot, Sally. I finally scraped up enough to get some eyes. I have the voice programmed the way I want it. And, I have the base running smooth. All I need now are some avoidance so she doesn't look stupid and run into walls like me.

God Bless! :-) MovieMaker


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

#9  

Dave gave you a link to a tool to fix the uninstall in your other thread.

Alan

#11  

Anyone do multiple ultrasound sensors? If so how do keep track of all of them?

#12  

I have 5 on my inMoov.... of course they are pointed in different directions.... I write script(s) in order to utilize and coordinate them...

#13  

Interesting. Do you let InMoov move by it's own logic or do you control remotely?

#14  

@jackphillips1953 Both, I have written my inMoov project to support both... Depends what I want to it to do.... When I get an idea of what I want him to do, I sit down and write the scripts and or use the controls to accomplish it.... My programming is flexible when I write it...

#15  

how about sharing some of those scripts. I will take Rich's script and use it as a framework for expansion. Your scripts might help.

Thanks

#16  

@Mel.... I doubt it would help you very much.... You struggle even more than @nomad to understand ARC.... To my knowledge you are still not able to understand how to connect an ezb4 to your network?... You seem get confused a lot. Starting multiple threads on the same topic and asking the same questions over and over again.... Besides, my scripts are a) written for the ezb4 and b) are custom to my robot projects.... They would not translate to your robot without me re-writing them...

Saying that (since you asked) this is a very simple script I wrote that uses 3 pings and a motion sensor to keep my inMoov facing the person in front of him... When the person moves around in front of him he turns his head and body to keep facing the person... It won't help you very much as mention, though....


if ($location=1)
  $location=0
  halt()
endif

$location=1
servoSpeed(D22,2)
servospeed(D23,2)

repeatuntil(0)
  $motion=getdigital(D1) #PIR Detector
  if ($motion=1)
    $Lping=GetPing(D2,D2) 
    $Mping=GetPing(D3,D3)
    $Rping=GetPing(D4,D4)

    if ($Lping<$Mping and $Lping<$Rping)
      ServoRandom(D22,55,70)
      ServoRandom(D23,70,100)
      servo(V13,60)

    ELSEif ($Rping<$Mping and $Rping<$Lping)
      ServoRandom(D22,125,150)
      ServoRandom(D23,70,100)
      servo(V13,100)

    ELSE
      servo(V13,80)
      servo(D22,99)
      servo(D23,109)

    endif
      # SendSerial(D0,38400,0)

    print("Left ="+$Lping)
    print("Middle ="+$Mping)
    print("Right ="+$Rping)

    sleepRandom(1000,2000)

  ELSE
    servo(D22,99)
    servo(D23,100)
   # servo(V13,80)
    
    WaitForChange(getdigital(D1))
  endif
  print($motion)
ENDrepeatuntil