Difference between revisions of "HS Summer2018"

From class_wiki
Jump to: navigation, search
(Schedule)
(Schedule)
 
(90 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 +
Shortened URL of this page: [https://goo.gl/GPG8X9 goo.gl/GPG8X9]
  
 
==Schedule==
 
==Schedule==
  
 
{| class="wikitable" border="0" cellpadding="5"  
 
{| class="wikitable" border="0" cellpadding="5"  
!width="10%"|
+
!width="20%"|
!width="90%"|
+
!width="80%"|
 
|-
 
|-
|valign="top"|'''Week 1: June 18-22'''
+
|valign="top"|'''Week 1: June 18-22 -- Introduction/background'''
|Introduction
+
|
 +
* Spencer lab tours
 +
* Introduction to Warthog, trail-following
 +
* Reinforcement learning vs. imitation learning
 +
* Unity and the strawberries 'n' trees obstacle avoidance world
 
|-
 
|-
|valign="top"|'''Week 2: June 25-29'''
+
|valign="top"|'''Week 2: June 25-29 -- Building'''
|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
|
 +
* Monday
 +
** ROS joystick listener node called "bumbersnoot_boss" created
 +
** Changed Jetson hostname to bumbersnoot
 +
** Verified that new, long M2.5 screws fit into XL-320 servo horn
 +
** Ordered micro-USB hub and correct power+data SATA cable for SSD (arrives Wednesday)
 +
** Got Dynamixel XL-320 to move!  Power switch was in wrong position? Should be to LEFT as you look at switch end of board.  Got GUI and position control from [http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/ here] working; velocity control still no go
 +
* Tuesday
 +
** Figured out mapping of joystick buttons to their indices into buttons array
 +
** Made some plans about modes and capabilities of training/testing program (written on whiteboard)
 +
** Started integrating Dynamixel includes and package depends into listener program.  Now callback is executed when dynamixel/XL message arrives. 
 +
** Assigned unique ID to each XL-320 using manager GUI: 10, 20, 30, 40. Now they all can be seen.  multi_port was not the answer -- this is how you deal with multiple USB devices, not multiple servos on one USB controller
 +
** Started integrating position controller example into bumbersnoot_boss
 +
* Wednesday
 +
** Basic velocity control of all servos in bumbersnoot_boss is working. 0-1023 maps to percent of max speed in CCW direction, 1024-2047 is same thing in CW direction. Make sure to set torque off before ending program
 +
** Basic joystick control of servo velocities: all forward/backward proportional to left joystick up/down
 +
** Ordered 5 x 190 mm cables for XL-320 -- current ones are 110 mm
 +
* Thursday
 +
** Buttons, logic for logging start/stop.  Independent control of left and right side motors, check to ensure not spinning in place
 +
** Attached micro-USB hub, verified that keyboard, mouse, and CM9.04C can be used through it.  Plugged RealSense into main USB at the same time and it works. OK, no more remote login from laila!!!
 +
** Added 500 Gb SSD for mass storage, mounted at /data
 +
** Installed emacs
 +
** Integrated RealSense capture code into bumbersnoot_boss and verified that it runs (but no image saving yet)
 
|-
 
|-
|valign="top"|'''Week 3: July 2-6'''
+
|valign="top"|'''Week 3: July 2-6 -- Building'''
|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  
+
|
 +
* Monday
 +
** Finished adapting servos to big Lego tires
 +
** Mounted servos on rails/brackets to make chassis prototype, verified that driving works
 +
* Tuesday
 +
** Reduced diameter of servo->Lego wheel adapter to reduce weight and give clearance for mounting screws
 +
* Thursday 
 +
** Chassis frame pretty much done; motor mounts strengthened with aluminum U-channel
 +
** RealSense: saving RGB, depth images using ROS wrapper with subscription, linked to start/stop logging
 +
** RealSense preview windows for both RGB and depth. Colormap would be nice for depth
 +
** Logs with timestamps, directory creation done
 +
** Camera mount will look a lot like Warthog -- inverted U over center of chassis
 +
* Friday
 +
** Jetson powered by RAVPower battery!  Tip fits, running on 19V, boots nicely.  Realsense-viewer runs fine.  
 +
** Followed these instructions for Wi Fi direct successfully: [https://devtalk.nvidia.com/default/topic/1017913/jetson-tx2/jetson-tx2-can-not-communicate-with-android-clients-using-wifi-direct/].  But got further by turning on Wi-Fi hotspot on Android phone, then connecting from Jetson.  Was able to SSH onto Jetson from phone...just a question of what needs to be set up with a monitor/keyboard attached to Jetson and what can be launched from phone.
 +
* Saturday
 +
** Finalized wheel mounts, got RealSense attached
 +
 
 
|-
 
|-
|valign="top"|'''Week 4: July 9-13'''
+
|valign="top"|'''Week 4: July 9-13 -- Building goes to extra time'''
|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
|
 +
* Monday
 +
** RealSense reduced size before saving
 +
** Working on getting chassis + CM9.04C + motor batteries + RAVPower mounting in some kind of harmony.  Lots of fiddling.
 +
* Tuesday
 +
** Preliminary work on dealing with the fact that RGB and depth images are not synchronized
 +
** First time Jetson, SSD, CM9.04C, motor batteries, RAVPower all integrated -- we have a robot!  First driving tests around the lab...this thing can actually move!  But...
 +
*** Wheels a bit wobbly -- looks like servo hub to white plastic piece connection screws tend to get loose.  Tried re-tightening and SUPERGLUING right rear wheel to make this connection bulletproof.  Left to cure overnight
 +
*** Something about current two-joystick command feels unnatural.  Turn limitation seems excessive.  Joystick handling needs to be tinkered with
 +
* Wednesday
 +
** Remounted right rear wheel after glue dried; also used threadlock on screws connecting tire to white piece.  Seems like a stronger connection -- time will tell.  Will glue other three wheels before I leave today
 +
** Cleaned up cable routing with lots of zip ties
 +
** Adjusted motor battery mounting to get better clearance.  But also added "shield" to protect CM9.04C from anything under the robot.  This reduces clearance relative to new motor battery mounts by about 0.5 inches.  But shield also allows the robot to sit securely on a box with wheels off the floor for testing.
 +
* Thursday
 +
** After glue dried on servo hubs, remounted wheels.  Spinning has become fritzy -- over-torque alarm/shutdown happening periodically even when wheels aren't on ground.  Sanded to reduce friction, same problem.  Added WD-40, same problem.  Added code to limit accelerations, same problem. Last try putting down on the floor, robot moves so slowly and then craps out after 3 feet.  Executive decision made that XL-320 motors were not up to the task and stripped them and CM9.04C board and batteries off the robot. We shall never speak of them again
 +
** Figured out a hack to connect MX-106T servo hub to Lego wheel with just screws and washers
 +
* Friday
 +
**  Got 5 x MX-106T servos prepped (had to strip pan-tilt head on Warthog), connected to USB2Dynamixel, powered from adjustable voltage adapter.  Modified bossMain to not assume the servos which must not be named, found 4 out of the 5 servos on scan -- not sure what the 5th one's deal is.  Set ID of each of the cooperative 4 so we can address with constants.  Got them into wheel mode and moving with joystick commands, although I would say there seems to be some latency somewhere in the pipeline.  All in all, a good morning's work.  
 +
** Improved alignment of servo-wheel connection, got other three servos connected to wheels
 
|-
 
|-
|valign="top"|'''Week 5: July 16-20'''
+
|valign="top"|'''Week 5: July 16-20 -- Driving tests/data collection...teaching?'''
|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
|
 +
* Monday
 +
** Attached wheels/servos to new U-channels, integrated into robot body
 +
** Attached USB2Dynamixel to chassis
 +
* Tuesday
 +
** Verified reduction in latency in joystick->motor connection by only sending motor commands if they are DIFFERENT from previous
 +
** Charged 11.1V LiPo motor batteries in balancing mode.  Manually stopped when they reached 12V
 +
* Wednesday
 +
** Acquired male Deans T plug adapter to plug into motor battery.  Extended to Dynamixel 3-pin connector
 +
** Whipped up plastic motor battery shelf (with slot for hold-down strap) / USB2Dynamixel "shield"
 +
** Verified that robot can be driven with new servos and battery.  Yay!
 +
* Thursday
 +
** Kept working on logging: LEDs on motors illuminated when logging, timestamps, motor status, changed logging rate to 15 Hz
 +
* To do
 +
** Lossless depth image logging, logging labels
 +
** Preliminary data collection dry runs on atrium floor: (1) drive forward, stop before collision, (2) back up when starting too close to obstacle, (3) drive forward and go around obstacle.
 +
** Audio through PS4 controller-attached headphones?  Maybe branch of ds4drv supports: [https://github.com/chrippa/ds4drv/pull/80]
 +
** Remount servos with 40mm M2.5 screws
 
|-
 
|-
|valign="top"|'''Week 6: July 23-27'''  
+
|valign="top"|'''Week 6: July 23-27-- Teaching/learning'''  
|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
|
 +
* Thursday
 +
** Got motor control based on x coord of center of mass of all detections going.  Basically, one side always goes full speed, other side goes slower to turn. Found that turning wasn't strong enough, so changed relationship between pixel offset and motor speeds by squaring
 +
* Friday
 +
** Implemented command history buffer, averaging for smoother output
 +
** Logged detection images with box overlay + vertical lines indicating history of detections + averaged history (aka smoothed command)
 +
** 3 test runs, two in atrium, one outside. After first, realized that 10 fps logging of 640 x 480 images while doing detection was causing major lags, so knocked that down to 1 fps logging (even though control loop is still 10 fps). Final two tests good, although robot is really pokey
 
|-
 
|-
|valign="top"|'''Week 7: July 30-August 3'''
+
|valign="top"|'''Week 7: July 30-August 3 -- Write-up and presentation prep'''
|Write-up and presentation prep
+
|
 
|}
 
|}
  
==Parts on hand==
+
==Miscellaneous topics==
 +
 
 +
* Deep neural networks
 +
* Unity, ML-Agents
 +
* Reinforcement learning, imitation learning
 +
* Dynamixels
 +
** [http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/#introduction Dynamixel workbench]
 +
** [https://www.servocity.com/servo-spline-info Servo spline sizes]
 +
* RealSense
 +
* Jetson
 +
** [https://github.com/NVIDIA-Jetson/turtlebot3 Turtlebot3]
 +
** [http://www.jetsonhacks.com/ Jetson hacks]
 +
** [http://www.jetsonhacks.com/2017/03/02/daniel-tobias-car-cherry-autonomous-racecar/ Racecar]
 +
** [https://github.com/NVIDIA-Jetson/redtail Birchfield drone trail following]
 +
** [https://diyrobocars.com/ DIY robot cars], [http://fast.scripts.mit.edu/racecar/hardware/ MIT racecar]
 +
* OpenCV
 +
* TensorFlow
 +
* Obstacle avoidance, motion planning
 +
* Trail following, Warthog
 +
* C++ vs. C# vs. Java
 +
* Linux
 +
 
 +
==Parts==
 +
 
 +
===On hand===
 +
 
 +
* Jetson TX2 dev kit
 +
* RealSense D435 depth camera
 +
* 4 x Dynamixel MX-106T servo
 +
* 4-port micro-USB hub
 +
* Monitor, HDMI cable
 +
* Jetson battery (RAVPower 23000mAh in 19V mode).  Others considered: [https://devtalk.nvidia.com/default/topic/1006369/jetson-tx2/power-requirement-for-jetson-tx2-development-board/2], [https://github.com/datlife/jetson-car/blob/master/docs/setup/README.md]
 +
* 2 x 3300mAh, 11.1V LiPo battery (Floureon) with Deans T plug connector.  Used for motors one at a time
 +
* Tenergy TB6B LiPo battery charger.  Connect with both connectors, put in balance mode with 2A charge rate, stop at 12V
 +
 
 +
===Not being used===
 +
 
 +
* Jetson enclosure -- good size, a little heavy (metal)...should install before moving outside
 +
* 4-port USB hub (full-size)
 +
* Robotis
 +
** 5 x XL-320 servo
 +
** Dream 2 kit (includes small rubber wheels)
 +
** 2 x Li-ion battery LB-041, 2 x charger LBB-041
 +
** 4 x Li-ion battery LB-040, 2 x charger LBB-040
 +
** 2 x OpenCM9.04C controller board
 +
 
 +
===Needed===
  
* 2 x Robotis Li-ion battery charger set LBB-041
+
* NOTHING ATM

Latest revision as of 13:01, 27 July 2018

Shortened URL of this page: goo.gl/GPG8X9

Schedule

Week 1: June 18-22 -- Introduction/background
  • Spencer lab tours
  • Introduction to Warthog, trail-following
  • Reinforcement learning vs. imitation learning
  • Unity and the strawberries 'n' trees obstacle avoidance world
Week 2: June 25-29 -- Building
  • Monday
    • ROS joystick listener node called "bumbersnoot_boss" created
    • Changed Jetson hostname to bumbersnoot
    • Verified that new, long M2.5 screws fit into XL-320 servo horn
    • Ordered micro-USB hub and correct power+data SATA cable for SSD (arrives Wednesday)
    • Got Dynamixel XL-320 to move! Power switch was in wrong position? Should be to LEFT as you look at switch end of board. Got GUI and position control from here working; velocity control still no go
  • Tuesday
    • Figured out mapping of joystick buttons to their indices into buttons array
    • Made some plans about modes and capabilities of training/testing program (written on whiteboard)
    • Started integrating Dynamixel includes and package depends into listener program. Now callback is executed when dynamixel/XL message arrives.
    • Assigned unique ID to each XL-320 using manager GUI: 10, 20, 30, 40. Now they all can be seen. multi_port was not the answer -- this is how you deal with multiple USB devices, not multiple servos on one USB controller
    • Started integrating position controller example into bumbersnoot_boss
  • Wednesday
    • Basic velocity control of all servos in bumbersnoot_boss is working. 0-1023 maps to percent of max speed in CCW direction, 1024-2047 is same thing in CW direction. Make sure to set torque off before ending program
    • Basic joystick control of servo velocities: all forward/backward proportional to left joystick up/down
    • Ordered 5 x 190 mm cables for XL-320 -- current ones are 110 mm
  • Thursday
    • Buttons, logic for logging start/stop. Independent control of left and right side motors, check to ensure not spinning in place
    • Attached micro-USB hub, verified that keyboard, mouse, and CM9.04C can be used through it. Plugged RealSense into main USB at the same time and it works. OK, no more remote login from laila!!!
    • Added 500 Gb SSD for mass storage, mounted at /data
    • Installed emacs
    • Integrated RealSense capture code into bumbersnoot_boss and verified that it runs (but no image saving yet)
Week 3: July 2-6 -- Building
  • Monday
    • Finished adapting servos to big Lego tires
    • Mounted servos on rails/brackets to make chassis prototype, verified that driving works
  • Tuesday
    • Reduced diameter of servo->Lego wheel adapter to reduce weight and give clearance for mounting screws
  • Thursday
    • Chassis frame pretty much done; motor mounts strengthened with aluminum U-channel
    • RealSense: saving RGB, depth images using ROS wrapper with subscription, linked to start/stop logging
    • RealSense preview windows for both RGB and depth. Colormap would be nice for depth
    • Logs with timestamps, directory creation done
    • Camera mount will look a lot like Warthog -- inverted U over center of chassis
  • Friday
    • Jetson powered by RAVPower battery! Tip fits, running on 19V, boots nicely. Realsense-viewer runs fine.
    • Followed these instructions for Wi Fi direct successfully: [1]. But got further by turning on Wi-Fi hotspot on Android phone, then connecting from Jetson. Was able to SSH onto Jetson from phone...just a question of what needs to be set up with a monitor/keyboard attached to Jetson and what can be launched from phone.
  • Saturday
    • Finalized wheel mounts, got RealSense attached
Week 4: July 9-13 -- Building goes to extra time
  • Monday
    • RealSense reduced size before saving
    • Working on getting chassis + CM9.04C + motor batteries + RAVPower mounting in some kind of harmony. Lots of fiddling.
  • Tuesday
    • Preliminary work on dealing with the fact that RGB and depth images are not synchronized
    • First time Jetson, SSD, CM9.04C, motor batteries, RAVPower all integrated -- we have a robot! First driving tests around the lab...this thing can actually move! But...
      • Wheels a bit wobbly -- looks like servo hub to white plastic piece connection screws tend to get loose. Tried re-tightening and SUPERGLUING right rear wheel to make this connection bulletproof. Left to cure overnight
      • Something about current two-joystick command feels unnatural. Turn limitation seems excessive. Joystick handling needs to be tinkered with
  • Wednesday
    • Remounted right rear wheel after glue dried; also used threadlock on screws connecting tire to white piece. Seems like a stronger connection -- time will tell. Will glue other three wheels before I leave today
    • Cleaned up cable routing with lots of zip ties
    • Adjusted motor battery mounting to get better clearance. But also added "shield" to protect CM9.04C from anything under the robot. This reduces clearance relative to new motor battery mounts by about 0.5 inches. But shield also allows the robot to sit securely on a box with wheels off the floor for testing.
  • Thursday
    • After glue dried on servo hubs, remounted wheels. Spinning has become fritzy -- over-torque alarm/shutdown happening periodically even when wheels aren't on ground. Sanded to reduce friction, same problem. Added WD-40, same problem. Added code to limit accelerations, same problem. Last try putting down on the floor, robot moves so slowly and then craps out after 3 feet. Executive decision made that XL-320 motors were not up to the task and stripped them and CM9.04C board and batteries off the robot. We shall never speak of them again
    • Figured out a hack to connect MX-106T servo hub to Lego wheel with just screws and washers
  • Friday
    • Got 5 x MX-106T servos prepped (had to strip pan-tilt head on Warthog), connected to USB2Dynamixel, powered from adjustable voltage adapter. Modified bossMain to not assume the servos which must not be named, found 4 out of the 5 servos on scan -- not sure what the 5th one's deal is. Set ID of each of the cooperative 4 so we can address with constants. Got them into wheel mode and moving with joystick commands, although I would say there seems to be some latency somewhere in the pipeline. All in all, a good morning's work.
    • Improved alignment of servo-wheel connection, got other three servos connected to wheels
Week 5: July 16-20 -- Driving tests/data collection...teaching?
  • Monday
    • Attached wheels/servos to new U-channels, integrated into robot body
    • Attached USB2Dynamixel to chassis
  • Tuesday
    • Verified reduction in latency in joystick->motor connection by only sending motor commands if they are DIFFERENT from previous
    • Charged 11.1V LiPo motor batteries in balancing mode. Manually stopped when they reached 12V
  • Wednesday
    • Acquired male Deans T plug adapter to plug into motor battery. Extended to Dynamixel 3-pin connector
    • Whipped up plastic motor battery shelf (with slot for hold-down strap) / USB2Dynamixel "shield"
    • Verified that robot can be driven with new servos and battery. Yay!
  • Thursday
    • Kept working on logging: LEDs on motors illuminated when logging, timestamps, motor status, changed logging rate to 15 Hz
  • To do:
    • Lossless depth image logging, logging labels
    • Preliminary data collection dry runs on atrium floor: (1) drive forward, stop before collision, (2) back up when starting too close to obstacle, (3) drive forward and go around obstacle.
    • Audio through PS4 controller-attached headphones? Maybe branch of ds4drv supports: [2]
    • Remount servos with 40mm M2.5 screws
Week 6: July 23-27-- Teaching/learning
  • Thursday
    • Got motor control based on x coord of center of mass of all detections going. Basically, one side always goes full speed, other side goes slower to turn. Found that turning wasn't strong enough, so changed relationship between pixel offset and motor speeds by squaring
  • Friday
    • Implemented command history buffer, averaging for smoother output
    • Logged detection images with box overlay + vertical lines indicating history of detections + averaged history (aka smoothed command)
    • 3 test runs, two in atrium, one outside. After first, realized that 10 fps logging of 640 x 480 images while doing detection was causing major lags, so knocked that down to 1 fps logging (even though control loop is still 10 fps). Final two tests good, although robot is really pokey
Week 7: July 30-August 3 -- Write-up and presentation prep

Miscellaneous topics

Parts

On hand

  • Jetson TX2 dev kit
  • RealSense D435 depth camera
  • 4 x Dynamixel MX-106T servo
  • 4-port micro-USB hub
  • Monitor, HDMI cable
  • Jetson battery (RAVPower 23000mAh in 19V mode). Others considered: [3], [4]
  • 2 x 3300mAh, 11.1V LiPo battery (Floureon) with Deans T plug connector. Used for motors one at a time
  • Tenergy TB6B LiPo battery charger. Connect with both connectors, put in balance mode with 2A charge rate, stop at 12V

Not being used

  • Jetson enclosure -- good size, a little heavy (metal)...should install before moving outside
  • 4-port USB hub (full-size)
  • Robotis
    • 5 x XL-320 servo
    • Dream 2 kit (includes small rubber wheels)
    • 2 x Li-ion battery LB-041, 2 x charger LBB-041
    • 4 x Li-ion battery LB-040, 2 x charger LBB-040
    • 2 x OpenCM9.04C controller board

Needed

  • NOTHING ATM