2019:Programming: Difference between revisions

From 1511Wookiee
Jump to navigationJump to search
(fix formatting from last edit)
m (apparently incorrectly copy/pasted and didn't catch it until months later)
 
(16 intermediate revisions by 2 users not shown)
Line 2: Line 2:
= Outstanding Tasks =
= Outstanding Tasks =
<div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output">
<div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output">
<div class="mw-parser-output">
== Robot Code ==
== Robot Code ==


Line 7: Line 8:


*Feedback  
*Feedback  
**Bring over "editable" methods/code from last year (Josh)   
**Bring over "editable" methods/code from last year (Josh)  
*Main Robot  
**Read & send air pressure value    
**Add reset & process calls to all subsystems (Josh)  
*Main Robot (Josh or Kyle)  
**Add PCM IDs to iomap (Josh)   
**Setup Autonomous() to work properly - works like operatorcontrol()?    
*Game Pieces  
*Game Pieces (Kyle)
**Refine & finalize interface (Kyle)
**In feedback, set thunderdashboard_green to 1 if we have game pieces, some other value if we don't
**Implement (Kyle)    
**Change feedback sending to send over mode we are in and mode we want to be in. "Mode we are in" is based solely on sensors on cargo cylinders.    
*Cargo (Kyle)  
*Cargo (Kyle)  
**<s>Remove sensor use and change over entirely to current sensing, including for isCargoBeingHeld()</s>
**<s>Make intake/outtake speed constants at top of file</s>
**<s>Use iomap names for solenoid IDs</s>
**<s>Don't do current computations when motor is not running (and maybe also not when outtaking)</s>
**<s>When current limit is hit, stop motors (don't wait until next process() call)</s>
**<s>Remove commented out code if not needed</s>
**<s>canIntake is not initialized</s>
**<s>current should not be a class variable, it's only used in process()</s>
**<s>No reset() implementation -- this should set up the same as it did at startup</s>
**<s>Things in debug() need names - can't use "" empty string!</s> 
*Hatch (Kyle)  
*Hatch (Kyle)  
**<s>Change solenoid to use iomap addresses</s>
**<s>isHookUp is never set? Set in constructor and whenever the hook changes position</s>
**<s>Things in debug() need names - can't use "" empty string!</s>
**<s>Add debug/feedback for "is broken"</s>
**<s>constructor: if initial position is DOWN, shouldn't hasOuttaked be true? Also should set solenoid to match</s>
**<s>Fix indentation in process()</s>
**In not broken operation, DOWN should make it stay down until the limit switch is no longer triggered *or* it is told to go UP again
**<s>Implement reset()</s> 
*Electrical (Jeff)
**Check Polarities of Cylinder sensors on IO map
**Check polarity of elevator sensors
**Check polarity of Hab overplatform sensors
**Hab Cylinder sensors --- if we are using all 6 of these, order more!
**Add camera servo to iomap 
*Hab  
*Hab  
**<s>setHabBroken() - explain briefly what this does to operation of other commands</s>
**<s>Solenoid constructor invocations are wrong</s>
**<s>Constructor -- initialization order must match the declaration order</s>
**<s>reset() -- set up as in constructor and stop motor directly</s>
**xxCrossedLevel() -- Check polarities after fixing wiki with electrical
**xxCylindersExtended() and retracted() -- check polarities after electrical fixes IO map
**<s>frontCylindersRetracted() only checks one sensor while others check both?</s>
**<s>Debug for automated is wrong</s>
**<s>Debug for frontCross is wrong</s>
**<s>Debug backRRetract is wrong</s>
**<s>autoLift() -- can this simply set automated = true and resume at the last step it left off on? Simplifies things as your states only change by one set of criteria and in one place</s>
**<s>Steps 3 & 4 look wrong</s>
**<s>if (broken....) in process() needs work -- if auto is getting turned off it should be done when broken is set false, not later</s>
**<s>process() automated steps should move above action processing so that things like turning off drive are done as soon as they are noticed not the next time around</s>
**<s>stopAutoLift should probably set driveDriveBase false?</s>
**<s>So we are driving the back wheels for the "half on" case? THought drive base was doing this?</s>
**<s>When not automated and they do drive() followed by retractBack() or other command, nothing stops the drive</s> 
*Elevator (Josh)  
*Elevator (Josh)  
**Add way to control pivot
*Vision (Ben M.)  
**Implement 
**<s>Consider net tables variables to start/stop streaming (document them on this page)</s>
*Vision (Ben)  
**Document a plan for rio <> Pi communication on this page (net tables variable names, what they do, etc)  
**Document a plan for the visual feedback
**<s>Place current system on 2018 robot and view stream on driver laptop '''over wifi''' while driving around, verify you get good quality still.</s> 
**Consider net tables variables to start/stop streaming  
*Controls
**Document a plan for rio <> Pi communication (net tables variables, etc)  
**'''Finish aux controls:'''
**Finish camera mount(s)
**elevator pivoting
**Order USB cables etc. 
**'''TEST and refine Drive code'''
**Broken switches
***Assign on wiki
***implement in controls   
 
&nbsp;


*Old robot fixing:  
*Old robot fixing:  
**Rewrite trash bot (2015) from scratch using 2019 libraries and image. DO NOT IMAGE UNTIL YOU HAVE CODE MOSTLY DONE. (Talk to Jeff before starting, low priority)   
**Rewrite trash bot (2015) from scratch using 2019 libraries and image. DO NOT IMAGE UNTIL YOU HAVE CODE MOSTLY DONE. (Talk to Jeff before starting, low priority)   
</div> </div> </div> </div> </div>  
 
</div> </div> </div> </div> </div>
</div>
 
== Scouting App ==
== Scouting App ==


Line 80: Line 48:
**Nothing yet!   
**Nothing yet!   


= Subsystem Assignments =
<div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output">
<div class="mw-parser-output"><div class="mw-parser-output"><div class="mw-parser-output">
= Feedback =


*'''Controls''': Insert Mentor person and Student persons here!
see '''Dashboard''' section of&nbsp;[[2019:Robot_IO_Map#Dashboard|Robot IO Map]]
*'''Insert other subsystem TBD''': Insert Mentor person and Student persons here!


= Feedback =
&nbsp;
 
Match time for driver station/raspi: raspi_time_remaining


== Autonomous ==
== Autonomous ==
Insert auto stuff here!</div> </div> </div>
</div> </div>
</div>


Insert auto stuff here!
<div class="mw-parser-output"><h1> Camera stream </h1><p>Pi details:&#160;<a href="2019%3AVision">2019:Vision</a>
 
</p>
= Camera stream =
<ul><li>Camera stream via RTP containing H.264 video on UDP port 5800 </li>
 
<li>Reciever SDP file:<br /> <code>v=0<br /> m=video 5800 RTP/AVP 96<br /> c=in IP4 (Raspberry Pi IP)<br /> a=rtpmap:96 H264/90000</code> </li>
*Camera stream via RTP on port 5800  
<li>Sender GStreamer pipeline (command line): <code>gst-launch-1.0 v4l2src device=/dev/video0&#160;! video/x-raw.framerate=30/1,width=640,height=480&#160;! omxh264enc&#160;! rtph264pay config-interval=10 pt=96&#160;! udpsink host=(driver station IP) port=5800 max-bitrate=2700000</code> </li>
*Reciever SDP file:<br/> <code>v=0<br/> m=video 5800 RTP/AVP 96<br/> c=in IP4 (Raspberry Pi IP)<br/> a=rtpmap:96 H264/90000</code>  
<li>Reciever GStreamer pipeline (command line): <code>gst-launch-1.0 udpsrc port=5800 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"&#160;! rtpjitterbuffer latency=1&#160;! rtph264depay&#160;! decodebin&#160;! videoconvert&#160;! autovideosink</code> </li></ul>
*Sender GStreamer pipeline (command line): <code>gst-launch-1.0 v4l2src device=/dev/video0&nbsp;! video/x-raw.framerate=30/1,width=640,height=480&nbsp;! omxh264enc&nbsp;! rtph264pay config-interval=10 pt=96&nbsp;! udpsink host=(driver station IP) port=5800 max-bitrate=2700000</code>  
<p>&#160;
*Reciever GStreamer pipeline (command line): <code>gst-launch-1.0 udpsink port=5800 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"&nbsp;! rtpjitterbuffer latency=1&nbsp;! rtph264depay&nbsp;! decodebin&nbsp;! videoconvert&nbsp;! autovideosink</code>  
&lt;/div&gt;
 
</p></div>
&nbsp;


= Programming Archives =
= Programming Archives =

Latest revision as of 18:04, 21 April 2019

General programming stuff relevant to all subsystems should be documented here.

Outstanding Tasks

Robot Code

Split up by subsystem - responsible veteran student or mentor in (), student(s) doing actual code, if different, in []. These are not in any particular order!

  • Feedback
    • Bring over "editable" methods/code from last year (Josh)
    • Read & send air pressure value
  • Main Robot (Josh or Kyle)
    • Setup Autonomous() to work properly - works like operatorcontrol()?
  • Game Pieces (Kyle)
    • In feedback, set thunderdashboard_green to 1 if we have game pieces, some other value if we don't
    • Change feedback sending to send over mode we are in and mode we want to be in. "Mode we are in" is based solely on sensors on cargo cylinders.
  • Cargo (Kyle)
  • Hatch (Kyle)
  • Hab
  • Elevator (Josh)
  • Vision (Ben M.)
    • Consider net tables variables to start/stop streaming (document them on this page)
    • Document a plan for rio <> Pi communication on this page (net tables variable names, what they do, etc)
    • Place current system on 2018 robot and view stream on driver laptop over wifi while driving around, verify you get good quality still.
  • Controls
    • Finish aux controls:
    • elevator pivoting
    • TEST and refine Drive code
    • Broken switches
      • Assign on wiki
      • implement in controls

 

  • Old robot fixing:
    • Rewrite trash bot (2015) from scratch using 2019 libraries and image. DO NOT IMAGE UNTIL YOU HAVE CODE MOSTLY DONE. (Talk to Jeff before starting, low priority)

Scouting App

In no particular order!

  • Jeff
    • Nothing yet!
  • Alex
    • Nothing yet!

Feedback

see Dashboard section of Robot IO Map

 

Autonomous

Insert auto stuff here!

Camera stream

Pi details: <a href="2019%3AVision">2019:Vision</a>

  • Camera stream via RTP containing H.264 video on UDP port 5800
  • Reciever SDP file:
    v=0
    m=video 5800 RTP/AVP 96
    c=in IP4 (Raspberry Pi IP)
    a=rtpmap:96 H264/90000
  • Sender GStreamer pipeline (command line): gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw.framerate=30/1,width=640,height=480 ! omxh264enc ! rtph264pay config-interval=10 pt=96 ! udpsink host=(driver station IP) port=5800 max-bitrate=2700000
  • Reciever GStreamer pipeline (command line): gst-launch-1.0 udpsrc port=5800 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96" ! rtpjitterbuffer latency=1 ! rtph264depay ! decodebin ! videoconvert ! autovideosink

  </div>

Programming Archives