FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem running the Robot Simulation

Highlighted

I followed the tutorial for Robot Simulation but the simulation doesnt run

FRC Driver Station says No Robot Code - see attached screen capture

 

Cant figure what might be the problem

Thanks you for your assistance

Rony

.

0 Kudos
Message 1 of 10
(1,462 Views)
Highlighted

Rony,

Your attached capture shows the Robot Main.vi front panel, but it is partially covered. It's target shows "My Computer" which is correct for simulation, but it's not clear if the VI is actually running -- I'm assuming it's not as the Time indicator shows "0.0". Execute this VI, by clicking its run arrow, and the Robot Code LED in the Driver Station should turn green. If all LEDs are green in the Driver Station (not Dashboard), click the "Enable" button in the Teleop tab, and move the joystick.

I created a video from FRC 2016 to show how to run the FRC simulation from a new project, but I cannot upload it in this Forum. Here's a Google docs link to the video (8MB mp4 file).

Also see the attached screen cap of another FRC simulation field from several years ago. The concept/process should still be the same.

FRC_Simulation.png

 

Hope this info helps.

Regards,
Iggy Calalang

CLD Badge CTA Badge CPI Badge

Message 2 of 10
(1,424 Views)
Highlighted

 

Hello

Thanks for help

I did exactly as described 

I ran both Main , Ddashboard and Driver VI's but the   2 bottom leds still red

Rony

 

 


 




0 Kudos
Message 3 of 10
(754 Views)
Highlighted

What kind of project did you create?  If you don't create one of the simulation projects, it won't include the simulation files.  You can add them manually but you'll want to start with the simulation project to get a better feel for how the project is put together.

0 Kudos
Message 4 of 10
(739 Views)
Highlighted

So if you create a simulation project, can you then turn it into a project that can be pushed to an acutal robort?

0 Kudos
Message 5 of 10
(687 Views)
Highlighted

Hello @ghowell01,

Yes, you have the ability to push code in the Simulation Project to the actual robot.

See the LabVIEW Tutorial on Robot Simulation:

https://forums.ni.com/t5/FIRST-Robotics-Competition/LabVIEW-Tutorial-10-Robot-Simulation/ta-p/373970...

In the tutorial is a link and section for "Building the Simulation for the roboRIO"

https://forums.ni.com/t5/FIRST-Robotics-Competition/LabVIEW-Tutorial-10-Robot-Simulation/ta-p/373970...

 

Good Luck!

Regards,
Iggy Calalang

CLD Badge CTA Badge CPI Badge

0 Kudos
Message 6 of 10
(670 Views)
Highlighted

Hi.   I don't know if this is any help, but I built a combined LabVIEW project that contains the base "arcade" robot and the simulation files so that both "my Computer" and "target" targets can be used.  This simulation side is built from the "shooter" simulation, but it has the code for the real "arcade" robot.  In other words it is a template for teams to create their own code and test using the simulation. 

(There is an earlier post in this forum about the"Secret Book of FRC Labview" version 2...)

0 Kudos
Message 7 of 10
(661 Views)
Highlighted

We are starting new projects in LabView 2019 by creating a "FRC roboRIO Project".

 

Is what you've placed here in the zip file essentially one of those projects with the simulator code added?

0 Kudos
Message 8 of 10
(646 Views)
Highlighted

Yes.   I created a new robot project from the template, like this.  I used a "fake" team number.

JimASim_1-1580323488776.png

I also created a simulated shooter robot.

JimASim_2-1580323569725.png

Then I took the only the files needed to perform the simulation from the "simulation" project and moved them to the "robot" project.  This was done outside of LabVIEW.  Inside LabVIEW I then added the original "robot" VI files and the files I just moved into the simulation target and saved.  (I tested it too.)  I zipped up the files and posted them.

 

Note: that the simulation only simulates certain things.  There is  an HTML file that lists what this is.  A lot of robots exact I/O won't match this, however it doesn't matter.  You can use the "conditional compiliation" structure to open the motors for simulation and open different motors for the real robot in the same VI.  This allows a lot of drive system testing, and autonomous to be tested in the simulation before the robot is ready.

 

You can find more useful FRC LabVIEW stuff here.

https://forums.ni.com/t5/FIRST-Robotics-Competition/Secret-Book-of-FRC-LabVIEW-version-2-07/m-p/4005...

 

Jim

0 Kudos
Message 9 of 10
(630 Views)
Highlighted

Also, you can go to the properties of "target" and change the robot number from 9950 to whatever.

0 Kudos
Message 10 of 10
(629 Views)