I/O real FANUC robot

1,091 views
Skip to first unread message

Tiago Simoes

unread,
Apr 27, 2016, 9:46:08 AM4/27/16
to swri-ros-pkg-dev
Hello everybody
       I'm working with a real 6-DOF robot (FANUC LR MATE 200iD) R-30iB Mate controller. i've ROS indigo and ubuntu 14.04 lts
       So I use ROS_industrial+MOVEIT and i want to
       - view and edit the I/O of the robot;
       - access a program .TP present in the controller;
       Anyone have any idea how to do ? Thank you

Victor L

unread,
Apr 28, 2016, 7:19:35 AM4/28/16
to swri-ros-pkg-dev
Hello,

You probably want to read this topic:

I have written a post-processor for Fanuc robot that enables to generate Fanuc TP programs from ROS trajectories and adding any I/O you need (or labels etc.)

You can easily download Fanuc TP programs from the robot FTP; I'm not 100% sure but I don't think you need any specific option (other than having Ethernet on the robot) to be able to download an ASCII (*.ls) program. To upload a .ls program you need the ASCII Upload option.
Of course this is not ideal but rather a work-around I use at the moment.

Bye

Tiago Simoes

unread,
Apr 28, 2016, 8:37:23 AM4/28/16
to swri-ros-pkg-dev



Hello victor. Thanks for the reply: D

I had seen your post and helped me, however occured me this error.




In the file "fanuc_post_processor_applocation.cpp" I changed the fanuc_pp.uploadToFtp for the controller IP and file "fanuc_post_processor_library.hpp" changed the uploadToFtp (const std :: string ip_address, const std :: string port_number = "4900"); and appeared this error. You managed to solve in your situation?

Victor L

unread,
Apr 29, 2016, 2:28:49 PM4/29/16
to swri-ros-pkg-dev
Make sure you can ping the controller;

ping controller_ip_address
For example:
ping 192.168.100.200

If that works, try to connect to the FTP:

ftp
open 192.168.100.200

Then try to upload a program manually.
If it loops it probably means that the program is not correct (check the teach pendant error history)

Tiago Simoes

unread,
Apr 29, 2016, 3:29:03 PM4/29/16
to swri-ros-pkg-dev
Hello,

Again, thank you for availability. I followed exactly the procedure suggested and the error keeps. However, I created a video to demonstrate the FTP connection and download a file .tp.

https://www.youtube.com/watch?v=btwMLBGBecE

As my interest act the i/o, so I created a simple file to enable a file.

Thank you

Victor L

unread,
Apr 30, 2016, 7:51:12 AM4/30/16
to swri-ros-pkg-dev
Hi

Thanks for the video.
You are doing things right, the problem is that you are using credentials for the FTP and my method assumes an anonymous login on the FTP.

I created an issue describing the problem:

And a pull request that should fix this issue:

Can you tell me if it works with this fixed version ?

Tiago Simoes

unread,
Apr 30, 2016, 11:06:48 AM4/30/16
to swri-ros-pkg-dev

Hello

Thank you for availability.
I changed
what you suggested and error presiste. I created another video to facilitate the explanation and you watch the entire procedure.

https://www.youtube.com/watch?v=Kmzx4y19WUw&feature=youtu.be

However, and as you can see in the video, it does not get to run the "here3". I confirm that the file had been created and it appears so.

Thank you

Victor L

unread,
May 2, 2016, 5:18:10 AM5/2/16
to swri-ros-pkg-dev
Hey,

I discovered that I forgot to put a condition on a part of the code that manually adds a second group in the program when using poses.
I have updated all the branches (including the one with the credentials feature).

You are not using poses at the moment so you are not affected.

The upload is probably failing because you are adding a second axis group when using setDefaultGroup and your robot doesn't have a second group defined.
You should keep the post-processor program code as simple as this:

  FanucPostProcessor fanuc_pp;
  fanuc_pp.setProgramName("ros_tp_program");
  fanuc_pp.setProgramComment("ROS generated");
  fanuc_pp.useLineNumbers(false);
  fanuc_pp.appendComment("This is a ROS generated TP program");
  fanuc_pp.appendDigitalOutput(5, true);
  fanuc_pp.appendWait(0.5);
  fanuc_pp.appendDigitalOutput(5, false);

  std::string program;
  fanuc_pp.generateProgram(program);
  ROS_WARN_STREAM("This is the generated program:\n\n" << program);


If if still fails, please tell me what error do you get on your teach pendant ? The history should show something like "Error occured during load file 'ROS_TP_PROGRAM' on line 31, column 8".
If you don't get an error like this, try to put the program on the FTP server using the FTP put command and tell me if it works!

Bye

Tiago Simoes

unread,
May 2, 2016, 7:15:30 AM5/2/16
to swri-ros-pkg-dev
Hey,

I made another video, which followed all the steps suggested.
- CONNECTION via ftp and upload the file;
- Eliminated the file ROS_TP_PROGRAM;
- Re-download all the code and changed the code by copying the changes;
- Compiled performed and error presiste;
- I checked the list of programs and not uploaded;
- I checked the list of errors and no errors;

https://www.youtube.com/watch?v=BYPIQa-TC5k

Thank you

Victor L

unread,
May 2, 2016, 11:42:30 AM5/2/16
to swri-ros-pkg-dev
Can you try removing the credentials on the Fanuc FTP (allowing anonymous) and launch again? (removing the username and password of course)

I don't know how to setup a password on the Fanuc FTP, can you tell me how to?
I went to HOST COMS, list Servers, stopped, undefined, set a username /password to S1, defined and started it again but I can still log in without a password. (I also tried cold-starting the robot).

Tiago Simoes

unread,
May 9, 2016, 4:33:25 AM5/9/16
to swri-ros-pkg-dev
hy,

I'm sorry that it took to respond but I had to remove the credentials of the controller. Already managed to remove all credentials. However, it continues to generate error in the upload.

Do you have any
idea that might be? I made another video

https://www.youtube.com/watch?v=J37hD-TpeQQ

Thank you

G.A. vd. Hoorn - 3ME

unread,
May 9, 2016, 4:39:36 AM5/9/16
to swri-ros...@googlegroups.com
On 9-5-2016 10:33, Tiago Simoes wrote:
> hy,
>
> I'm sorry that it took to respond but I had to remove the credentials of the
> controller. Already managed to remove all credentials. However, it
> continues to generate error in the upload.
>
> Do you have any idea that might be? I made another video
>
> https://www.youtube.com/watch?v=J37hD-TpeQQ

From the video it looks like the 'fanuc_post_processor_application' is
trying to connect to TCP port 4900, while your 'ftp' command line
session uses the default 21.

I think 21 makes more sense for FTP-ing into a Fanuc controller, so I'd
try to get 'fanuc_post_processor_application' to use that port as well.


Gijs

PS: I can't find that nr anywhere in the post processor sources, so is
that something you added / changed?
Message has been deleted
Message has been deleted

Tiago Simoes

unread,
May 9, 2016, 6:46:53 AM5/9/16
to swri-ros-pkg-dev
hy,

Oh ok, I forgot the communication port for FTP. The problem is now solved :)




I already have the program on the controller and already run on the console. How do I run the program content without using the console?

Thank you all
Auto Generated Inline Image 1

Victor L

unread,
May 9, 2016, 7:46:15 AM5/9/16
to swri-ros-pkg-dev
Great!

Did you test with the credentials again?
Does it work?

If you are looking for a way to run the program on the robot after uploading it (via FTP/ROS), I don't know how to do it without using the Teach Pendant.

G.A. vd. Hoorn - 3ME

unread,
May 10, 2016, 9:32:47 AM5/10/16
to swri-ros...@googlegroups.com
On 05/09/2016 01:46 PM, Victor L wrote:
> Great!
>
> Did you test with the credentials again?
> Does it work?
>
> If you are looking for a way to run the program on the robot after
> uploading it (via FTP/ROS), I don't know how to do it without using the
> Teach Pendant.

There are several options, but none of those are currently available /
integrated with ROS:

1. use RSR or any of its variants (I think you already mentioned this)
2. use the KCL (if you have the option)
3. write a Karel program that acts as a CGI on the controller and
CALL_PROG(..)s or RUN_TASK(..)s a program you pass as a GET parameter of
a URL
4. use a fieldbus to drive some IO externally, then trigger a Karel
program (similar to 1, but lighter / more adhoc)
5. use a fieldbus to set a string register and a karel program to
watch that
6. extend the fanuc_driver (ROS & ctrlr side) to support a custom
message that starts a program for you

Note that all of these options (apart from 6 and maybe 3) probably
cannot be used while the Karel programs from fanuc_driver are running on
the controller.


Gijs


> Le lundi 9 mai 2016 12:46:53 UTC+2, Tiago Simoes a écrit :
>>
>> hy,
>>
>> Oh ok, I forgot the communication port for FTP. The problem is now solved
>> :)
>>
>>
>>

Tiago Simoes

unread,
May 10, 2016, 11:32:44 AM5/10/16
to swri-ros-pkg-dev
Hello

Victor L : yes, I put back the credentials and test the username and password and did successfully upload.

Gijs : I understand, I will analyze what is the best option, then I will say that I have chosen. However, the FANUC LR Mate 200ID, R-30iB Mate controller I'm using has a gripper actuated by a RO [7] = ON or OFF. To achieve actuate the gripper must change the state of the I/O. You could tell me a method to modify using the ROS Industrial?

Thank you all
Tiago Simões

G.A. vd. Hoorn - 3ME

unread,
May 10, 2016, 3:00:21 PM5/10/16
to swri-ros...@googlegroups.com
On 10-5-2016 17:32, Tiago Simoes wrote:
> Hello
[..]
> *Gijs : *I understand, I will analyze what is the best option, then I will
> say that I have chosen. However, the FANUC LR Mate 200ID, R-30iB Mate
> controller I'm using has a gripper actuated by a RO [7] = ON or OFF. To
> achieve actuate the gripper must change the state of the I/O. You could tell
> me a method to modify using the ROS Industrial?
[..]

Ah, that is something different from what I understood from your earlier
discussion with Victor.

For access to the controller's IOs, you can either use a fieldbus (which
I recommend, if you have the hardware and the options), or a
software-only method.

We do have a candidate REP for software-only access to a ROS-Industrial
driver spec compatible controller driver, but no implementations have
been released. The first implementation will (most likely) be for the
Fanuc driver, but it might take some time (it's being tested).

In the meantime, I wrote a small tool -- that is independent of
simple_message -- that should allow you to do what you want, as long as
you don't have too strict requirements for determinism and performance
(and your controller has the required options installed). See [1].

For simple 'gripper open', 'gripper close' type of actions this is
probably sufficient. In any other case, please use a fieldbus.

For use with ROS, I can imagine a simple Python Action server that
exposes a GripperCommand action interface and uses http.client (for
instance) to interact with the controller.

If you have any additional questions, let me know.


Gijs

[1] https://github.com/gavanderhoorn/fanuc_ros_cgio
Reply all
Reply to author
Forward
0 new messages