Shop OBEX P1 Docs P2 Docs Learn Events
Robotic Boat Platform - Test Run in Lake Tahoe — Parallax Forums

Robotic Boat Platform - Test Run in Lake Tahoe

Ken GraceyKen Gracey Posts: 7,386
edited 2018-02-15 06:54 in Customer Projects

Comments

  • Nicely done!
  • Very nice! It's great to hear that Blockly Prop can be used for real applications. It isn't just a toy language for learning.
  • Awesome project !!!
    I'm waiting to see details for the GPS navigation and the environmental measurements!!!
  • Looks like a great sea trial! I agree with David, I like that you're showing Blockly can be used for something outside the classroom since Parallax is focusing so much on it right now. I'll really look forward to any GPS implementation as well, because I'm going to try working on that with some drones in the near future.
  • Nicely executed, Ken! Looks like really solid construction. I'm working on a similar project with a friend of mine. We have to use paddlewheels, though, instead of the Blue Robotics thrusters, due to the amount of floating/suspended seaweed in the local saltwater. We'll probably just strap everything to a boogie board to start with.

    Perhaps we can trade notes on the GPS nav. My attempts awhile back were not entirely successful. Wind and tide can really play havoc in trying to keep an ASV (autonomous surface vehicle) on track. I used the throttle setting on the RC transmitter to select between radio control and GPS control. It proved helpful when things went awry, and I had to bring the craft home.

    -Phil
  • Perhaps we can trade notes on the GPS nav. My attempts awhile back were not entirely successful. Wind and tide can really play havoc in trying to keep an ASV (autonomous surface vehicle) on track. I used the throttle setting on the RC transmitter to select between radio control and GPS control. It proved helpful when things went awry, and I had to bring the craft home.
    -Phil

    Absolutely. I'm going to need a lot of help in my Blockly-only world with this aspect of the project. We just added some new blocks which could empower people like myself with the GPS sensor. I don't really know where to start, but I'm hoping to make it simple enough to understand. Maybe I omit the trigonometry and assume we live on a square grid, or something along those lines. I really don't know what the issues are at this stage.

    Carol Hazlett has a bunch of experience with this, too. As she says "it's all stuck in the Arduino programs and needs to be moved to Blockly" so she'll be on-board too.

    Phil, this platform is a beast. There's nothing quite like it. Of course it costs a few thousand dollars, but it's made by a customer of ours here http://www.manifoldrobotics.com/

    I've been aiming to get on this project forever and have not accomplished anything until the last couple of days.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2018-02-15 20:37
    Ken,

    Attached is my ASV program. (I hope it doesn't scare you!) Absent the actual guidance, data recording, and photography, the objects that will probably be most helpful to you are RealGPS and GPSMath.

    GPSMath lets you navigate on a square grid. It does require trig, though, but that's unavoidable.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2018-02-15 23:39
    Here's a copy of GPSMath with better comments:
    CON
    
      SINE          = $e000
    
    OBJ
    
     u      : "umath"
    
    PUB distance_m(lat0, long0, lat1, long1) | dx, dy
    
      'Arguments are in millionths of a degree.
      'Returns distance in whole meters between latlong0 and latlong1.
    
      dy := lat1 - lat0
      dx := (long1 - long0) * cos(lat0 / 100_000) / 10_000
      return u.multdiv(^^(dx * dx + dy * dy),  111_319, 1_000_000)
    
    PUB distance_mm(lat0, long0, lat1, long1) | dx, dy
    
      'Arguments are in millionths of a degree.
      'Returns distance in whole millimeters between latlong0 and latlong1.
    
      dy := lat1 - lat0
      dx := (long1 - long0) * cos(lat0 / 100_000) / 10_000
      return u.multdiv(^^(dx * dx + dy * dy),  111_319, 1_000)
    
    PUB distance_cm(lat0, long0, lat1, long1) | dx, dy
    
      'Arguments are in millionths of a degree.
      'Returns distance in whole centimeters between latlong0 and latlong1.
    
      dy := lat1 - lat0
      dx := (long1 - long0) * cos(lat0 / 100_000) / 10_000
      return u.multdiv(^^(dx * dx + dy * dy),  111_319, 10_000)
    
    PUB bearing(lat0, long0, lat1, long1) | dx, dy
    
      'Arguments are in millionths of a degree.
      'Returns bearing from latlong0 to latlong1 in tenths of a degree.
    
      dy := lat1 - lat0
      dx := (long1 - long0) * cos(lat0 / 100_000) / 10_000
      result := 900 - atan2(dy, dx)
      repeat while result < 0
        result += 3600
      result //= 3600
    
    PUB degminsec2deg(degrees, minutes, second_hundredths)
    
      'Arguments are in whole degrees, whole minutes, and hundredths of a second.
      'Return value is in degrees * 1_000_000.
    
      return degrees * 1_000_000 + minutes * 100_000 / 6 + second_hundredths * 100 / 36
    
    PUB degmin2deg (degrees, minute_hundred_thousandths)
    
      'Arguments are whole degrees, minutes * 100_000.
      'Return value is in degrees * 1_000_000.
    
      return degrees * 1_000_000 + minute_hundred_thousandths / 6
    
    PUB cos(x)
    
      'Argument x is in tenths of a degree.
    
      return sin(x + 900)
    
    PUB sin(x) : value
    
      'Argument x is in tenths of a degree.
    
      x := x * $2000 / 3600
    
      if (x & $fff == $800)
        value := $1_0000
      elseif (x & $800)
        value := word[SINE][-x & $7ff]
      else
        value := word[SINE][x & $7ff]
      if (x & $1000)
        value := -value
      value := (value * 10_000) ~> 16
    
    PUB atan2(y, x) : a | negate, i, da, dx, dy
    
      'CORDIC atan2 algorithm
      '
      'Arguments are in any identcally-scaled units.
      'Hypotenuse of x,y must be within ±1_300_000_000 to avoid overflow
      'Return value is in tenths of a degree between -1800 and 1799.
    
      i := 29 - >|(||x #> ||y)    'Make the arguments as large as possible.
      if (i > 0)
        x <<= i
        y <<= i
         
      a~    
      negate := x < 0             'check quadrant 2 | 3                        
       
      if negate                   'if quadrant 2 | 3, (may be outside ±106° convergence range)                                                                 
        a += $80000000            '..add 180 degrees to angle
        -x                        '..negate x
        -y                        '..negate y
    
      repeat i from 0 to 26       'do CORDIC iterations (27 is optimal for 32-bit values)
        da := corlut[i]
        dx := y ~> i
        dy := x ~> i
    
        negate := y < 0           'if atan2 mode, drive y towards 0
    
        if negate
          -da
          -dx
          -dy
    
        a += da
        x += dx
        y -= dy
    
      a := (((a ~> 16) * 3600) ~> 16) 'Convert to tenths of a degree.
    
    PUB error_angle(angle)
    
      'Argument is in thenths of a degree.
      'Result is the same angle translated to lie between -1800 and 1800.
    
      result := angle
      repeat while (result > 1800)
        result -= 3600
      repeat while (result < -1800)
        result += 3600
    
    PUB compass_angle(angle)
    
      'Computes compass angle (North = 0, increasing clockwise.) from
      'trig angle (East = 0, increasing counter-clockwise).
      'Units are tenths of a degree.
    
      result := angle
      repeat while result > 3600
        result -= 3600
      repeat while result < 0
        result += 3600
    
    DAT
    
    corlut        long $20000000    'CORDIC angle lookup table
                  long $12E4051E
                  long $09FB385B
                  long $051111D4
                  long $028B0D43
                  long $0145D7E1
                  long $00A2F61E
                  long $00517C55
                  long $0028BE53
                  long $00145F2F
                  long $000A2F98
                  long $000517CC
                  long $00028BE6
                  long $000145F3
                  long $0000A2FA
                  long $0000517D
                  long $000028BE
                  long $0000145F
                  long $00000A30
                  long $00000518
                  long $0000028C
                  long $00000146
                  long $000000A3
                  long $00000051
                  long $00000029
                  long $00000014
                  long $0000000A
    

    BTW, this code is only good for distances that are short relative to the Earth's radius.
  • Ken, I would like to know how the pontoons were built.
  • JDJD Posts: 570
    Nice looking boat Ken. The more information scientist and environmentalist have on the lake, the better they can understand what is going on and offer suggestions to keep it blue. CO2 and other greenhouse gases would be cool too I think.
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2018-02-16 02:14
    lardom wrote: »
    Ken, I would like to know how the pontoons were built.

    http://www.manifoldrobotics.com/

    They're welded 6061 aluminum (.060"), sheered and break for max strength with built-in pem nuts for the top plates. It's a super nicely-designed system. I ran into Jeffery Laut (the creator) a few years back at a course we were running in NYU (Brooklyn) and watched him go through several revisions before we purchased.
  • Awesome platform, looks very light, but very sturdy.
    Seems to handle the wake and waves very well, maybe a steady cam setup would be good though. :smile:

    Glad you could finally get something in the water. I know you've been wanting one of these for a while.

    I am going to check out the new Blockly GPS stuff, should make this stuff easy to do. More time playing, less time programming.

    Thanks for showing off your new boat.


    -Tommy

  • Robotic boat first, then robotic underwater ROV!
    You already have the underwater thrusters and Blocky control system!
  • The product already comes with ArduPilot and can be setup with missions guided by GPS.

    It would be simpler to interface the Propeller to the ArduPilot as this is easily done as a companion computer.

    It could then be told to move to a position on the lake and then take the samples. Then the propeller could tell the ArduPilot to go to the next waypoint and take another sample and so on.

    I have already done something like this and it works great.

    ArduPilot does all the heavy lifting that it was designed to do and you just tell it where to go.

    Mike
  • iseries wrote: »
    The product already comes with ArduPilot and can be setup with missions guided by GPS.

    It would be simpler to interface the Propeller to the ArduPilot as this is easily done as a companion computer.

    It could then be told to move to a position on the lake and then take the samples. Then the propeller could tell the ArduPilot- to go to the next waypoint and take another sample and so on.

    I have already done something like this and it works great.

    ArduPilot does all the heavy lifting that it was designed to do and you just tell it where to go.

    Mike

    Yes, I'm aware there is an easier way to do this. I'd like the series of steps to be demonstrated in BlocklyProp in a way that people could understand them. ArduPilot is an effective tool, but it's also a black box to our customers. I want them to look inside and understand a fully-documented, but simple system (if it's possible).

    We'll see what happens when I actually get into this effort. I've got a number of helpers on this forum including Phil Pilgrim, who is attempting the same project with Spin up in Port Townsend. We will likely connect this summer in a friendly competition to test out our efforts.

    Ken Gracey
  • I think it's now a requirement that you perform the figure 8 challenge with your boat. I do believe this was discussed and agreed upon by all of us watching the webinar today. :)

    Perhaps as a stepping stone to more advanced navigation in the future.
  • Roy Eltham wrote: »
    I think it's now a requirement that you perform the figure 8 challenge with your boat. I do believe this was discussed and agreed upon by all of us watching the webinar today. :)

    Perhaps as a stepping stone to more advanced navigation in the future.

    Now that would be great! Calculating continuous error correction for the wind!
    Jim
  • Here's a nice boat build using an Ardupilot and soon a companion computer.

    Mike

    https://discuss.ardupilot.org/t/leonardos-research-boat/27212
  • @Ken Gracey
    I wish you were my neighbor! I'd love to see all the neat gadgets you made that you don't post!
Sign In or Register to comment.