Functionality I would like:
Present an image (snapshot from camera) in a popup and present a boolean question to the user about the image.
So something like request_boolean_from_primary_client(“string”) but with the ability to show an image. Does anyone know how this could be accomplished or has written a custom popup to do something analogous?
Polyscope it self does not support this functionality. Some people have developed functionality like that by them self. If you would like to commercialize you solution in the show room. Please pay attention to the guidelines here
I’ve written a URCap (and can take photos, etc), but what I’m looking for is this “custom” popup to appear during the execution of the robot program itself.
I can’t tell if this is possible.
You can use script and can include an image in the message that gets displayed. You just use HTML in the message for the pop up and store the image on the robot controller. We do this on production robots today so we can convey better information to the user.
Could you share with us your script how to do this?
and please share where you put the images
Here is some code that we used in a cell
local ASCII_NEWLINE = 10 def dashboard_sendPopup(message, shouldHalt = False, closeFirst = False): if(closeFirst): dashboard_closePopup() end dashboard_sendCommand( str_cat("popup ", message) ) if(shouldHalt): halt end end def dashboard_closePopup(): dashboard_sendCommand("close popup") end def dashboard_sendCommand(command, host = "127.0.0.1", port = 29999): local socketName = network_getAutoGeneratedSocketName() socket_open(host, port, socketName) socket_send_string(command, socketName) socket_send_byte(ASCII_NEWLINE, socketName) socket_close(socketName) end
How the function would be used in the program
dashboard_sendPopup("<h1> Need to remove part from hand </h1> <p> <img src=file:/programs/greenTouchButton.png height=200 width=257 > </p> <p> </p> <p> Please press green touch button when you are ready for me to place the part in my gripper on the table </p>")
Notice that the image files are just stored in the programs folder.