Bender

Pings

One of the cool things that I learned from the “Unofficial Propeller Expo West” was that Pings should have a cool-off time. Since their range is 3 meters, I figured that the round trip time is about 18ms for 3 meters. So I am going to try to add an 18-20ms delay between each call of a Ping to see if I stop getting false readings from echos.

Mike Green on the Parallax Forums sugested 60-100ms delays but I think that is overkill and probably too slow for my 5 Ping setup.

Darnit! I can’t belive I missed this one…

Quote:  Apology Accepted Captain Neider (lol) It’s a Star Wars Joke

…And then we get talking about the “tone of voice” within a text-only comment. Also, we are electronics people. What I meant to say was, “You’re talkin’ to my man all wrong, it’s the wrong tone --You do it again and I’ll stab you in the face with a soldering iron.”

 

 

That’s why I don’t ping

That’s why I don’t ping adjacent PINGS. just sticking a delay between pings works, but slows everything down. Ping opposite PINGS solves the problem and lets the PINGS run at full speed. slow moving robots are less critical here but faster moving robots c an easily overrun the speed of sound/reaction time window and still crash into things. I once built a pair of glasses with three SRF04s in them. One in the middle and one on each side, aimed about 45 degrees.The idea was to see how effective sonar glasses could be for vision impaired people. Naturally, I was the test subject. One of the things I discovered was that it was impossible to walk at normal walking speed because my reaction time plus the time it took to stop often exceeded the range of the sonar units. if I slowed down a bit I could avoid pretty much everything in my path. I also walked into a lot of parked cars cuz you have to do a lot more physical panning and tilting of your head and that’s not a natural thing to do. We humans have a wide field of vision that allows us to take in quite a bit without turning our heads much.

Anyway, I try not to introduce extra timing in sonar sweeps to avoid the possibility of overrunning them.

I always loved that line.

I finally got to use it. lol

Skype me!

Bender  is now skype enabled. instead of having to run RealVNC, a separate web server for the camera, and a control program, I can just call the robot with skype and my VB connector and have joystick control of Bender from anywhere on the internet.

That is absolutely awsome!I

That is absolutely awsome!

I wish I had your knowlege to that with my robots. I wouldn’t where to start on such a link.

Skype API in VB.net

Nere is a little code that looks for a command and reacts to it. It is written in VB.net 2010. To test it, you’ll need Skype on two computers connected on the interent. In my case, my desktop and Bender

Running VB from the robot (or remote computer) create a new VB project and cut and paste the code below into it’s main form

Don’t forget to reference the Skyp4Com object in 'add reference’

Run it

from your desktop, connect to the remote

In the chatbox type one of the commands (Hint: look through the code for the process command method) For example !who should give you my name, !help will say no help etc.

$xx are sequences intended to be sent to the robot

$f would cause an ‘f’ to be sent to Bender

VB expresess 2010 is a free download from Microsoft.

If you run this, you wil realize just how easy it is to integrate Skype control into your robot.

==============================================================

Public Class Form1
    Public WithEvents oSkype As New SKYPE4COMLib.Skype

    Private Const robotName = “Bender”
    Private Const trigger = “!” ’ Say !help
    Private Const robotTrigger = “$” ’ Say $f

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        oSkype.Attach(7, False)

    End Sub
 
    Private Sub skype_MessageStatus(ByVal msg As SKYPE4COMLib.ChatMessage,
                         ByVal status As SKYPE4COMLib.TChatMessageStatus) Handles oSkype.MessageStatus
        Dim command As String
        Dim robot As String

        ’ Proceed only if the incoming message is a trigger
        If msg.Body.IndexOf(trigger) = 0 Then

            ’ Remove trigger string and make lower case
            command = msg.Body.Remove(0, trigger.Length).ToLower()

            ’ Send processed message back to skype chat window
            oSkype.SendMessage(msg.Sender.Handle, robotName + " Says: " + ProcessCommand(command))

        End If

        ’ Proceed only if the incoming message is a command to the robot
        If msg.Body.IndexOf(robotTrigger) = 0 Then

            ’ Remove trigger string and make lower case
            robot = msg.Body.Remove(0, robotTrigger.Length).ToLower()

            ’ Send processed message back to skype chat window
            oSkype.SendMessage(msg.Sender.Handle, robotName + " Responds to: " + ProcessCommandToRobot(robot))

        End If
    End Sub
    Private Function ProcessCommandToRobot(ByVal str As String)
        Dim result As String
        Dim robotCommand As String
           Select str

            Case “f”
                robotCommand = “f”
                result = “Forward”

            Case “b”
                robotCommand = “b”
                result = “Reverse”

            Case “r”
                robotCommand = “r”
                result = “Right”

            Case “l”
                robotCommand = “l”
                result = “Left”

            Case “vr”
                robotCommand = “vr”
                result = “Veer Right”

            Case “vl”
                robotCommand = “vl”
                result = “Veer Left”
            Case “s”
                robotCommand = " "
                result = “Stop”


        End Select
’SendCommandToRobot(robotCommand) ’ not written yet
        Return result
    End Function


    Private Function ProcessCommand(ByVal str As String)
        Dim result As String

        Select Case str

            Case “hello”
                result = “Hello!”

            Case Is = “help”
                result = “Sorry no help available”

            Case “date”
                result = "Current Date is: " +
                         DateTime.Now.ToLongDateString()

            Case “time”
                result = "Current Time is: " + DateTime.Now.ToLongTimeString()


            Case “who”
                result = "It is David, aka dlevartt " +
                         “who wrote this program”

            Case Else
                result = “Sorry, I do not recognize your command”

        End Select

        Return result
    End Function

End Class


Cool

You is the man! I didn’t get into VB much yet so I only used it only for the videostream. I’m definatly going to try this! Thanks for posting the code!

Skype Interface Update

Got the robot (server) module working. Basically a merging of wTerm (serial terminal application) and the code above. It requires Skype to be running and when it sees a command meant for the robot, IE ($f for forward), it sends a sequence to the robot to execute the appropriate action. Still needs some refinement. Uses a config file for comm parameters. Going to add functionality to use the config file to define the sequence sent to the robot. Haven’t started on the client front end yet, that’ll wait until I get the server part the way I want it.

CONTACT INFO

Hey ,  

I love this thing and I would like to contact you to get more information about it.

I am attending Rutgers University and will be working on a similar project.

Please let me know


selekumur @ gmail . com

Thank You


if everyone did that, there

if everyone did that, there would be no letsmakerobots.com

Please do keep it public, so we all can learn, make spin offs etc.

Thanks.

beenon vacation

Yellowstone, Elk, Bison, Snow. Sorry, no bear sitings. Had a wonderful time. nice break from robots.

I’m with fritsl on this

I have no problem collaborating on robot projects, but I don’t have the time to design someone’s homework. I may be wrong and if so apologize in advance but the request sounds suspiciously like a student unwilling to do the legwork for something they will undoubtedly take full credit for.

Since everything about bender is published here, with the exception of some of the software that ties it all together, anyone on this site should be able to surpass Bender’s specs based on what has already been published. All the components are listed. 

Now if you want to talk about bender or robots in general, comment on this thread or start a new one. I’ll be happy to chime in when I think I can add something constructive to it.

robocup ieee 802.11 a

you could add an arm and make it a perfect bot!

also can you use this bot for robocups?