Beta8397/virtual_robot

Bring back virtual controllers?

Closed this issue · 5 comments

This is a great tool and as is will be very helpful for teaching autonomous mode programming.

Is there any possibility of bringing back virtual controllers as an option (while keeping the physical controllers)?

Our team has few controllers available so this limits the use of the simulator. Also, team members could work at home where they might not have any physical controllers. Thanks for considering.

I'll take a look at what would be involved. It would probably be an either-or scenario: run one version to use the virtual controllers, the other version for real controller.

@redcatrobotics
Added a new branch (virtual_gamepad) that re-introduces the option of a virtual gamepad. To enable the virtual gamepad (and at the same time disable real gamepad), within the Controller module, open virtual_robot.config.Config.java, and change the value of the USE_VIRTUAL_GAMEPAD field to true.

A side effect of using the virtual gamepad is that the total height of the application window increases. With the default field graphic (648x648), it will be too large to completely fit in the 1366x768 screen of some laptops. To get around this, within the Config.java class, change the value of FIELD_WIDTH to 576, and change the file name for the field graphic from skystone_field648 to skystone_field576.

virtual_gamepad branch merged into master.

Thanks for making this change! I tried this out and everything worked well (including the laptop screen size fix).