现有组件功能与Amesim组件比较对齐,补全功能;仿真服务启动环境检测,旧版json工程文件适配读取
This commit is contained in:
1 parent
b6c22a54f8
commit
6fc9afe41d
119 files changed
+260114
-351
No files matched your search
@@ -1,6 +1,15 @@
|
||||
#include "kernels.h"
|
||||
#include <math.h>
|
||||
|
||||
double native_dry_friction(double velocity, double static_share, double coulomb,
|
||||
double stiction, double stribeck_velocity, int stribeck,
|
||||
double mode) {
|
||||
if (fabs(mode)<.5) return -static_share;
|
||||
double resistance=coulomb;
|
||||
if (stribeck) resistance+=(stiction-coulomb)*exp(-3*fabs(velocity)/stribeck_velocity);
|
||||
return mode>0 ? -resistance : resistance;
|
||||
}
|
||||
|
||||
double native_contact(double penetration, double velocity, double stiffness,
|
||||
double damping, double pdis, int signed_force) {
|
||||
if (penetration <= 0) return 0;
|
||||
@@ -21,7 +30,5 @@ void native_stop_motion(double x, double v, double lower, double upper,
|
||||
|
||||
double native_limit_force(double penetration, double velocity, double stiffness,
|
||||
double damping, double depth, int signed_force) {
|
||||
if(penetration<=0) return 0;
|
||||
double force=stiffness*penetration+(depth>0?fmin(penetration/depth,1):1)*damping*velocity;
|
||||
return signed_force==1?force:fmax(force,0);
|
||||
return native_contact(penetration, velocity, stiffness, damping, depth, signed_force);
|
||||
}
|
||||
Reference in new issue
Block a user