doosan-robotics / doosan-robot2

ROS 2 for Doosan Robot
BSD 3-Clause "New" or "Revised" License
64 stars 39 forks source link

Problem running dsr_control_node2 #10

Closed jtaveau closed 3 years ago

jtaveau commented 3 years ago

Hi, Every time I try to run the dsr_control_node2 with the launch files, I get this error :

I used ros2 launch dsr_control2 dsr_control2.launch.py, instead of the rviz launch to have only this error.

[INFO] [launch]: All log files can be found below /home/jtaveau/.ros/log/2021-06-22-11-03-49-470003-saluyt-247231 [INFO] [launch]: Default logging verbosity is set to INFO /home/jtaveau/moveit2_ws/install/dsr_control2/share/dsr_control2/config/default.yaml [INFO] [dsr_control_node2-1]: process started with pid [247240] [dsr_control_node2-1] [INFO] [1624352629.578406090] [dsr_control_node2]: g_node = 0x0x7fff587a7410 [dsr_control_node2-1] [INFO] [1624352629.578591177] [dsr_control_node2]: rate is 100 [dsr_control_node2-1] [INFO] [1624352629.578703692] [dsr_control_node2]: controller_manager is updating! [dsr_control_node2-1] [INFO] [1624352629.578949447] [dsr_hw_interface2]: name = dsr01 [dsr_control_node2-1] [INFO] [1624352629.578970939] [dsr_hw_interface2]: model = m1013 [dsr_control_node2-1] [INFO] [1624352629.578976680] [dsr_hw_interface2]: gripper = none [dsr_control_node2-1] [INFO] [1624352629.578982193] [dsr_hw_interface2]: name_space is dsr01, m1013

[dsr_control_node2-1] [INFO] [1624352629.648201131] [dsr_hw_interface2]: [dsr_hw_interface2] init() ==> setup callback fucntion [dsr_control_node2-1] [INFO] [1624352629.648250886] [dsr_hw_interface2]: joint_name = joint1 [dsr_control_node2-1] [INFO] [1624352629.648379565] [dsr_hw_interface2]: joint_name = joint2 [dsr_control_node2-1] [INFO] [1624352629.648409293] [dsr_hw_interface2]: joint_name = joint3 [dsr_control_node2-1] [INFO] [1624352629.648426622] [dsr_hw_interface2]: joint_name = joint4 [dsr_control_node2-1] [INFO] [1624352629.649017060] [dsr_hw_interface2]: joint_name = joint5 [dsr_control_node2-1] [INFO] [1624352629.649036958] [dsr_hw_interface2]: joint_name = joint6

[dsr_control_node2-1] [INFO] [1624352629.649058139] [dsr_hw_interface2]: init() ==> arm is standby [dsr_control_node2-1] [INFO] [1624352629.649122038] [dsr_hw_interface2]: host = 127.0.0.1 [dsr_control_node2-1] [INFO] [1624352629.649129870] [dsr_hw_interface2]: port = 12345 [dsr_control_node2-1] [INFO] [1624352629.649134501] [dsr_hw_interface2]: command = 1 [dsr_control_node2-1] [INFO] [1624352629.649138682] [dsr_hw_interface2]: mode = virtual [dsr_control_node2-1] [INFO] [1624352629.649142855] [dsr_hw_interface2]: host 127.0.0.1, port=12345 bCommand: 1, mode: virtual [dsr_control_node2-1] joint_name = joint1joint_name = joint2joint_name = joint3joint_name = joint4joint_name = joint5joint_name = joint6Connection refused [dsr_control_node2-1] [ERROR] [1624352629.649930486] [dsr_hw_interface2]: DRHWInterface::init() DRCF connecting ERROR!!! [dsr_control_node2-1] [ERROR] [1624352629.649953211] [dsr_control_node2]: Error initializing robot

[ERROR] [dsr_control_node2-1]: process has died [pid 247240, exit code -11, cmd '/home/jtaveau/moveit2_ws/install/dsr_control2/lib/dsr_control2/dsr_control_node2 --ros-args --params-file /tmp/launch_params_sw2nerns --params-file /tmp/launch_params_d_fnv78q --params-file /tmp/launch_params_tzx9c1k8 --params-file /tmp/launch_params_5imt5lon --params-file /tmp/launch_params_n9gdnyt7 --params-file /tmp/launch_params_5f_3wwyg --params-file /tmp/launch_params_q4vvj7g3 --params-file /tmp/launch_params_0twxt0ha --params-file /tmp/launch_params_b9kz3rvs --params-file /tmp/launch_params_v0x1_gxz'].

Could you help me, please ? I'm using Foxy on Debian Bullseye.

kong2983 commented 3 years ago

Did the emulator run normally? Try running the DRCF64 DRCF binary file in common2/bin/DRCF. If it runs normally, install the lib-pocodev package and run it again.

jtaveau commented 3 years ago

When I run it, I get : (env38) jtaveau@saluyt:~/doosan_ws$ ./src/doosan-robot2/common2/bin/DRCF/DRCF64


    Emulator of Doosan Robot Controller [ver M2.52]               
              [service port = 12345]                          
              [robot model = m1013(config/config.xml)]                       

And if I run run_drcf.sh, I get that :

(env38) jtaveau@saluyt:~/doosan_ws$ ./src/doosan-robot2/common2/bin/DRCF/run_drcf.sh Run Emulator of the Doosan Robot Controller dirname: ./src/doosan-robot2/common2/bin/DRCF/run_drcf.sh server_port: robot model: ARCH: 64-bit


    Emulator of Doosan Robot Controller [ver M2.52]               
              [service port = 12345]                          
              [robot model = m1013(config/config.xml)]                       

Cycle : 0.001000

START SYNC: 1624538826.097Mastering Process(Absolute Mismatch) 0

Xml File Path: config/MF/m1013.xmlXml File Path: config/MF/Group/m1013/DV3101300.xmlXml File Path: config/BV/MF_M1013.xmlConfig Servo#TP RECV: SEQ(1)-COM(1799) SERIAL SEQ-NO: 1#SB RECV: SEQ(1)-COM(1799)

TP RECV: SEQ(10001)-COM(1791)

SERIAL SEQ-NO: 10001#SB RECV: SEQ(10001)-COM(1791)

TP RECV: SEQ(10002)-COM(1798)

SERIAL SEQ-NO: 10002#SB RECV: SEQ(10002)-COM(1798)

TP RECV: SEQ(10003)-COM(1797)

SERIAL SEQ-NO: 10003#SB RECV: SEQ(10003)-COM(1797) Safety Mode: 5, Event: 1

SAFETY MODE: SAFETY_MODE_MANUAL -> SAFETY_MODE_INITIALIZE

DRCF STATE: CCtrlStateUndefine -> CCtrlStateInitialized

Friction Coeff to DRCLp(1) = 0.000, 0.100, 0.200, 0.300p(2) = 0.100, 0.110, 0.120, 0.130p(3) = 0.200, 0.210, 0.220, 0.230p(4) = 0.300, 0.310, 0.320, 0.330p(5) = 0.400, 0.410, 0.420, 0.430p(6) = 0.500, 0.510, 0.520, 0.530n(1) = 0.000, -0.100, -0.200, -0.300n(2) = -0.100, -0.110, -0.120, -0.130n(3) = -0.200, -0.210, -0.220, -0.230n(4) = -0.300, -0.310, -0.320, -0.330n(5) = -0.400, -0.410, -0.420, -0.430n(6) = -0.500, -0.510, -0.520, -0.530FTS install(0) to DRCLFTS offset(0.000000, 1.000000, 2.000000, 3.000000, 4.000000, 5.000000) to DRCLConfig Robot Shape Config Robot Shape Safety Mode: 5, Event: 2

DRCF STATE: CCtrlStateInitialized -> CCtrlStateStandby

SAFETY MODE: SAFETY_MODE_INITIALIZE -> SAFETY_MODE_MANUAL

EtherCAT Operation mode start Key Command : 9 RUN CONTROL : 1

Does it mean it runs normally ? I have already installed libpoco-dev. Which version do you use ?

Edit and solution :

I used GDB and saw the problem was coming from PocoNet, I tried to install Poco from source, it didn't work because it wasn't the right version. You have to install Poco 1.9.2 and it finally worked, which is the version provided by the apt install libpoco-dev on Ubuntu focal.