WPI-AIM / ambf

Asynchronous Multi-Body Framework
163 stars 67 forks source link

Interaction Forces with softbody #184

Closed JohannesSchwaiger closed 2 years ago

JohannesSchwaiger commented 2 years ago

Hello Adnan,

thanks again for your implementation of softbody grasping! Sorry to bother you with another issue.

I dont seem to get any interaction forces between the softbody and the grasper, is that correct? My current understanding is that sensed/grasped vertices are fixated a set distance to the actuator without actual interaction with the body grasping it. The grasping body only provides the location (+offset) and no direct link is created. Therefore no forces and no pull is transfered from the softbody to the grasping object. Is my understanding here correct? Or should a "rubber band be able to excert forces on the grasper?

Kind regards, Johannes

adnanmunawar commented 2 years ago

Hi Johannes,

Hmm, did you set the "enable feedback" to True for the "joint" connecting the "link" (rigid body) on which the sensors/actuators are attached to?

This is what the output for the /ambf/env/Link7/State/wrench/force looks like when I set the enable feedback flag in the ADF file for JOINT Link6-Link7 as shown in the snippet below.

JOINT Link6-Link7:
  name: Link6-Link7
  parent: BODY Link6
  child: BODY Link7
  parent axis:
    x: 0.0
    y: -1.0
    z: -0.0
  parent pivot:
    x: 0.00048
    y: -0.09359
    z: 0.07237
  child axis:
    x: 0.0
    y: 0.0
    z: 1.0
  child pivot:
    x: 0.0
    y: 0.0
    z: 0.0
  joint limits:
    high: 2.74889
    low: -2.74889
  enable feedback: true # <----- This boolean flag
  passive: false
  controller:
    P: 0.1346
    I: 0.00135
    D: 0.00135
  controller output type: VELOCITY
  type: revolute
  max motor impulse: 0.05000000074505806
  damping: 0.95

You can of course set this flag for the joint using the Blender add-on as well.

https://user-images.githubusercontent.com/5005445/184792730-89752653-f679-4d30-8912-902a867fc79c.mp4