Switching between cameras and network tables
9 months
I am having an issue with my program. The goal is to be able to switch between cameras at the push of a button on my joystick. I am able to toggle between the different marker modules, but only one camera is giving me an image. For example, camera 0 will be giving an image, but when I toggle to the second marker the image from camera 1 is just a black screen. Both cameras work independently but not together in the way it is set up currently in the program that I posted. Please help

Steven Gentner from United States  [260 posts] 9 months
How are you accessing the image? Using the webserver?

It doesn't seem like your robofile would work at all in terms of toggling since it doesn't seem like you are actually loading a new image using the Marker module. Perhaps you can just press the Save button and type in something.robo and attach that robofile to this post? I also don't see the joystick module ... or is that being fed into RR via the API?

Perhaps have a look at the attached as to how I would expect this to work. See included comments in the robofile.


Anonymous 9 months
So how my program works now is that in my program in eclipse I have it say that if a button on the ps4 controller is pressed, put a value in the network table. This value on the network table in read in by roborealm and then I do the program that is in my original post. The end goal is to put filters on these images, get the cogx and cogy, and send those values back through the network table to the robot so I can manipulate then for what I need. An image is never sent back to the robot, and the joystick is a physical ps4 controller.
Anonymous 9 months
What I also want is to switch between these cameras that have filters. For example, when I want the values from the image on my shooter I hit a button and those values are sent, and when I want the values from the image on the back of my robot I hit the button again to now stop sending the shooter values and start sending the new values.
Steven Gentner from United States  [260 posts] 9 months
That is certainly possible. Start simple, just get the values first being sent back for one image. Once you have that working its easier to add modules to switch between the two. I'd first ensure that you can get one image back with the appropriate values in the network table as that's the hard part. Perhaps you can post what you currently have as a robofile (press the save button, type in something.robo and post that file here) as the screenshot doesn't include the Network Tables module which is what would be required to receive and set variables from RR.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index