Access Sony XC-56 camera on Fanuc robot using ROS
Hello,
I am trying to figure out how to use Fanuc's Sony camera with ROS. I am running ROS on R30iB controller and on PC I am using ROS Kinetic. The communication between the PC and the controller is with an Ethernet cable. Is it possible to somehow stream the video from controller to the IP address and use the camera as the IP camera? Is there any other option to obtain the camera image to PC without using the Fanuc iRVision software? Was anyone already successful in getting the camera working with ROS using some of the available ROS camera drivers or at least getting the camera image to PC running Linux?
Thanks!
Asked by razerblade on 2018-10-26 07:25:03 UTC
Comments
I don't believe this is possible, although I don't have any first-hand experience with the XC-56 (but I do have experience with Fanucs).
If frames from the camera can be viewed on a web page (and it doesn't use one of Fanucs ActiveX components for that) you might be able to write a grabber ..
Asked by gvdhoorn on 2018-10-26 07:35:33 UTC
.. that periodically downloads the current frame from the website that the robot controller serves and then convert that to a ROS message. That would not be very performant though.
Whether it would be possible to access camera images directly or connect it to your PC I wouldn't know.
Asked by gvdhoorn on 2018-10-26 07:40:07 UTC
Thanks for your answer! I had something similar in my mind but I think it uses some drivers specifically for Internet Explorer. And to get IE with ActiveX controllers working in Ubuntu would be fun I guess... Now, I have an idea to try to stream the images to the FTP server managed by controller...
Asked by razerblade on 2018-10-29 10:30:42 UTC
...and then write a script to stream the images through ROS message. Probably it still won't be too performant but I will give it a try. Do you maybe have experience with something similar?
Asked by razerblade on 2018-10-29 10:30:56 UTC
If you can capture some traffic (using Wireshark) fi between an internet explorer session and your robot controller while there is a live-view of the camera, we might be able to figure out the protocol. There is a small change we can work around the ActiveX components.
Asked by gvdhoorn on 2018-10-29 10:32:04 UTC
Ok, after some experimenting it appears the current captured frame from the camera can be accessed over HTTP easily, but it's a bit tricky to get the snapshot continuously updated. If you can figure that out though, it should be possible to use Python
requests
fi to write a node.Asked by gvdhoorn on 2018-10-29 11:39:46 UTC
Thanks, I downloaded Wireshark and came to the same url for latest live image. But now I do it like this: I start live image on computer with IE and then I remove the cable, put it to Linux computer and can get the last image from Windows computer plugged.Did you try to stream live on Teach Pendant?
Asked by razerblade on 2018-10-29 12:04:27 UTC
And then get the image on the Linux box without the windows get involved? Because I have some problems with iRVision setup (needs firmware update) on teach pendant...
Asked by razerblade on 2018-10-29 12:04:39 UTC
This is probably possible, but you'd need to figure out the exact sequence of HTTP GETs so you can "fake" the Internet Explorer page and make the controller make new snapshots. I've not spent more time on this, but ..
Asked by gvdhoorn on 2018-10-29 12:49:21 UTC
.. you should be able to figure out what the 'live view' page does and replicate that.
That would remove the need for Windows.
But again: I don't know how taxing this is on the controller's CPU.
Asked by gvdhoorn on 2018-10-29 12:50:12 UTC
Ok, thank you for all the help! I'll keep you updated if I figure something out.
Asked by razerblade on 2018-10-29 13:03:20 UTC
Did you ever get anything to work?
Asked by gvdhoorn on 2019-10-08 05:18:28 UTC
No, I was trying to figure sequence of HTTP GET commands but after some time I gave up and instead put an additional usb camera in the robot cell.
Asked by razerblade on 2019-10-11 14:05:30 UTC