Magnetic wheels to magnetic surface attachment

I am lost with trying to simulate a robot with four magnetic wheels attached to a magnetic boar,
I have tried to add magnetic tag and nothing happens.

I am currently working on a project of a four-magnetic-wheel robot that needs to drive vertically and a board (wall climbing robot) and what to create a simulation of it in gazebo. I have already a simulation of the robot (on the ground) and its being controller through joystick with diffdrive plugin.

if any one can help I would deeply appreciate it!

You’ll have to write your own plugin for that. There’s no out-of-the-box feature that would be able to simulate this. You basically need to add a force to each of the magnetic bodies in every simulation step.

Hi peci1, thanks for your responce!

Im pretty new to it and never built a plugin before, can you recommend a source that I can learn it from? I tried to look for some sources but got lost understanding which one is good and how could I implement it my self

There’s currently no good tutorial for writing plugins (AFAIK). The best you can do is look into the existing ones, e.g. gz-sim/src/systems/buoyancy at gz-sim9 · gazebosim/gz-sim · GitHub could be close.

These are some resources that might be handy:

https://gazebosim.org/api/sim/9/terminology.html

https://gazebosim.org/docs/latest/architecture/

https://gazebosim.org/api/sim/9/createsystemplugins.html