gazebosim / gz-physics

Abstract physics interface designed to support simulation and rapid development of robot applications.
https://gazebosim.org
Apache License 2.0
62 stars 38 forks source link

bullet-featherstone: Non-base links return zero velocities #617

Open iche033 opened 3 months ago

iche033 commented 3 months ago

Environment

Description

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