How do I toggle on/off my camera view in RViz through a parameter or message?
I have a camera set up in RViz using a gazebo simulation based on the urdf tutorials, which leaves the camera always on. I want to be able to press a key to toggle the camera on/off. I'm willing to accept hacks like zooming in to one black pixel or lowering the quality of the image until it's completely blurred. I'm also willing to change the camera to a second camera that's staring at a blank wall, so that a white or black pane shows up.
I've explored changing the zoom parameter of the camera from 1 to 1000, but it didn't do anything to affect the RViz Camera view (which remained at 1). I also tried using rosparam to change other parameters like image quality, but nothing actually changed in the image. I'm not sure how to change the topic the camera is subscribed to, for example to a static black image.
Do you have any suggestions?