Unable to set up a connection between ROS machine and pilz hardware (prbt6)
Hello everyone,
currently I´m working on establishing a connection between my ROS computer and the Pilz hardware setup to control a prbt 6 manipulator (e. g. through RViz). Therefore I stick to the github documentation of Pilz itself (pilz_robots). Until now I was not able to build a stable connection via CAN. To be more specific, here is some information of my system:
- running Linux kernel 4.15.0-88-generic
- Ubuntu 16.04 LTS
- ROS distribution: kinetic
- Pilz packages (version 0.4.11) built in ROS workspace without errors
- PCAN-USB opto-decoupled adapter (type IPEH-002022; including the procedure of activating the internal termination)
From here my start routine looks like this:
- plug in pcan usb adapter to PMCPrimo and ethernet cable to PSS4000
- ping network without package loss
For the pcan I use the drivers, which are included in Linux Kernel:
$ grep PEAK_ /boot/config-`uname -r`
CONFIG_CAN_PEAK_PCIEFD=m
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_PEAK_USB=m
and do:
$ lsmod | grep ^peak
peak_usb 40960 0
for checking, if the adapter was initialized.
Get interace information:
$ ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
enp2s0 Link encap:Ethernet HWaddr 98:fa:9b:99:d8:91
inet addr:192.168.0.18 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::87be:19c5:3ddd:8684/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:88 errors:0 dropped:0 overruns:0 frame:0
TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9134 (9.1 KB) TX bytes:11009 (11.0 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:666 errors:0 dropped:0 overruns:0 frame:0
TX packets:666 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:76014 (76.0 KB) TX bytes:76014 (76.0 KB)
wlp4s0 Link encap:Ethernet HWaddr 10:63:c8:37:c9:67
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Set up CAN interface:
$ sudo ip link set can0 up type can bitrate 1000000
And launch the file:
$ roslaunch prbt_moveit_config moveit_planning_execution.launch sim:=false gripper:=pg70 pipeline:=ompl sto:=pss4000
While running the launch file I simultaneously check the CAN interface via:
$ ip -details -statistics link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 0
bitrate 1000000 sample-point 0.750
tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
82273 15303 0 0 0 0
TX: bytes packets errors dropped carrier collsns
4670 1746 0 0 0 0
and do:
$ candump -l can0
to save the output in attached log file.
Suspicious to me is that part, where following error occurred while running the launch file:
[ INFO] [1582714101.157859766]: Current state: 2 device error: system:125 internal_error: 0 (OK)
[ERROR] [1582714101.157979753]: not operational
[ INFO] [1582714101.158059302]: Current state: 0 device error: system:125 internal_error: 0 (OK)
[ INFO] [1582714101.158107563]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ INFO] [1582714101.158194864]: Current state: 0 device error: system:0 internal_error: 0 (OK)
but to be frank, i cant get a hint how to deal with this info and error messages.
Last week I somehow did get this connection working, so I was able to control the real prbt manipulator with RViz on my machine. At that point I had installed the external pcan driver package of peak system. Maybe the driver installation caused a reconfiguration, if this is possible. However I cannot reproduce this behavior anymore...
I´m quite new to actively use this forum, so I´m not able to bring up the whole terminal output of the roslaunch and candump commands. Do you have any suggestion, how to publish those information?
I´m sure you are more experienced in terms of connecting a ROS machine to hardware than me. So I hope you can tell me what I am doing wrong here.
Best regards
Florian
Asked by fkoegler on 2020-02-26 11:12:58 UTC
Answers
Sorry for the late reply!
plug in pcan usb adapter to PMCPrimo
You usually disconnect the Primo and connect your ROS PC directly to the robot.
What hardware setup do you have? Maybe our new Tutorial How To Setup The Robot can give you some more hint on troubleshooting?
Maybe upload the candump file to a gist and link it here?
Asked by jschleicher@Pilz on 2020-05-25 07:58:40 UTC
Comments