Physics Settings - YousafRaja/URoboSim GitHub Wiki

Enabling Substepping

UE4 physics substepping must be enabled for stable physics simulation. Information on how to do it can be found here (https://docs.unrealengine.com/latest/INT/Engine/Physics/Substepping/).

Substepping Components and Functions

By default, the FPS (frames per second) will influence the physics simulation. For more accurate simulation and to enable the use of robot controllers which run at higher frequencies, scene rendering and physics simulation should be separated. This is done by implementing custom components which have their own substepping functions. Currently the RStaticMeshComponent provides an example of how this can be done. Note that there are a lot of functions which cannot be called from within the substep callback. Also note that only components that can have a rigid body can do substepping. More information on this can be found here (http://www.aclockworkberry.com/unreal-engine-substepping/).

TODO:

  • Apply force from a ROS controller. One suggestion on how it can be done:

If it gets force from ros controller, it should be ros controller that call the addForce function with force direction and size. But currently ros controller doesn’t has any component (it is just a non-UObject c++ class), so it cannot run in “substepping” mode

a probably possible way is to create a new component class for ros bridge, in that component there should be pointers to all joints. In that component class substepping is implemented. In each substep, it gets force from rosbridge server and add forces to joints using the JointState information.