Spawn a SDF model in RViz
I created a MoveIt package for my robot, which is responsible for the robot appearing in RViz automatically but I don't know how it does it. How can I make a custom SDF model spawn in a certain position inside RViz? I want to add a table and a cube to try to do a pick and place operation, I want to think that it is something similar to how it is done in Gazebo.
What file should I modify to do the above and what lines of code should I add?
RViz is not a simulator. Gazebo is.
You cannot "spawn a [..] model in RViz".
The only thing RViz does is visualise data (it's in the name: Robot VIZualiser).