OCCRA
Go to Post They truncated our conference title. We are not showing the movie "Finding NEMO" - RoboMom [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media  
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 02-13-2018, 04:50 PM
microbuns's Avatar
microbuns microbuns is offline
Software + Drive Coach
AKA: Sam Maier
FRC #4917 (Sir Lancerbot)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Elmira, ON
Posts: 183
microbuns will become famous soon enough
Autonomous not working? Could be the name of your auto routines

We had a nightmare of a time trying to figure out what was wrong with our autonomous modes. We were using a SendableChooser to get our auto modes, but with some debugging, we found out that the SendableChooser->GetSelected() was returning null.

We agonized over this for a while, but then we discovered that if the name of your auto mode had 16 characters or more, the sendable chooser would not return the assosiated command.

Code:
	chooser->AddObject("Auto Scale Backu", autonomousCommand);// dosen't work.
	chooser->AddObject("Auto Scale back", autonomousCommand);// works fine.
Has anyone else seen something like this?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-14-2018, 04:37 PM
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Hawthorne, CA
Posts: 109
calcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud of
Re: Autonomous not working? Could be the name of your auto routines

WPILib has been discussing this internally, and we aren't yet sure what the cause is (Small-string optimization for strings, which may use 16 bytes; an issue with llvm::StringMap; SendableChooser not being thread-safe). Are you calling SendableChooser functions from different threads?
Reply With Quote
  #3   Spotlight this post!  
Unread 02-14-2018, 05:12 PM
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 195
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Autonomous not working? Could be the name of your auto routines

My team 1967 had troubles with this earlier this season. We had 3 different SendableChoosers on the dashboard - each with their own 'entries'. All of the entries seemed to work just fine except one. I had noted with one of the programmers that the entry at issue had 11 characters and I wondered if that tripped over an edge of some kind. I don't believe we had 16 as a magic number.

Ours were all created/populated from a single thread, btw.

I think they shortened the names and it worked so that's good, but I don't feel super great about such an issue hanging around. If there's a solution, I'd love to re-test and see the issue disappear for the team.

Thanks,'
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #4   Spotlight this post!  
Unread 02-15-2018, 01:29 AM
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Hawthorne, CA
Posts: 109
calcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud of
Re: Autonomous not working? Could be the name of your auto routines

Could you look at the NetworkTables entries for the working and non-working SendableChoosers and ensure they are created correctly?
Reply With Quote
  #5   Spotlight this post!  
Unread 02-15-2018, 11:50 AM
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 195
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Autonomous not working? Could be the name of your auto routines

calcmogul - can you give instructions on how to do that? We might be able to provide that info this weekend given instructions.
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #6   Spotlight this post!  
Unread 02-15-2018, 12:11 PM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP/Shuffleboard/WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2010
Location: MA
Posts: 354
SamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant future
Re: Autonomous not working? Could be the name of your auto routines

Quote:
Originally Posted by bob.wolff68 View Post
calcmogul - can you give instructions on how to do that? We might be able to provide that info this weekend given instructions.
Run OutlineViewer from Eclipse, disable the "server mode" toggle switch, and set the server to your team number

OutlineViewer preferences:


Should look like this (if there's no connection to the robot)


The choosers should appear underneath the "SmartDashboard" branch
__________________
WPILib developer
GRIP, Shuffleboard, RobotBuilder, OutlineViewer
Reply With Quote
  #7   Spotlight this post!  
Unread 02-15-2018, 05:56 PM
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 195
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Autonomous not working? Could be the name of your auto routines

Awesome - will give it a try this weekend.
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #8   Spotlight this post!  
Unread 02-15-2018, 08:18 PM
microbuns's Avatar
microbuns microbuns is offline
Software + Drive Coach
AKA: Sam Maier
FRC #4917 (Sir Lancerbot)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Elmira, ON
Posts: 183
microbuns will become famous soon enough
Re: Autonomous not working? Could be the name of your auto routines

Here's a video I took of it. It appears to have to do something with it adding extra entries to the dashboard?

Here's the code we were running (very close to a template bot).

It appears to happen in both the SmartDashboard and the ShuffleBoard.
Reply With Quote
  #9   Spotlight this post!  
Unread 02-15-2018, 10:51 PM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP/Shuffleboard/WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2010
Location: MA
Posts: 354
SamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant future
Re: Autonomous not working? Could be the name of your auto routines

Quote:
Originally Posted by microbuns View Post
Here's a video I took of it. It appears to have to do something with it adding extra entries to the dashboard?

Here's the code we were running (very close to a template bot).

It appears to happen in both the SmartDashboard and the ShuffleBoard.
Can you connect with OutlineViewer or shuffleboard and display the contents of the NetworkTable for that chooser? In the video at the 45 second mark, it looks like an option is added with the name "567890123456", which is not one that you added. It'd be good to see the full contents of the table for better troubleshooting.
__________________
WPILib developer
GRIP, Shuffleboard, RobotBuilder, OutlineViewer
Reply With Quote
  #10   Spotlight this post!  
Unread 02-21-2018, 09:30 AM
microbuns's Avatar
microbuns microbuns is offline
Software + Drive Coach
AKA: Sam Maier
FRC #4917 (Sir Lancerbot)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Elmira, ON
Posts: 183
microbuns will become famous soon enough
Re: Autonomous not working? Could be the name of your auto routines

After updating everything (Rio firmware, eclipse plugins, etc.), we can no longer reproduce the problem. It appears that there was some issue with earlier versions of the plugin that were causing this.
Reply With Quote
  #11   Spotlight this post!  
Unread 02-21-2018, 04:28 PM
Peter Johnson Peter Johnson is offline
Volunteer WPILib Developer, CSA
no team (WPILib)
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 536
Peter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond reputePeter Johnson has a reputation beyond repute
Re: Autonomous not working? Could be the name of your auto routines

Quote:
Originally Posted by microbuns View Post
After updating everything (Rio firmware, eclipse plugins, etc.), we can no longer reproduce the problem. It appears that there was some issue with earlier versions of the plugin that were causing this.
Indeed, this bug was fixed in the 2018.3.3 release.
__________________
WPILib Developer, 2014-Present:
  • Author of cscore - WPILib CameraServer for 2017+
  • Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC
Mentor, Team 294, 2008-2018 (World Champions FRC 2010 & FTC 2008)
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 05:41 PM.

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi