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

Mouse interaction with simulated models

Open diegoferigo opened this issue 3 years ago • 1 comments

Other widely used simulators like mujoco and pybullet allow to interact in a dynamic sense (as opposed as pure kinematics) with models part of the simulation. This is something that also Gazebo Classic never had. The most that could be done was selecting links and applying wrenches (I though there was a closethegap ticket for this but maybe I was wrong).

You can see a nice mujoco demo here: https://www.youtube.com/watch?v=0ORsj_E17B0

diegoferigo avatar Aug 21 '20 20:08 diegoferigo

The most that could be done was selecting links and applying wrenches (I though there was a closethegap ticket for this but maybe I was wrong).

That's Gazebo classic's Apply Force and Torque tool, it's true that we're missing a close-the-gap issue for it

https://classic.gazebosim.org/tutorials?tut=apply_force_torque&cat=tools_utilities

The dialog approach allows more precision, while the mouse dragging interaction is more intuitive. I think both are great tools to add.

chapulina avatar May 26 '22 20:05 chapulina

for reference, bullet's example use a ball joint (aka point-to-point constraint) between the mouse cursor and a point on the body where the user clicked:

  • https://github.com/bulletphysics/bullet3/blob/39b8de74df93721add193e5b3d9ebee579faebf8/examples/CommonInterfaces/CommonRigidBodyBase.h#L231-L247
  • https://github.com/bulletphysics/bullet3/blob/39b8de74df93721add193e5b3d9ebee579faebf8/examples/CommonInterfaces/CommonRigidBodyBase.h#L313-L376

scpeters avatar Jun 05 '23 18:06 scpeters