Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008496opensim[REGION] Physics Enginespublic2019-03-05 03:052019-03-06 14:10
ReporterJeffKelley 
Assigned ToRobert Adams 
PrioritynormalSeverityminorReproducibilityalways
StatusfeedbackResolutionreopened 
PlatformOSOS Version
Product Version0.9.0.1 
Target VersionFixed in Version 
Summary0008496: llPushObject has no effect on avatars (BulletSim)
DescriptionllPushObject has no effect on avatars
Steps To Reproducedefault
{
    touch_start(integer n)
    {
        key target = llDetectedKey(0);
        llShout (0, "Pushing "+llKey2Name(target) );
        llPushObject (target, <0,0,200>, ZERO_VECTOR, FALSE);
    }
}

Works in ubODE.

Does not work in Bullet.
Additional InformationOpenSim 0.9.1.0 Snail Dev 2019-02-27-bd1b992
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Linux64
Mono Version5.x
Viewer
Attached Files

- Relationships

-  Notes
(0034901)
UbitUmarov (administrator)
2019-03-05 03:58

yeah, old issue, sorry
(0034902)
Robert Adams (administrator)
2019-03-05 09:44

BulletSim has the parameter AvatarAddForcePushFactor

Looking at the code, I found the comment: "ODE multiplies the force by 100. ubODE multiplies the force by 5.3. BulletSim, after much in-world testing, thinks it gets a similar effect by multiplying mass*0.315f. This number could be a feature of friction or timing, but it seems to move avatars the same as ubODE".

If pushing is not happening, tweaking the parameter will help. Something must have changed since it was originally tuned. The default value is 0.315f. See if upping that number helps. If a good value is found, we can change the default.

[BulletSim]
    AvatarAddForcePushFactor=0.315
(0034903)
JeffKelley (reporter)
2019-03-05 15:13
edited on: 2019-03-05 15:14

There is no AvatarAddForcePushFactor variable in OpenSimDefaults.ini or OpenSim.ini.

[BulletSim]
  BulletEngine = bulletunmanaged
  UseSeparatePhysicsThread = false
  TerrainImplementation = 0
  TerrainMeshMagnification = 2
  AvatarToAvatarCollisionsByDefault = true
  AvatarHeightLowFudge = 0
  AvatarHeightMidFudge = 0
  AvatarHeightHighFudge = 0
  AvatarTerminalVelocity = -54
  LinkImplementation = 1
  LinksetOffsetCenterOfMass = false
  MeshSculptedPrim = true
  ForceSimplePrimMeshing = false
  ShouldRemoveZeroWidthTriangles = true
  ShouldUseAssetHulls = true
  MaxCollisionsPerFrame = 2048
  MaxUpdatesPerFrame = 8192
  PhysicsLoggingEnabled = False
  PhysicsLoggingDir = .
  VehicleLoggingEnabled = False

Adding AvatarAddForcePushFactor = 1.315 (4 x times the default) makes no difference.

I've pushed it to 100 with no effect.

config show BulletSim AvatarAddForcePushFactor
config get BulletSim AvatarAddForcePushFactor : 100

0.9.1.0 Snail Dev 2019-02-27-bd1b992 (Unix/Mono)

(0034904)
tampa (reporter)
2019-03-05 17:56

The variable is part of BSParam so despite not being present in the configs it is read nonetheless. The default in code is 0.315 so setting it to the same in the config likely won't cause difference in behavior. Try a different value and see if something changes.

OpenSim\Region\PhysicsModules\BulletS\BSParam.cs If you want to know what other variables there are.
(0034905)
JeffKelley (reporter)
2019-03-06 00:59

diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
index 495f752..d2db3ca 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
@@ -639,7 +639,7 @@ public static class BSParam
         new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
             0.1f ),
         new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines",
- 0.315f ),
+ 3.15f ),
         new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped",
             0.45f,
             (s) => { return (float)AvatarStopZeroThreshold; },




No change.
(0034906)
Robert Adams (administrator)
2019-03-06 09:43

@tampa: The over-engineered parameter system in BulletSim allows setting any of the parameters in the INI file (in the [BulletSim] section) or from the region command line at runtime ("physics set AvatarAddForcePushFactor 100").

The problem looks to be the avatar standing logic. If the avatar is colliding with something (like standing) with low velocity, the logic tries to keep the avatar stationary so it doesn't slide down hills or drift slowly in some direction. So llPushObject would work if the avatar was flying or already moving but not when already standing stationary.

I'll look at the logic and see if a tweak is possible.
(0034907)
tampa (reporter)
2019-03-06 09:56

@Robert Adams May not have been clear, but that is what I meant. Though should consider adding these variables to OpenSimDefaults just incase someone may need them for whatever reason, documentation is good :)
(0034908)
Robert Adams (administrator)
2019-03-06 10:35

I added a tweak to the stationary check for AddForce. Try it now.
(0034909)
JeffKelley (reporter)
2019-03-06 11:06

Fixed in commit 87c81b5.
(0034910)
aiaustin (developer)
2019-03-06 12:27

Reopening to check if an addition should also be made to OpenSimDefaults.ini ...

[BulletSim]
     AvatarAddForcePushFactor=0.315
(0034911)
tampa (reporter)
2019-03-06 13:33

There are more missing than just that one, though ideally this should be it's own mantis because this goes both ways. We still have code that does not set a default and requires OpenSimDefaults to set it otherwise we get a termination. OpenSimDefaults should describe all available variables a user is able to set, yet not be required to even exist, it should mainly serve as documentation, in my opinion.
(0034912)
Robert Adams (administrator)
2019-03-06 14:00

Thinking of adding all parameters should be balanced with the need to not confuse and overwhelm a poor Grid admin. BulletSim has a total of 155 parameters! Most have to due with tuning (I made any constant into a parameter) and would not be useful or informative in OpenSimDefaults.ini.

A good discussion to have is whether my selection of useful parameters in OpenSimDefaults is correct. Adding or removing parameters could help future grid owners.
(0034913)
aiaustin (developer)
2019-03-06 14:03
edited on: 2019-03-06 14:11

Good point. 155!

As @tampa suggests, I actually thought OpenSimDefaults.ini reflected all possible parameters and gave the code default in each case.


OpenSim.ini.example being the selected subset of those that are usually helpful to a grid configurer. But the grid admin could go to OpenSimDefaults.ini for less commonly set parameters to copy them over to their own OpenSim.ini.

(0034914)
Robert Adams (administrator)
2019-03-06 14:05

I am not sure adding AvatarAddForcePushFactor to OpenSimDefaults.ini is a good idea. It is a tuning parameter that is a parameter for just that -- tuning. Once set, it shouldn't have to change.

That said, if the tuned parameter value is wrong, it should be changed. A test would be to setup a test and see what SL does (how far does the avatar move for a certain force), then what ubODE does, and then what BulletSim does. The BulletSim tuning parameter value can then be changed with the console command to find a better value.

This is a force, so the amount of movement depends on the mass of the avatar. The different physics engines could be computing a different avatar mass. Also, avatars of different sizes have different mass so their movement would be different.
(0034915)
aiaustin (developer)
2019-03-06 14:10

Got it... I do understand tuning is dfferent to configuration for individual grids, Thx.
(0034916)
tampa (reporter)
2019-03-06 14:10

I always liked how the values were present in OpenSimDefaults, but commented out, simply stating what the default in-code would be set to. The configs, with all their comments, are already quite complex and sensory-overload when reading, adding a bit more fuel to the fire is not going to make the bonfire any bigger. I simply feel that OpenSimDefaults should really be a "description" or documentation of what is calculated and how, with variables to observe, all the while not actually requiring any of it to be set. OpenSim, in my opinion, should run without OpenSimDefaults having any variable or section set. Though, again, just my opinion, I like the modularity and customizability of OpenSim and that spirit should be encouraged, not locked away because someone may get confused, because, let's face it, they do regardless.

- Issue History
Date Modified Username Field Change
2019-03-05 03:05 JeffKelley New Issue
2019-03-05 03:58 UbitUmarov Note Added: 0034901
2019-03-05 09:44 Robert Adams Note Added: 0034902
2019-03-05 15:13 JeffKelley Note Added: 0034903
2019-03-05 15:14 JeffKelley Note Edited: 0034903 View Revisions
2019-03-05 17:56 tampa Note Added: 0034904
2019-03-06 00:59 JeffKelley Note Added: 0034905
2019-03-06 09:43 Robert Adams Note Added: 0034906
2019-03-06 09:56 tampa Note Added: 0034907
2019-03-06 10:35 Robert Adams Note Added: 0034908
2019-03-06 11:06 JeffKelley Note Added: 0034909
2019-03-06 11:06 JeffKelley Status new => resolved
2019-03-06 11:06 JeffKelley Resolution open => fixed
2019-03-06 11:06 JeffKelley Assigned To => JeffKelley
2019-03-06 12:27 aiaustin Assigned To JeffKelley => Robert Adams
2019-03-06 12:27 aiaustin Note Added: 0034910
2019-03-06 12:27 aiaustin Status resolved => feedback
2019-03-06 12:27 aiaustin Resolution fixed => reopened
2019-03-06 13:33 tampa Note Added: 0034911
2019-03-06 14:00 Robert Adams Note Added: 0034912
2019-03-06 14:03 aiaustin Note Added: 0034913
2019-03-06 14:05 aiaustin Note Edited: 0034913 View Revisions
2019-03-06 14:05 Robert Adams Note Added: 0034914
2019-03-06 14:08 aiaustin Note Edited: 0034913 View Revisions
2019-03-06 14:10 aiaustin Note Added: 0034915
2019-03-06 14:10 tampa Note Added: 0034916
2019-03-06 14:11 aiaustin Note Edited: 0034913 View Revisions


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker