ros-controls / gazebo_ros2_control

Wrappers, tools and additional API's for using ros2_control with Gazebo Classic
Apache License 2.0
189 stars 122 forks source link

Setting initial positions of a kinematic chain is not possible #132

Open christophfroehlich opened 2 years ago

christophfroehlich commented 2 years ago

As a followup to #108, I just came up with another limitation: With using kinematic chains in the gazebo model, the solution of using SetPosition does not work:

(1653985691 636065512) [Dbg] [Link.cc:1724] we have a loop! cannot find nice subset of connected links, this link boom_cylinder_barrel connects back to parent moved_with_q1. (1653985691 636103177) [Wrn] [Joint.cc:815] failed to find a clean set of connected links, i.e. this joint is inside a loop, cannot SetPosition kinematically.

The warnings are thrown here https://github.com/osrf/gazebo/blob/gazebo11/gazebo/physics/Joint.cc#L813-L819 https://github.com/osrf/gazebo/blob/gazebo11/gazebo/physics/Link.cc#L1672-L1677

As far as I understand, SetPosition is simply not possible with kinematic chains, because the solution of the kinematics equations is not implemented within gazebo via position interface? Or does someone know a workaround for this?

delipl commented 1 month ago

I'm just bumping this during looking for solutions :D https://robotics.stackexchange.com/questions/107157/how-to-control-a-closed-kinematic-chain-in-gazebo