Difference between revisions of "HS Summer2018"

From class_wiki
Jump to: navigation, search
(Schedule)
(Schedule)
 
(32 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
|valign="top"|'''Week 1: June 18-22 -- Introduction/background'''
 
|valign="top"|'''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
 
|-
 
|-
 
|valign="top"|'''Week 2: June 25-29 -- Building'''
 
|valign="top"|'''Week 2: June 25-29 -- Building'''
Line 26: Line 30:
 
** Started integrating position controller example into bumbersnoot_boss  
 
** Started integrating position controller example into bumbersnoot_boss  
 
* Wednesday
 
* 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 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
* To do:
+
** Basic joystick control of servo velocities: all forward/backward proportional to left joystick up/down
** Basic joystick control of servo velocities
+
** Ordered 5 x 190 mm cables for XL-320 -- current ones are 110 mm
** Adapt servos to big Lego tires
+
* Thursday
** Mount servos on rails/brackets.   
+
** Buttons, logic for logging start/stopIndependent control of left and right side motors, check to ensure not spinning in place
** Integrate RealSense capture code into bumbersnoot_bossPreview window?
+
** 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 worksOK, no more remote login from laila!!!
** Add SSD for mass storage
+
** Added 500 Gb SSD for mass storage, mounted at /data
** Logs with timestamps, directory creation
+
** Installed emacs
** Can micro-USB port be used for keyboard/mouse?  Or powered USB hub to allow camera along with keyboard/mouse?
+
** Integrated RealSense capture code into bumbersnoot_boss and verified that it runs (but no image saving yet)
** Get longer cables for XL-320?
 
 
|-
 
|-
 
|valign="top"|'''Week 3: July 2-6 -- Building'''
 
|valign="top"|'''Week 3: July 2-6 -- Building'''
 
|
 
|
* To do: 
+
* Monday
** Continue working on chassis: how to mount Jetson, SSD, CM9.04C, batteries, and camera on it
+
** Finished adapting servos to big Lego tires
** Ad hoc wifi to connect to Jetson.  From phone...but Android does not support?  Wi Fi direct[https://devtalk.nvidia.com/default/topic/1017913/jetson-tx2/jetson-tx2-can-not-communicate-with-android-clients-using-wifi-direct/].  [https://askubuntu.com/questions/181751/stream-video-from-ubuntu-server-to-android-device Video streaming]?
+
** Mounted servos on rails/brackets to make chassis prototype, verified that driving works
** Jetson powered by battery: [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].  Should definitely try the ones left over from DRC
+
* Tuesday
** Imitation learning test from tripod-mounted camera
+
** 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 nicelyRealsense-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 -- Driving tests/data collection'''
+
|valign="top"|'''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
 
|-
 
|-
|valign="top"|'''Week 5: July 16-20 -- Teaching/learning'''
+
|valign="top"|'''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: [https://github.com/chrippa/ds4drv/pull/80]
 +
** Remount servos with 40mm M2.5 screws
 
|-
 
|-
 
|valign="top"|'''Week 6: July 23-27-- Teaching/learning'''  
 
|valign="top"|'''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
 
|-
 
|-
 
|valign="top"|'''Week 7: July 30-August 3 -- Write-up and presentation prep'''
 
|valign="top"|'''Week 7: July 30-August 3 -- Write-up and presentation prep'''
Line 86: Line 142:
 
* Jetson TX2 dev kit
 
* Jetson TX2 dev kit
 
* RealSense D435 depth camera
 
* RealSense D435 depth camera
* 4-port USB hub
+
* 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
 
* Robotis
 
** 5 x XL-320 servo
 
** 5 x XL-320 servo
 
** Dream 2 kit (includes small rubber wheels)
 
** Dream 2 kit (includes small rubber wheels)
 
** 2 x Li-ion battery LB-041, 2 x charger LBB-041
 
** 2 x Li-ion battery LB-041, 2 x charger LBB-041
** 3 x Li-ion battery LB-040 (one more back-ordered), 2 x charger LBB-040
+
** 4 x Li-ion battery LB-040, 2 x charger LBB-040
 
** 2 x OpenCM9.04C controller board
 
** 2 x OpenCM9.04C controller board
* Monitor, HDMI cable
 
  
 
===Needed===
 
===Needed===
  
* Jetson
+
* NOTHING ATM
** SSD drive connector, mini-USB hub (arriving 6/26)
 
** Battery
 
** Enclosure
 

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