I am using the indigo-devel branch of the fanuc_driver.
First: please use fanuc_driver_exp instead of fanuc_driver
(it's a drop-in replacement for the controller side of fanuc_driver
).
As to executing TP programs: that is not something that fanuc_driver_exp
currently supports (nor fanuc_driver
). You could either extend fanuc_driver_exp
with such functionality (which should not be terribly difficult, but would be some work in Karel), or perhaps -- if your programs would really just be (re)setting digital or analog IOs -- just control the IOs directly.
For that you could use either a fieldbus integrated with ROS (there are some packages for that, Ethernet/IP, modbus or profinet fi) but you would need fieldbus support on your Fanuc controller (or a PLC) or you could see whether gavanderhoorn/fanuc_ros_cgio_py is sufficiently performant. It is not meant for production use, but for the occasional ON/OFF in a research/hobby setting it might be enough.
There is no ROS node, but the Python library should be easy enough to wrap in a simple node with two services that toggle your IOs.
Edit:
I will update the post if I get the time to try either of the methods. I was hoping there would be a hacky/quick fix type of way of doing this but I guess not.
Not sure whether this would be any faster (as it would still require some programming), but you could potentially use the RSR or PNS system (digital IOs triggering execution of programs) in combination with your short programs to open/close the gripper.
Another alternative: use a PLC with some "easier" interface than digital IOs to control the IO of the gripper.
I saw gavanderhoorn/fanuc_ros_cgio_py before I posted but I don't think I can implement this with the time constraint I have
Literally the only thing missing would be a Python Service Server that exposes two services: open
and close
.
In open
, it calls robot.write_dout(..)
with as argument the DOUT that opens your gripper, and in close
it calls robot.write_dout(..)
with as argument the DOUT that closes your gripper.
Provided your gripper actually works that way, that should be 30 mins work, max.
If your gripper is controlled using ROUT
(ie: robot out), you could even check the example.
Edit 2: just came across ABC-iRobotics/fanuc-webcontrol, which contains a program called webstart which can apparently be used to start TP programs by just visiting a URL. Similar to the idea in gavanderhoorn/fanuc_ros_cgio
, but one step closer to what you asked for (ie: starting programs).
Would still need wrapping in a ROS node, but that would probably be even easier than with gavanderhoorn/fanuc_ros_cgio_py
.
Which driver are you using?
gvdhoorn,
Thanks for the prompt reply and all the work you put into Fanuc packages. I am using the indigo-devel branch of the fanuc_driver. The controller is R30i and the TP version is v7.70P/31.