跳到主要内容

Generic6DOFJoint

继承

Joint

简要描述

通用的6自由度关节可以通过锁定某些轴的旋转或平移来实现多种关节类型。

描述

前3个自由度轴是线性轴,代表实体的平移,后3个自由度轴代表角运动。每个轴可以被锁定,也可以被限制。

成员

类型属性名默认值
floatangular_limit_x/damping1.0
boolangular_limit_x/enabledtrue
floatangular_limit_x/erp0.5
floatangular_limit_x/force_limit0.0
floatangular_limit_x/lower_angle0.0
floatangular_limit_x/restitution0.0
floatangular_limit_x/softness0.5
floatangular_limit_x/upper_angle0.0
floatangular_limit_y/damping1.0
boolangular_limit_y/enabledtrue
floatangular_limit_y/erp0.5
floatangular_limit_y/force_limit0.0
floatangular_limit_y/lower_angle0.0
floatangular_limit_y/restitution0.0
floatangular_limit_y/softness0.5
floatangular_limit_y/upper_angle0.0
floatangular_limit_z/damping1.0
boolangular_limit_z/enabledtrue
floatangular_limit_z/erp0.5
floatangular_limit_z/force_limit0.0
floatangular_limit_z/lower_angle0.0
floatangular_limit_z/restitution0.0
floatangular_limit_z/softness0.5
floatangular_limit_z/upper_angle0.0
boolangular_motor_x/enabledfalse
floatangular_motor_x/force_limit300.0
floatangular_motor_x/target_velocity0.0
boolangular_motor_y/enabledfalse
floatangular_motor_y/force_limit300.0
floatangular_motor_y/target_velocity0.0
boolangular_motor_z/enabledfalse
floatangular_motor_z/force_limit300.0
floatangular_motor_z/target_velocity0.0
floatangular_spring_x/damping0.0
boolangular_spring_x/enabledfalse
floatangular_spring_x/equilibrium_point0.0
floatangular_spring_x/stiffness0.0
floatangular_spring_y/damping0.0
boolangular_spring_y/enabledfalse
floatangular_spring_y/equilibrium_point0.0
floatangular_spring_y/stiffness0.0
floatangular_spring_z/damping0.0
boolangular_spring_z/enabledfalse
floatangular_spring_z/equilibrium_point0.0
floatangular_spring_z/stiffness0.0
floatlinear_limit_x/damping1.0
boollinear_limit_x/enabledtrue
floatlinear_limit_x/lower_distance0.0
floatlinear_limit_x/restitution0.5
floatlinear_limit_x/softness0.7
floatlinear_limit_x/upper_distance0.0
floatlinear_limit_y/damping1.0
boollinear_limit_y/enabledtrue
floatlinear_limit_y/lower_distance0.0
floatlinear_limit_y/restitution0.5
floatlinear_limit_y/softness0.7
floatlinear_limit_y/upper_distance0.0
floatlinear_limit_z/damping1.0
boollinear_limit_z/enabledtrue
floatlinear_limit_z/lower_distance0.0
floatlinear_limit_z/restitution0.5
floatlinear_limit_z/softness0.7
floatlinear_limit_z/upper_distance0.0
boollinear_motor_x/enabledfalse
floatlinear_motor_x/force_limit0.0
floatlinear_motor_x/target_velocity0.0
boollinear_motor_y/enabledfalse
floatlinear_motor_y/force_limit0.0
floatlinear_motor_y/target_velocity0.0
boollinear_motor_z/enabledfalse
floatlinear_motor_z/force_limit0.0
floatlinear_motor_z/target_velocity0.0
floatlinear_spring_x/damping0.01
boollinear_spring_x/enabledfalse
floatlinear_spring_x/equilibrium_point0.0
floatlinear_spring_x/stiffness0.01
floatlinear_spring_y/damping0.01
boollinear_spring_y/enabledfalse
floatlinear_spring_y/equilibrium_point0.0
floatlinear_spring_y/stiffness0.01
floatlinear_spring_z/damping0.01
boollinear_spring_z/enabledfalse
floatlinear_spring_z/equilibrium_point0.0
floatlinear_spring_z/stiffness0.01
intprecision1

方法

返回值类型方法名称
boolget_flag_x(flag: int) const
boolget_flag_y(flag: int) const
boolget_flag_z(flag: int) const
floatget_param_x(param: int) const
floatget_param_y(param: int) const
floatget_param_z(param: int) const
voidset_flag_x(flag: int, value: bool)
voidset_flag_y(flag: int, value: bool)
voidset_flag_z(flag: int, value: bool)
voidset_param_x(param: int, value: float)
voidset_param_y(param: int, value: float)
voidset_param_z(param: int, value: float)

枚举

enum Param:

  • **PARAM_LINEAR_LOWER_LIMIT = 0**

枢轴点轴线之间的最小差。

  • **PARAM_LINEAR_UPPER_LIMIT = 1**

枢轴点轴之间的最大差。

  • **PARAM_LINEAR_LIMIT_SOFTNESS = 2**

应用于跨轴运动的因素。

  • **PARAM_LINEAR_RESTITUTION = 3**

恢复轴运动量。

  • **PARAM_LINEAR_DAMPING = 4**

跨轴直线运动时发生的阻尼量。

  • **PARAM_LINEAR_MOTOR_TARGET_VELOCITY = 5**

线性电动机将尝试达到的速度。

  • **PARAM_LINEAR_MOTOR_FORCE_LIMIT = 6**

线性马达在尝试达到速度目标时将施加的最大力。

  • **PARAM_ANGULAR_LOWER_LIMIT = 10**

沿负方向的最小旋转会松动并绕轴旋转。

  • **PARAM_ANGULAR_UPPER_LIMIT = 11**

朝正方向的最小旋转会松动并绕轴旋转。

  • **PARAM_ANGULAR_LIMIT_SOFTNESS = 12**

轴上所有旋转的速度。

  • **PARAM_ANGULAR_DAMPING = 13**

轴上的旋转阻尼量。越低,阻尼就越大。

  • **PARAM_ANGULAR_RESTITUTION = 14**

轴上的旋转恢复量。越低,越容易恢复。

  • **PARAM_ANGULAR_FORCE_LIMIT = 15**

绕轴旋转时可能出现的最大力。

  • **PARAM_ANGULAR_ERP = 16**

跨轴旋转时,此容错系数定义了校正速度变慢的程度。越低越慢。

  • **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY = 17**

轴上电机的目标速度。

  • **PARAM_ANGULAR_MOTOR_FORCE_LIMIT = 18**

电机在轴上的最大加速度。

  • **PARAM_MAX = 22**

表示Param枚举的大小。


enum Flag:

  • **FLAG_ENABLE_LINEAR_LIMIT = 0**

如果启用,则可以在给定的范围内进行线性运动。

  • **FLAG_ENABLE_ANGULAR_LIMIT = 1**

如果启用,则旋转运动可能在给定的范围内。

  • **FLAG_ENABLE_LINEAR_SPRING = 3**
  • **FLAG_ENABLE_ANGULAR_SPRING = 2**
  • **FLAG_ENABLE_MOTOR = 4**

如果启用,则在这些轴上都有旋转电机。

  • **FLAG_ENABLE_LINEAR_MOTOR = 5**

如果启用,则在这些轴上有一个线性电动机。

  • **FLAG_MAX = 6**

表示Flag枚举的大小。


常量

成员说明

  • float angular_limit_x/damping
Default1.0
setterset_param_x(value)
getterget_param_x
  • bool angular_limit_x/enabled
Defaulttrue
setterset_flag_x(value)
getterget_flag_x
  • float angular_limit_x/erp
Default0.5
setterset_param_x(value)
getterget_param_x
  • float angular_limit_x/force_limit
Default0.0
setterset_param_x(value)
getterget_param_x
  • float angular_limit_x/lower_angle
Default0.0
setter_set_angular_lo_limit_x(value)
getter_get_angular_lo_limit_x
  • float angular_limit_x/restitution
Default0.0
setterset_param_x(value)
getterget_param_x
  • float angular_limit_x/softness
Default0.5
setterset_param_x(value)
getterget_param_x
  • float angular_limit_x/upper_angle
Default0.0
setter_set_angular_hi_limit_x(value)
getter_get_angular_hi_limit_x
  • float angular_limit_y/damping
Default1.0
setterset_param_y(value)
getterget_param_y
  • bool angular_limit_y/enabled
Defaulttrue
setterset_flag_y(value)
getterget_flag_y
  • float angular_limit_y/erp
Default0.5
setterset_param_y(value)
getterget_param_y
  • float angular_limit_y/force_limit
Default0.0
setterset_param_y(value)
getterget_param_y
  • float angular_limit_y/lower_angle
Default0.0
setter_set_angular_lo_limit_y(value)
getter_get_angular_lo_limit_y
  • float angular_limit_y/restitution
Default0.0
setterset_param_y(value)
getterget_param_y
  • float angular_limit_y/softness
Default0.5
setterset_param_y(value)
getterget_param_y
  • float angular_limit_y/upper_angle
Default0.0
setter_set_angular_hi_limit_y(value)
getter_get_angular_hi_limit_y
  • float angular_limit_z/damping
Default1.0
setterset_param_z(value)
getterget_param_z
  • bool angular_limit_z/enabled
Defaulttrue
setterset_flag_z(value)
getterget_flag_z
  • float angular_limit_z/erp
Default0.5
setterset_param_z(value)
getterget_param_z
  • float angular_limit_z/force_limit
Default0.0
setterset_param_z(value)
getterget_param_z
  • float angular_limit_z/lower_angle
Default0.0
setter_set_angular_lo_limit_z(value)
getter_get_angular_lo_limit_z
  • float angular_limit_z/restitution
Default0.0
setterset_param_z(value)
getterget_param_z
  • float angular_limit_z/softness
Default0.5
setterset_param_z(value)
getterget_param_z
  • float angular_limit_z/upper_angle
Default0.0
setter_set_angular_hi_limit_z(value)
getter_get_angular_hi_limit_z
  • bool angular_motor_x/enabled
Defaultfalse
setterset_flag_x(value)
getterget_flag_x
  • float angular_motor_x/force_limit
Default300.0
setterset_param_x(value)
getterget_param_x
  • float angular_motor_x/target_velocity
Default0.0
setterset_param_x(value)
getterget_param_x
  • bool angular_motor_y/enabled
Defaultfalse
setterset_flag_y(value)
getterget_flag_y
  • float angular_motor_y/force_limit
Default300.0
setterset_param_y(value)
getterget_param_y
  • float angular_motor_y/target_velocity
Default0.0
setterset_param_y(value)
getterget_param_y
  • bool angular_motor_z/enabled
Defaultfalse
setterset_flag_z(value)
getterget_flag_z
  • float angular_motor_z/force_limit
Default300.0
setterset_param_z(value)
getterget_param_z
  • float angular_motor_z/target_velocity
Default0.0
setterset_param_z(value)
getterget_param_z
  • float angular_spring_x/damping
Default0.0
setterset_param_x(value)
getterget_param_x
  • bool angular_spring_x/enabled
Defaultfalse
setterset_flag_x(value)
getterget_flag_x
  • float angular_spring_x/equilibrium_point
Default0.0
setterset_param_x(value)
getterget_param_x
  • float angular_spring_x/stiffness
Default0.0
setterset_param_x(value)
getterget_param_x
  • float angular_spring_y/damping
Default0.0
setterset_param_y(value)
getterget_param_y
  • bool angular_spring_y/enabled
Defaultfalse
setterset_flag_y(value)
getterget_flag_y
  • float angular_spring_y/equilibrium_point
Default0.0
setterset_param_y(value)
getterget_param_y
  • float angular_spring_y/stiffness
Default0.0
setterset_param_y(value)
getterget_param_y
  • float angular_spring_z/damping
Default0.0
setterset_param_z(value)
getterget_param_z
  • bool angular_spring_z/enabled
Defaultfalse
setterset_flag_z(value)
getterget_flag_z
  • float angular_spring_z/equilibrium_point
Default0.0
setterset_param_z(value)
getterget_param_z
  • float angular_spring_z/stiffness
Default0.0
setterset_param_z(value)
getterget_param_z
  • float linear_limit_x/damping
Default1.0
setterset_param_x(value)
getterget_param_x
  • bool linear_limit_x/enabled
Defaulttrue
setterset_flag_x(value)
getterget_flag_x
  • float linear_limit_x/lower_distance
Default0.0
setterset_param_x(value)
getterget_param_x
  • float linear_limit_x/restitution
Default0.5
setterset_param_x(value)
getterget_param_x
  • float linear_limit_x/softness
Default0.7
setterset_param_x(value)
getterget_param_x
  • float linear_limit_x/upper_distance
Default0.0
setterset_param_x(value)
getterget_param_x
  • float linear_limit_y/damping
Default1.0
setterset_param_y(value)
getterget_param_y
  • bool linear_limit_y/enabled
Defaulttrue
setterset_flag_y(value)
getterget_flag_y
  • float linear_limit_y/lower_distance
Default0.0
setterset_param_y(value)
getterget_param_y
  • float linear_limit_y/restitution
Default0.5
setterset_param_y(value)
getterget_param_y
  • float linear_limit_y/softness
Default0.7
setterset_param_y(value)
getterget_param_y
  • float linear_limit_y/upper_distance
Default0.0
setterset_param_y(value)
getterget_param_y
  • float linear_limit_z/damping
Default1.0
setterset_param_z(value)
getterget_param_z
  • bool linear_limit_z/enabled
Defaulttrue
setterset_flag_z(value)
getterget_flag_z
  • float linear_limit_z/lower_distance
Default0.0
setterset_param_z(value)
getterget_param_z
  • float linear_limit_z/restitution
Default0.5
setterset_param_z(value)
getterget_param_z
  • float linear_limit_z/softness
Default0.7
setterset_param_z(value)
getterget_param_z
  • float linear_limit_z/upper_distance
Default0.0
setterset_param_z(value)
getterget_param_z
  • bool linear_motor_x/enabled
Defaultfalse
setterset_flag_x(value)
getterget_flag_x
  • float linear_motor_x/force_limit
Default0.0
setterset_param_x(value)
getterget_param_x
  • float linear_motor_x/target_velocity
Default0.0
setterset_param_x(value)
getterget_param_x
  • bool linear_motor_y/enabled
Defaultfalse
setterset_flag_y(value)
getterget_flag_y
  • float linear_motor_y/force_limit
Default0.0
setterset_param_y(value)
getterget_param_y
  • float linear_motor_y/target_velocity
Default0.0
setterset_param_y(value)
getterget_param_y
  • bool linear_motor_z/enabled
Defaultfalse
setterset_flag_z(value)
getterget_flag_z
  • float linear_motor_z/force_limit
Default0.0
setterset_param_z(value)
getterget_param_z
  • float linear_motor_z/target_velocity
Default0.0
setterset_param_z(value)
getterget_param_z
  • float linear_spring_x/damping
Default0.01
setterset_param_x(value)
getterget_param_x
  • bool linear_spring_x/enabled
Defaultfalse
setterset_flag_x(value)
getterget_flag_x
  • float linear_spring_x/equilibrium_point
Default0.0
setterset_param_x(value)
getterget_param_x
  • float linear_spring_x/stiffness
Default0.01
setterset_param_x(value)
getterget_param_x
  • float linear_spring_y/damping
Default0.01
setterset_param_y(value)
getterget_param_y
  • bool linear_spring_y/enabled
Defaultfalse
setterset_flag_y(value)
getterget_flag_y
  • float linear_spring_y/equilibrium_point
Default0.0
setterset_param_y(value)
getterget_param_y
  • float linear_spring_y/stiffness
Default0.01
setterset_param_y(value)
getterget_param_y
  • float linear_spring_z/damping
Default0.01
setterset_param_z(value)
getterget_param_z
  • bool linear_spring_z/enabled
Defaultfalse
setterset_flag_z(value)
getterget_flag_z
  • float linear_spring_z/equilibrium_point
Default0.0
setterset_param_z(value)
getterget_param_z
  • float linear_spring_z/stiffness
Default0.01
setterset_param_z(value)
getterget_param_z
  • int precision
Default1
setterset_precision(value)
getterget_precision

方法说明

  • get_flag_x get_flag_x(flag: int) const

  • get_flag_y get_flag_y(flag: int) const

  • get_flag_z get_flag_z(flag: int) const

  • get_param_x get_param_x(param: int) const

  • get_param_y get_param_y(param: int) const

  • get_param_z get_param_z(param: int) const

  • set_flag_x set_flag_x(flag: int, value: bool)

  • set_flag_y set_flag_y(flag: int, value: bool)

  • set_flag_z set_flag_z(flag: int, value: bool)

  • set_param_x set_param_x(param: int, value: float)

  • set_param_y set_param_y(param: int, value: float)

  • set_param_z set_param_z(param: int, value: float)