agxTerrain miscs

ショベル内の粒子質量を取得する terrain.getDynamicsMass(shovel)

import terrain

terrain.getDynamicsMass(shovel)
  • 図 18 の赤色粒子(InnerBody aggregate)の質量(kg)

ショベル上の粒子質量を取得する

import terrain

terrain.getToolCollection(shovel).getSoilParticleAggregate().getTotalAggregateMass()
  • 図 18 の赤(InnerBody)と青(WedgeBody)色粒子の質量(kg)

  • すくい上げているときのみ、ショベル上の粒子質量として扱える

  • ショベルの定義 cutting-directioncutting-edgetop-edge の範囲外粒子はカウントされない

Aggregate対象の粒子を可視化する

import agxTerrain
from agxPythonModules.utils.callbacks import StepEventCallback

def setVisualizeAggregatedParticles(terrain: agxTerrain.Terrain, shovel: agxTerrain.Shovel):
    def setAggregatedParticlesColor(time: float):
        tc: agxTerrain.TerrainToolCollection = terrain.getToolCollection(shovel)
        particleAggregate = tc.getSoilParticleAggregate()
        for particle in particleAggregate.getInnerBodyParticles():  # type: agx.GranularBodyPtr
            particle.setColor(agx.Vec4f(1, 0, 0, 1))
        for particle in particleAggregate.getWedgeBodyParticles():  # type: agx.GranularBodyPtr
            particle.setColor(agx.Vec4f(0, 0, 1, 1))

    StepEventCallback.postCallback(setAggregatedParticlesColor)

setVisualizeAggregatedParticles(terrain, shovel)
../../../../_images/soilAggregateParticles.drawio.png

図 18 Aggregate対象の粒子

粒子がショベルを通り抜ける場合の調整

次のとき、粒子がショベルを通り抜けることがある。

  • ショベルと粒子の相対速度が速い

  • ショベルの板厚が薄い

  • 粒子サイズが小さい

通り抜ける場合には優先度に応じて次の項目を調整する。

  • ショベル-粒子間のContactMaterialのDampingを調整し、侵入の解消を早める

    particleMat: agx.Material = terrain.getMaterial(agxTerrain.Terrain.MaterialType_PARTICLE)
    shovelParticleContactMaterial: agx.ContactMaterial = sim.getMaterialManager().getOrCreateContactMaterial(shovelMat, particleMat)
    shovelParticleContactMaterial.setDamping(2 * timeStep)
    
  • タイムステップを小さくし、衝突判定、衝突応答の頻度を上げる

    sim.setTimeStep(timestep)
    
  • ショベルの移動を遅くする

  • 薄い部分の形状を厚くする

  • 粒子サイズを大きくする

ショベル付近の粒子をテレインにマージさせないようにマージ禁止区域を拡げる shovel.setNoMergeExtensionDistance()

# shovel: agxTerrain.Shovel
shovel.setNoMergeExtensionDistance(1.0)
  • 禁止区域を距離mで指定する

  • agxViewer使用時は g でマージ禁止区域を可視化できる

  • 距離を長くすると、生存する粒子数が増加し、計算コストが増加するので注意すること

ショベル底面下の粒子をテレインにマージさせる閾値を調整する shovel.setVerticalBladeSoilMergeDistance()

# shovel: agxTerrain.Shovel
shovel.setVerticalBladeSoilMergeDistance(0.0)
  • 閾値を距離mで指定する

  • 油圧ショベルで掘削するときは、距離を0に設定し、即座にテレインにマージさせる

  • ブルドーザで整地やならし作業をするときは、ある程度の距離を設定し、粒子を進行方向に運搬できるようにする

ショベル内の土の容積率を取得する terrain.getLastDeadLoadFraction(shovel)

deadLoadFraction = terrain.getLastDeadLoadFraction(shovel)
  • 土の容積率(0 - 1)