Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create cross-language low fidelity simulator via web interface #6

Closed
virtuald opened this issue Nov 13, 2014 · 2 comments
Closed

Create cross-language low fidelity simulator via web interface #6

virtuald opened this issue Nov 13, 2014 · 2 comments

Comments

@virtuald
Copy link
Member

The easiest cross-platform + cross-language interface is a web browser, so what we do is build a web server into a special version of WPILib (or perhaps in a secondary executable that pretends to be a gazebo server, depending on how it works out), and that web server updates its webpage dynamically depending on the state of the robot.

The UI would be written mostly using HTML/JS, so that the same functionality would be identical to use in Python, Java, and C++ robots.

Users could click on the web interface to activate various sensors, and things like motor output would be shown in the interface as well. Additionally, a field would be shown, and the robot could move around in 2d space based on the motor output (I already have the motion equations working for pyfrc).

I theorize that the primary usefulness that programmers will get from a simplistic simulator is "whether or not the thing moved when I told it to move". To enable this, the simulator has a library of simple animations that you can enable, and 'attach motors or sensors' to it, and the animation will move when your robot code makes it move. All of the animations would be written using HTML/javascript, and it would be trivial for users to add their own animations for more complex simulation. The types of motion that would be originally supported would be:

  • Circular motion about an axis using a motor
  • Solenoid piston action
  • Linear motion using a motor

There are other types of motion that should be trivial to animate, but I still need more thought on this.

The primary advantage to this type of simulator is that it wouldn't require creating a precise CAD model of the robot to get started, and if the library of available animations is general enough, would take a user maybe a half hour to get setup and ready to test things.

The first implementation of the simulator would be in pyfrc, which is why that issue is here.

@virtuald
Copy link
Member Author

Ideally, this will be driven by the simulation HAL in 2015. The dictionary containing all robot data will be pushed up to the simulation and rendered onto the interface somehow.

@virtuald
Copy link
Member Author

Initial implementation of this will take place here, and then once we've flushed this out it'll get merged into pyfrc somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant