Go to Post It takes a special kind of lunatic to be the school sponsor/mentor for an FRC team; when you get one be thankful. - Fusion_Clint [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-15-2016, 04:16 PM
dibblec's Avatar
dibblec dibblec is offline
Registered User
AKA: Mr. C
FRC #4824 (BerryBotics)
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Indiana
Posts: 20
dibblec is an unknown quantity at this point
Need Assistance: Issues with Robot Builder and code errors

This is also posted on FIRST Forums, but with time winding down trying to get our programmers as much help as possible.

Our students are working with C++ this year. They have been able to get a robot that drives with the help from a mentor early on using iterative setup . They have been trying to use Robot Builder to speed up the process with our subsystems. They can create a new project, launch Robot Builder add subsystems and update the project. From there they get errors and cannot get a driving robot. We have watched the YouTube video (based around Java) to try to help, but like most resources does not give a full picture. They have looked at sample code from other teams, with not luck. The good/bad of C++ different ways to approach the same task. Here is some of the errors:

This is a four motor drive train:
1) In RobotMap.cpp, they get the error that "RobotMap has not been declared and Member declaration not found" with this line of code: std::shared_ptr<SpeedController> RobotMap::driveTrainTalon1;
2) In DriveTrain.cpp they get the error "symbol driveTrainTalon1 could not be resolved" with this line of code: talon1 = RobotMap::driveTrainTalon1;
3) In RobotMap.cpp getting error on "LiveWindow *lw = LiveWindow::GetInstance();" it says "Function 'GetInstance' could not be resolved.
4) In RobotMap.cpp getting error on driveTrainTalon1.reset(new Talon(0)); "Method 'reset' could not be resolved".

Again, I know this is not a complete picture, however maybe these are common errors that someone may have an answer for. Here is the first part of RobotMap.cpp:


#include "RobotMap.h"
#include "LiveWindow/LiveWindow.h"


// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=ALLOCATION
std::shared_ptr<SpeedController> RobotMap::driveTrainTalon1;
std::shared_ptr<SpeedController> RobotMap::driveTrainTalon2;
std::shared_ptr<SpeedController> RobotMap::driveTrainTalon3;
std::shared_ptr<SpeedController> RobotMap::driveTrainTalon4;
std::shared_ptr<RobotDrive> RobotMap::driveTrainRobotDrive;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=ALLOCATION

void RobotMap::init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
LiveWindow *lw = LiveWindow::GetInstance();

driveTrainTalon1.reset(new Talon(0));
lw->AddActuator("Drive Train", "Talon 1", std::static_pointer_cast<Talon>(driveTrainTalon1)) ;
Reply With Quote
 


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 09:21 AM.

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