mikeferguson / stm32

stuff/garbage for the STM32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build a tablebot

mikeferguson opened this issue · comments

Components

  • Etherbotix, with MD-03 motor driver, Mini-IMU v5
  • 3 Cliff sensors (GP2Y0D805Z0F) on height adjustable bracket
  • Differential drive - QTY2 12v 30:1 200RPM motors
  • LD-06 Lidar
  • AX-12 servo to tilt lidar (mounted on left side to avoid interfering with the lidar cable)
  • 12V, 3Ah battery

Roadmap

  • Verify that laser works at high angle of incidence (just use ROS drivers)
  • Get laser driver working on Etherbotix, just fill in 360 degree polar map, send over ethernet, visualize on desktop
  • Design, 3d print and assemble physical chassis
  • Tune PID for motors, make sure we can travel a set distance
  • Tune odometry, make sure 90 degree turns are good
  • Tune cliff sensors
  • Phase 1A - drive straight until cliff sensors trigger, back up, turn 180, repeat
  • Add debugging data over ethernet: odometry pose estimate
  • Add visualization of debugging data
  • Get debugging data over wifi
  • Selection of phases using IMU
  • Get servo running
  • Phase 1B - put control loop around Y error to keep us more centered on the table
  • Phase 1C - Use laser to detect cliff ahead of time (so we can go faster)
  • Phase 1D - Use laser to detect the width of table and keep robot centered
  • Phase 2A - sweep laser and assemble scan
  • Phase 2B - find block in laser scan
  • Phase 2C - approach block and push off table
  • Phase 3A - find box using level laser
  • Phase 3B - change block target pose so that we can push block to goal even if it is off to side of table
  • Phase 3C - push block into box (behavior is present, but only works well if block is fairly closet to middle of table)
  • Physically rotate laser 180 degrees so that we can segment scans for block detection while moving (currently, discontinuity is in the front center, this would put it in the back). Also requires update to transform code in robot and viewer.

Open Issues

  • Bootloader won't boot after upload - requires a power cycle? Has gone away after fixing LD06 driver.
  • Need to add CRC to LD06 driver
  • Odometry is off - Y axis is inverted (we're fixing this by inverting Y in the struct unpack)
  • TIM12/PWM seems very off - is this actually up-down counting? That would explain the prescalar issue and also why the "40%" PWM drives laser so slow (check on scope if it is actually 40% or 20%) - nope, it checks out at 40% - no idea why we need to output 70% to get the proper rotation speed
  • Won't run without the ethernet cable plugged in

Known Issues

  • Can't receive packets bigger than MTU. They show up in Wireshark (which doesn't process checksums) but doesn't show up in python socket.recv() - still exists but packets are now broken up to be smaller than MTU

Tested laser using https://github.com/AlessioMorale/ld06_lidar:

  1. With laser about 4" above table surface, tilted 90 degrees down, it can see the full 4 ft length of my test table
  2. With laser about 4" above table surface, tilted about 90 degrees down, the unbounded cube appears clearly
    IMG_5248
  • Encoders are terminated, validated for ticks/rev
  • PWM output for lidar is correct frequency (29.8khz)
  • Lidar data is being received - need to implement CRC
  • Fully assembled and wired up
  • Cliff sensors validated - looks like they will work well
  • Current consumption with all components, but no motion is 267mA @ 12v (3.2W)

Phase 1 works - pure odometry + cliff sensors. Requires ethernet cable plugged in... need to still debug that.

Laser driver working, rendering in GUI
image