Go to Post HOLY MOLY CANOLI THIS LOOKS LEGIT - MasterEric [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2017, 08:42
onenerdyguy onenerdyguy is offline
Registered User
FRC #5929
 
Join Date: Jan 2016
Location: Lake Park, MN
Posts: 56
onenerdyguy is on a distinguished road
Switch camera on SmartDashboard based upon value of Network Tables?

Is there a way to have the camera on the smart dashboard switch to another source based on a value we put into network tables?

We're basically wanting a backup cam to turn on when we invoke our 'reverse' function. I've got it putting a value into network tables, the reversing works, but I'm at a bit of a loss with the SD side.

Otherwise, we're debating putting the camera itself on a little servo and just having it flip, but I prefer software fixes to a potentially damagable hardware one.

We're in python, if it matters. The cameras are all streaming via mjpeg.
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2017, 09:44
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 475
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Switch camera on SmartDashboard based upon value of Network Tables?

Quote:
Originally Posted by onenerdyguy View Post
Is there a way to have the camera on the smart dashboard switch to another source based on a value we put into network tables?
If your cameras are sufficiently low bandwidth, I'd suggest streaming both all the time, with side-by-side displays.
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2017, 10:00
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 80
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: Switch camera on SmartDashboard based upon value of Network Tables?

We did something similar for 2016 - we streamed both via mjpg streamer, and then wrote a smartdashboard plugin to switch between displaying one stream or the other based on the value of a boolean.... I'm struggling to find the source code for it though... If you're curious, I can ask our lead SW mentor tonight if he still has it.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2017, 10:49
onenerdyguy onenerdyguy is offline
Registered User
FRC #5929
 
Join Date: Jan 2016
Location: Lake Park, MN
Posts: 56
onenerdyguy is on a distinguished road
Re: Switch camera on SmartDashboard based upon value of Network Tables?

Quote:
Originally Posted by gerthworm View Post
We did something similar for 2016 - we streamed both via mjpg streamer, and then wrote a smartdashboard plugin to switch between displaying one stream or the other based on the value of a boolean.... I'm struggling to find the source code for it though... If you're curious, I can ask our lead SW mentor tonight if he still has it.
I'd be interested, if only to see how it was done!
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2017, 10:55
onenerdyguy onenerdyguy is offline
Registered User
FRC #5929
 
Join Date: Jan 2016
Location: Lake Park, MN
Posts: 56
onenerdyguy is on a distinguished road
Re: Switch camera on SmartDashboard based upon value of Network Tables?

Quote:
Originally Posted by Ken Streeter View Post
If your cameras are sufficiently low bandwidth, I'd suggest streaming both all the time, with side-by-side displays.
That is one thing we're looking into as well. it should be low enough bandwidth, considering they're just 160x120 10fps
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2017, 11:58
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 80
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: Switch camera on SmartDashboard based upon value of Network Tables?

Quote:
Originally Posted by onenerdyguy View Post
I'd be interested, if only to see how it was done!
Got the repo:

https://github.com/RobotCasserole173...am_SDExtension
Reply With Quote
  #7   Spotlight this post!  
Unread 06-02-2017, 12:22
onenerdyguy onenerdyguy is offline
Registered User
FRC #5929
 
Join Date: Jan 2016
Location: Lake Park, MN
Posts: 56
onenerdyguy is on a distinguished road
Re: Switch camera on SmartDashboard based upon value of Network Tables?

Quote:
Originally Posted by gerthworm View Post
Nice! This is exactly what we're hoping for. Thanks!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi