2019:Programming: Difference between revisions
From 1511Wookiee
Jump to navigationJump to search
Line 12: | Line 12: | ||
** Setup Autonomous() to work properly - works like operatorcontrol()? | ** Setup Autonomous() to work properly - works like operatorcontrol()? | ||
*Game Pieces (Kyle) | *Game Pieces (Kyle) | ||
** In feedback, set thunderdashboard_green to 1 if we have game pieces, some other value if we don't | |||
*Cargo (Kyle) | *Cargo (Kyle) | ||
*Hatch (Kyle) | *Hatch (Kyle) |
Revision as of 07:39, 10 February 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
- 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
Variable name | Data Type | What it means |
---|---|---|
gamepieces_mode | String Either "hatch" or "cargo" or not set. Treat not set as hatch |
The game piece "mode" the robot thinks it is in. Display using an image of a hatch panel or cargo ball? |
thunderdashboard_green | Number | 1 = Indicates background change to green. Set to 1 when we have a game piece. |
robot_airpressure | Number 0 -> 125 | Indicates approximate PSI in air system. Display as # in a box with colored background (red/yellow/green) with colors based on 2 TBD thresholds? |
robot_match_time_remaining | Number | Match time for driver station/raspi |
pi_connected | ??? | Raspberry Pi connection status |
pi_distanceCenter | ??? | vision-distance to image center |
Autonomous
Insert auto stuff here!
Camera stream
Pi details: 2019:Vision
- 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 udpsink 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