Hello Antonio!
Sounds like you are trying to do navigation?
We have a (free) minimal setup simulator tutorial here:
http://www.clearpathrobotics.com/assets/guides/jackal/navigation.html
(You should read the earlier pages on how to setup the sim)
Take a look at it, and tear it apart to see how it works.
We also have more general tutorials here:
http://www.clearpathrobotics.com/assets/guides/ros/
Best wishes, and good luck!
Ilia B.