oliverlee / bikesim Goto Github PK
View Code? Open in Web Editor NEWBicycle Simulator
Bicycle Simulator
Send velocity over UDP to allow the Python bridge to change bicycle forward speed instead of using a hard coded value in Unity.
Occasionally, the serial udp bridge will stop transmitting sensor data due to a BlockingIOError.
The old one broke. Make a new one out of steel instead of plexiglass.
The BicycleObject GameObject does not leverage the transformation hierarchy Unity provides. Rendering the Bicycle from the x, y and a couple of angles is rather simple, provided that the GameObject is built hierarchically.
The wheels should be children of their respective frames. The front frame should be a child of the back frame.
Applying this principle will simplify the code in BicycleController.SetBicycleTransform
tremendously.
Also, the front wheel is bigger (scale .7) than the back wheel (scale .6). Not sure if intentional.
Steer rate is no longer measured correctly as the rate gyro has become detached. Either reattach the gyro or read the angular rate from the motor controller if possible. The motor does have an encoder, which is used by the motor controller for position/velocity control mode, however this signal may not be accessible from the motor controller.
The physics of the bicycle are simulated in the Unity Engine call to FixedUpdate(). This function is not called periodically, see discussion here:
http://answers.unity3d.com/questions/933396/fixedupdate-executes-at-a-constant-rate-but-in-wha.html
The bicycle simulation needs to be reimplemented in a more periodic fashion.
As we have not calculated the inertia of the handlebar of the stationary bicycle setup, which we know differs from the mass/inertia benchmark properties which are used in the simulation, the response of the physical system will differ from the response predicted by the simulation. Compare the state trajectory of the physical system to a simulation given the same torque input and same initial condition, and determine if a better actuator torque can be applied resulting in higher setup fidelity.
If cadence is enabled and transmitted by the arduino, it updates slower than 1 Hz. Not only does this need to be faster, but this indicates that the implementation for cadence measurement may need to change.
Simulation of bicycle will slowdown sporadically for a few seconds. The rest of the Unity engine still runs at normal speed, as evidenced by the simulation time counter and virtual handlebar response.
The torque transmitted by Unity is scaled in the serial-udp bridge as the torques issued by the motor controller are too large. The arduino source does not illustrate that the torque is correctly converted to PWM for the given motor controller, nor that the gear ratio of gearwheel/pulley is taken into account.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.