Search code examples
pythonsimulationrosgazebo-simu

Is it possible to make a model in gazebo invisible via ros/python?


I'm testing an algorithm on a model of a robot on gazebo, for an experiment i need to perform some blind trials so i need to control a robot without seen it and after a timeout make it visible again via code in real time. i'm coding with python and ros. is it possible ?


Solution

  • I suppose that you mean you need your robot invisible to some vision-related algorithms running at the same time.

    Then I'm afraid once a model is "spawned" into the gazebo world, some feature like transparency can not be changed.

    So in my opinion, when you need to change the visibility, maybe you can store the latest states of your robot, like position\velocity etc, remove the invisible model, and then spawn a new visible model in the same states.

    Just a quick thought.