gz-physics icon indicating copy to clipboard operation
gz-physics copied to clipboard

bullet-featherstone: Non-base links return zero velocities

Open iche033 opened this issue 10 months ago • 0 comments

Environment

  • OS Version: Ubuntu 22.04
  • Source or binary build? source build, gz-physics7 and main branches

Description

  • Expected behavior: A moving non-base link should return correct linear and angular velocity values.
  • Actual behavior: Zero velocities are returned

In the bullet-featherstone plugin, non-base links currently returns zero linear and angular linear velocities. The relevant code for generating velocities for non-base links are located here: https://github.com/gazebosim/gz-physics/blob/2bc19ad0d7ca34f2150c765e8cce5d712ba117bd/bullet-featherstone/src/KinematicsFeatures.cc#L43-L44

A closer look at the bullet source code reveals that the btMultiBodyLink's m_absFrameTotVelocity variables are never filled unless btMultiBody::useGlobalVelcoties() is called and set to true

iche033 avatar Apr 05 '24 00:04 iche033