Help needed for WPILIB simulation tool (java)

Hi all,
Hope you’re doing great.
I’ve tried to run the WPILIB Java simulation but it failed. I followed the instructions provided online up to this point: https://frc-docs.readthedocs.io/en/latest/docs/software/wpilib-tools/robot-simulation/simulation-gui.html
Does anyone have the opportunity to make it work properly and if so how did you proceed, please.
Best Regards

Could you share your error with us?

We can’t do anything without the error.

Hi Daltz3,

Hope you’re doing fine.

Here is my first screenshot:

image

As you can see, in the bottom, I have the impression to always be in the debug mode.

The overall output is:

image

When I run the autonomous mode, nothing happen. I can notice some slight changes on the drive motors outputs inconsistent with the expected values. The robot is not moving at all.
What should be the expected output? is there a way to find a simple working example ?
Also, the Driver station is not activated. After reading some previous forum, I come up with the line # 61 on my build.gradle file as you can see on the first screenshot.

Thank you for your assistance.

If you want the robot to move on the simulated field, you need to create a Field2d object in your code and update it periodically with the robot’s pose. An example of this can be found here:

Another thing that needs to mentioned is that you need to use motor controllers that support simulation as well. A good example is PWM motor controllers, you can monitor those values in the simulator.

@fearxzombie,

You are absolutely right.

Thank you

No problem!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.