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

Creating ball joint between models

Open rteklewold opened this issue 8 months ago • 4 comments

Hello I would like to know if it is possible to create a ball joint between two models using ignition gazebo plugin. On gazebo classic , it is possible to connect two models by creating a joint during runtime by adding such a code in a plugin:

physics::JointPtr j2; j2 = world->Physics()->CreateJoint("ball", d1); j2->Attach(l2, lb); j2->Load(l2, lb, pose_joint); j2->SetModel(cable); j2->Init();

Is there an equivalent feature on ignition gazebo? I have tried detachable joint but using that makes my drone unstable for some reason. I am trying to make a simulation of aerial cable towed system and I need to connect drones with links of another model using a ball joint.

Thank you

rteklewold avatar Oct 23 '23 16:10 rteklewold

Currently, it is only possible to create "fixed" joints dynamically using detachable joints.

azeey avatar Oct 23 '23 17:10 azeey

Thank you for your reply. Is there a plan to have this kind of feature soon on ignition gazebo? Am I maybe not respecting some constraints when I add a fixed joint between the base_linkand the drone_attach described in this world file? https://gitlab.univ-nantes.fr/ls2n-drones/ls2n_drone_armada/-/blob/main/worlds/armada_world.sdf

Link towards the model armada: https://gitlab.univ-nantes.fr/ls2n-drones/ls2n_drone_armada/-/blob/main/models/armada/armada.erb

Link towards the model crazy2fly drone: https://gitlab.univ-nantes.fr/ls2n-drones/ls2n_drone_sitl/-/blob/master/sitl_px4_simulation/models/crazy2fly/model.sdf

The behaviour is that changing the type of joint in world from fixed to ball type makes the drone fly as expected. But using fixed joint causes the drone to be unstable and go towards undesired direction. I would like to know why fixed joint causes problem.

Thanks in advance

rteklewold avatar Oct 24 '23 08:10 rteklewold

That's currently not in the roadmap. We would accept PRs though :)

Am I maybe not respecting some constraints when I add a fixed joint between the base_linkand the drone_attach described in this world file? https://gitlab.univ-nantes.fr/ls2n-drones/ls2n_drone_armada/-/blob/main/worlds/armada_world.sdf

It's difficult to tell. One thing I noticed is you have a link with a mass of 0.001 Kg as the attachment link between the drones and the armada. Having small masses connected to large masses usually causes instabilities in simulation. Can you use a <frame> instead? Also, Is it possible to demonstrate the problem with a simple example so it's easy to tell where the problem might be?

azeey avatar Nov 13 '23 16:11 azeey

@rteklewold I am trying the similar thing on a different application of aerial cables. Did you solve your issue ? Can you let me know how did you solve your problem ?

vbalaji21 avatar Mar 13 '24 11:03 vbalaji21