Commit Graph

52 Commits (9df85eadf4b3719a898fda8769313ae023962c25)

Author SHA1 Message Date
Robert Adams 7fd8202ae3 BulletSim: rewrite and improve vehicle angularDeflection, verticalAttraction,
linearMotorUp and related vehicle forces.
Fixed problems with downward vehicle position correction forces being too large.
Add vehicle collision flag so can sense whether vehicle is on the ground.
2012-12-06 09:31:12 -08:00
Robert Adams 6d7f66f781 BulletSim: Don't add gravity to down force -- let Bullet do that. Add VehicleAddForce to set of managed vehicle prim properties. 2012-12-06 09:30:35 -08:00
Robert Adams e599a8b242 BulletSim: Vehicle angular vertical attraction works. Other vehicle angular forces commented out for the moment for debugging. 2012-12-06 09:30:28 -08:00
Robert Adams 787636b97a BulletSim: Reduce idle region physics overhead where there are MANY
static objects by more restrictive selection of objects that collide
    with static objects.
Rename collision mask fuctions from 'filter' to 'group' so it is clear
    what is being set.
Rename BulletSimAPI.SetCollisionFilterMask() to SetCollisionGroupMask to match above.
Restore passing of time step to linear and angular motion component routines.
Use buffering vehicle physical parameter get/set routines consistantly.
Make range enforcement clearer by using ClampInRange() function for parameter setting.
Remove commented out experimental vehicle calculations.
2012-12-03 16:25:51 -08:00
Robert Adams 41f1c5b7f7 BulletSim: rework angular corrections to remove any hybrid code and compute absolute collections. 2012-12-03 07:59:56 -08:00
Robert Adams 10fcc70b36 BulletSim: revert angular vertical attraction from motor to code. The motor code did not return the restoring difference but the current value. Remove unused commented out code. 2012-12-03 07:59:46 -08:00
Robert Adams f9fed421fe BulletSim: format vehicle detail logging messages so vehicle changs are grouped better in the log output. 2012-12-03 07:59:42 -08:00
Robert Adams 20c3ec7d92 BulletSim: localize vehicle property setting so the vehicle prim is only updated at the end of the vehicle simulation step and the push of the physics property update event only happens if the properties are actually changed. 2012-12-03 07:59:39 -08:00
Robert Adams b124aae05e BulletSim: Add DumpActivationInfo2 function. Change static objects from DISABLE_SIMULATION to ISLAND_SLEEPING. Update DLLs and SOs to add DumpActivationInfo2 function. 2012-12-01 15:39:13 -08:00
Robert Adams ec63e4ff29 BulletSim: remove time scaling of computed vehicle absolute velocity since Bullet will scale the movement by the time slice. Restore LIMIT_MOTOR_UP to definitition of BOAT simce some vehicle engines use it even for land vehicles. Push vehicle parameter updates through the regular property update to solve vehicles floating off when they should be stopped. 2012-11-29 22:21:45 -08:00
Robert Adams 0bda35e18f BulletSim: add copyright header where it is missing. Remove some unnecessary 'using' requirements so testing framework is less complicated. 2012-11-29 09:53:59 -08:00
Robert Adams b8a7cbb9e9 BulletSim: reverse direction of hover correction. Removes problem with vehicles being orbited. 2012-11-29 08:03:30 -08:00
Robert Adams 2ccd4c1302 BulletSim: fix boats floating low by removing LIMIT_MOTOR_UP flag from TYPE_BOAT definition. 2012-11-28 09:48:48 -08:00
Robert Adams 0a66317fa6 BulletSim: move GetWaterLevelAtXYZ from BSScene to BSPhysTerrain. 2012-11-28 09:48:33 -08:00
Robert Adams 8e459a0346 BulletSim: reorganize linear movement routine into separate subroutines enabling external calibration routines and unit tests. 2012-11-27 10:04:00 -08:00
Robert Adams 68fe7dff20 BulletSim: reorganize angular movement routine into separate subroutines enabling external calibration routines and unit testing. 2012-11-27 10:03:49 -08:00
Robert Adams 59554758b1 BulletSim: implementation of vertical attraction motor. 2012-11-27 10:03:44 -08:00
Robert Adams 5685b33071 BulletSim: increase vehicle stability by suppressing Bullet's update to angular velocity. 2012-11-26 10:47:34 -08:00
Robert Adams 084e3926ca BulletSim: use m_angularMotor to do the basic movement. Add the setting of same. Rename the angular forces and add comments to match MoveAngular to the form of MoveLinear. 2012-11-25 20:04:33 -08:00
Robert Adams 4c077a0694 BulletSim: organize MoveLinear code for understandability. Make LIMIT_MOTOR_UP contribution a velocity and not a force. 2012-11-25 20:04:32 -08:00
Robert Adams 319ec3235c BulletSim: add BSVMotor as BSDynamics linear motor.
Properly limit *_MOTOR_DECAY_TIMESCALE to 120 as per specs.
Invode BSDynamics.Refresh() when vehicle type is changed. Previously
   the vehicle properties weren't getting set because the physical
   properties were set before the vehicle type was set.
Add a "use name" to BSMotors for identification while debugging.
Correct current and target confusion in BSVMotor design.
Rename CurrentValueReductionTimescale to FrictionTimescale.
Event more detailed logging.
2012-11-25 20:04:31 -08:00
Robert Adams 980edabc2e BulletSim: clean up TODO list. It is kept somewhere wlse that should be more public. Add error logging for the detail log writer so a message is output when it cannot write to the specified logging directory. Modify friction defaults to be closer to ODE's values. Add new collision margin and vehicle angular damping parameters. 2012-11-25 20:04:29 -08:00
Robert Adams 9a42405944 BulletSim: small change to add position correction force with AddForce rather than just storing it in the variable 2012-11-25 20:04:28 -08:00
Robert Adams ee00c5c885 BulletSim: many changes to tune vehicles for BulletSim.
The problem left is that the vehicle sitting on something needs
to press down for gravity and what its sitting on pushes up
so the vehicle does not penetrate. The effect is Bullet calculates
a lot of random angular motion for the vehicle. Various schemes
of damping and zeroing has not resolved the problem.
2012-11-06 18:16:47 -08:00
Robert Adams 79f7c466a1 BulletSim: fix compound linkset crash by not freeing shape of child prims.
Remove all compilation warnings (mostly 'protected' in sealed classes.)
Add the dynamicAabbEnable parameter to creation of compound shapes.
2012-11-03 21:16:02 -07:00
Robert Adams 364a7c3088 BulletSim: rename BSBody and BSShape to PhysBody and PhysShape. Add skeleton of BSLinksetCompound. 2012-11-03 21:15:06 -07:00
Robert Adams 28e2cd3fa2 BulletSim: vehicle tweeking.
Add AddTorque() method to BSPrim. Remove some manual motor actions
in computing angular force (will eventually be replaced with motor class).
Remove some experimental changes.
2012-11-03 21:14:58 -07:00
Robert Adams 42d65840c8 BulletSim: Add gravity force to vehicle. Some debugging additions. 2012-11-03 21:14:33 -07:00
Robert Adams 92d3c611e5 BulletSim: many small changes for vehicles simulation. 2012-11-03 21:13:19 -07:00
Robert Adams 804b332d45 BulletSim: Add banking and other new code to vechile dynamics. Add third party license and contributor in for for Aurora-Sim project for physics code. 2012-11-03 21:12:46 -07:00
Robert Adams 14eeb8b31b BulletSim: fix bug that caused error (and a crash on 32 bit Linux) when mesh assets weren't already in the cache. Comment cleanups. 2012-10-22 22:24:59 -07:00
Robert Adams 65c131c4a3 BulletSim: remove trailing spaces to make git happy. 2012-10-22 22:24:44 -07:00
Robert Adams 3a458e2a36 BulletSim: Use full linkset mass when computing vehicle gravity force. Add taint-time specification to new AddForce(). 2012-10-11 14:01:18 -07:00
Robert Adams 68698975f1 BulletSim: Add Force* operations to objects to allow direct push to engine.
Update BSDynamics to use same (don't want to delay updates til next taint-time.
Suppress queuing a taint update for position and orientation calls if value
    does not change.
Move Bullet timing statistics call from C# back to C++ code.
Throttle taints per simulation step and add parameter to set.
By default, don't create hulls for physical objects. Add a
    parameter to turn on and off.
2012-10-11 14:01:07 -07:00
Robert Adams 87825b0abe BulletSim: Fix crash when linking large physical linksets.
Properly remove and restore linkage constraints when upgrading
    a prim's mesh to a hull.
Lots more debug logging.
Definitions and use of Bullet structure dumping.
Centralize detail logging so a Flush() can be added for debugging.
2012-10-11 14:01:03 -07:00
Robert Adams b6b505163c BulletSim: call ForcePosition and ForceOrientation in BSDynamics so there is no lag between what the vehicle code sees and what the physics engine is using. 2012-10-02 11:13:51 -07:00
Robert Adams c1740a2903 Correct my name in CONTRIBUTORS.txt 2012-10-02 11:13:26 -07:00
Robert Adams 7b65985047 BulletSim: remove the trailing spaces from lines to make git happier 2012-09-27 22:02:03 -07:00
Robert Adams f82b903dee BulletSim: Fix linkset crash. Caused by the different body and shape
pointers at runtime and at taint-time. Now passes the body into the
    taint.
Vehicles zero inertia when active to eliminate Bullet's contribution
    to vehicle motion.
2012-09-27 22:01:52 -07:00
Robert Adams ee7cda261c BulletSim: move a bunch of common logic out of BSPrim and BSCharacter
and into the parent class BSPhysObject.
Rework collision logic to enable extra collision after done colliding.
Rename 'Scene' to 'PhysicsScene' to differentiate it from the simulator 'Scene'.
2012-09-27 22:01:11 -07:00
Robert Adams b602b476ad BulletSim: update DLLs and SOs and remove some debugging code. 2012-09-15 15:36:13 -07:00
Robert Adams dcb94b8a24 BulletSim: remove timeStep parameter from calls for vehicle parameter setting. There is no reason these should be using the simulation time interval for parameter calculation. 2012-09-15 15:31:59 -07:00
Robert Adams 2c5ff93990 BulletSim: Way too many changes in one commit.
Many changes to BSDynamic for readability and commentary.
Linkset hacking for vehicles: don't over mass the root prim.
Add parameter for link constraint solver iterations.
Correct uses of timestep in timescale calculations for vehicles.
Reorganize code/logic for making objects static and dynamic for readability
    and use of API2.
Changed most calls in BSPrim to use API2 calls (the new way).
Avatars do not generate default Bullet collision events but do call up
    to the simulator for every avatar. Reduces overhead.
Objects added to collision list only if they are processing collisions.
    Reduces overhead especially for large numbers of avatars.
Generalize call for water height to GetWaterHeightAtXYZ().
Catch and correct exception getting terrain height when out of bounds.
Correct race condition in Terrain Manager where creation wasn't at taint-time.
Add API calls for constructing compound shapes.
Move NeedsMeshing() logic into object class.
Reorganize logic for object meshing to reduce rebuilding of meshs/hulls.
2012-09-15 15:31:29 -07:00
Robert Adams 7c140570db BulletSim: Changes to terrain storage and management so mega-regions work.
Moved all terrain code out of BSScene and into new BSTerrainManager.
Added logic to manage multiple terrains for mega-regions.
Added new functions to BulletSimAPI to match the library.
Moved all of the terrain creation and setup logic from C++ code to C# code.
    The unused code has not yet been removed from either place. Soon.
Moved checks for avatar above ground and in bounds into BSCharacter.
2012-08-31 11:41:18 -07:00
Robert Adams 8eda290262 BulletSim: comments and parameter changes in dynamics engine. 2012-08-17 13:34:16 -07:00
Robert Adams e31e23d68d BulletSim: in BSDynamics, merge 'flags' and 'hoverFlags' as they are defined for the same bits and it makes the code less complicated. 2012-08-17 13:34:14 -07:00
Robert Adams 68f112888b BulletSim: clean up detail logging by adding many more debug log statements and then commenting out most of the additions. 2012-08-15 12:08:13 -07:00
Robert Adams ca3b6b1f90 BulletSim: more detail logging for vehicle and general physics debugging.
Physical linksets are fully functional.
Tweeking of the vehicle code to make it semi-work.
Utilize the new API2 for some setting operations.
Add GetOrientation() API call for proper reporting of children of linksets.
Changes the interface between C# and C++ code so old DLLs won't work!
2012-07-20 14:08:29 -07:00
Robert Adams 7451bb1613 BulletSim: fix compile errors from last commit. Clean up passing of physics scene into vehicle dynamics code. 2012-07-20 14:02:29 -07:00
Robert Adams cda67a68de BulletSim: Add very detailed logging to BSDynamics for vehicle debugging 2012-07-20 14:02:27 -07:00