doosan-robotics / doosan-robot2

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

Real Doosan Robot does not work with ros2 #7

Closed whitedoll closed 1 year ago

whitedoll commented 3 years ago

Hello, After building the ros2 program, it failed to link with the actual Doosan Robot. I actually changed the IP of the robot to 192.168.1.100 and the result of DRCF64 and Ping is as follows: DRCF64 : choi@choi-NUC8i7BEH:~/ros2_ws4/src/doosan-robot2/common2/bin/DRCF$ ./DRCF64


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

Cycle : 0.001000

START SYNC: 1620280931.083Mastering 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 RUN CONTROL : 1 Key Command : 9 START ROS service... TRANSFER COTROL(ACCEPT): GIVE(UnKnown) TAKE(API)The size of queue : 1 The size of queue : 2 The size of queue : 3 The size of queue : 4 SmartTp version: v.0.0.0 Controller version: GF120500 Interpreter version: v.0.0.0 Inverter version: GAXXXXXX Safety Board version: GDXXXXXX Robot Serial Number: XXXXXX-AXXXX Robot Model Number: M1013 jts board version: GBXXXXXX flange board version: GCXXXXXX TRANSFER COTROL(ACCEPT): GIVE(API) TAKE(API)SmartTp version: v.0.0.0 Controller version: GF120500 Interpreter version: v.0.0.0 Inverter version: GAXXXXXX Safety Board version: GDXXXXXX Robot Serial Number: XXXXXX-AXXXX Robot Model Number: M1013 jts board version: GBXXXXXX flange board version: GCXXXXXX

TP RECV: SEQ(0)-COM(1714)

SERIAL SEQ-NO: 0#SB RECV: SEQ(0)-COM(1714) Safety Mode: 1, Event: 0

SAFETY MODE: SAFETY_MODE_MANUAL -> SAFETY_MODE_AUTONOMOUS

DRCF STATE: CCtrlStateStandby -> CCtrlStateStandby

TP RECV: SEQ(10004)-COM(1792)

SERIAL SEQ-NO: 10004#SB RECV: SEQ(10004)-COM(1792)

TARGET MODE: Real Robot Control Mode

DRCF STATE: CCtrlStateStandby -> CCtrlStateStandby

Ping : choi@choi-NUC8i7BEH:~$ ping 192.168.1.100 PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data. 64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=0.078 ms 64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=0.072 ms 64 bytes from 192.168.1.100: icmp_seq=3 ttl=64 time=0.072 ms 64 bytes from 192.168.1.100: icmp_seq=4 ttl=64 time=0.071 ms 64 bytes from 192.168.1.100: icmp_seq=5 ttl=64 time=0.097 ms 64 bytes from 192.168.1.100: icmp_seq=6 ttl=64 time=0.029 ms 64 bytes from 192.168.1.100: icmp_seq=7 ttl=64 time=0.080 ms 64 bytes from 192.168.1.100: icmp_seq=8 ttl=64 time=0.072 ms 64 bytes from 192.168.1.100: icmp_seq=9 ttl=64 time=0.141 ms ^C --- 192.168.1.100 ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 8179ms rtt min/avg/max/mdev = 0.029/0.079/0.141/0.027 ms

However, RVIZ does not display the actual attitude of robot correctly When I run the following command in the terminal choi@choi-NUC8i7BEH:~$ ros2 launch dsr_launcher2 single_robot_rviz.launch.py mode:=real host:=192.168.1.100 port:=12345

[INFO] [launch]: All log files can be found below /home/choi/.ros/log/2021-05-06-15-05-45-155076-choi-NUC8i7BEH-5689 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [static_transform_publisher-1]: process started with pid [5692] [INFO] [robot_state_publisher-2]: process started with pid [5694] [INFO] [rviz2-3]: process started with pid [5696] [INFO] [dsr_control_node2-4]: process started with pid [5698] [static_transform_publisher-1] [INFO] [1620281145.333301345] [static_transform_publisher]: Spinning until killed publishing transform from 'base' to 'base_0' [robot_state_publisher-2] Parsing robot urdf xml string. [robot_state_publisher-2] Link base_0 had 1 children [robot_state_publisher-2] Link link1 had 1 children [robot_state_publisher-2] Link link2 had 1 children [robot_state_publisher-2] Link link3 had 1 children [robot_state_publisher-2] Link link4 had 1 children [robot_state_publisher-2] Link link5 had 1 children [robot_state_publisher-2] Link link6 had 0 children [robot_state_publisher-2] [INFO] [1620281145.336833833] [robot_state_publisher]: got segment base_0 [robot_state_publisher-2] [INFO] [1620281145.336931599] [robot_state_publisher]: got segment link1 [robot_state_publisher-2] [INFO] [1620281145.336943833] [robot_state_publisher]: got segment link2 [robot_state_publisher-2] [INFO] [1620281145.336950692] [robot_state_publisher]: got segment link3 [robot_state_publisher-2] [INFO] [1620281145.336956548] [robot_state_publisher]: got segment link4 [robot_state_publisher-2] [INFO] [1620281145.336962477] [robot_state_publisher]: got segment link5 [robot_state_publisher-2] [INFO] [1620281145.336968205] [robot_state_publisher]: got segment link6 [robot_state_publisher-2] [INFO] [1620281145.336973946] [robot_state_publisher]: got segment world [dsr_control_node2-4] [INFO] [1620281145.348562633] [dsr_control_node2]: g_node = 0x0x7ffe78f2b860 [dsr_control_node2-4] [INFO] [1620281145.348858659] [dsr_control_node2]: rate is 100 [dsr_control_node2-4] [INFO] [1620281145.349023852] [dsr_control_node2]: controller_manager is updating! [dsr_control_node2-4] [INFO] [1620281145.349097228] [dsr_hw_interface2]: name = dsr01 [dsr_control_node2-4] [INFO] [1620281145.349113238] [dsr_hw_interface2]: model = m1013 [dsr_control_node2-4] [INFO] [1620281145.349116971] [dsr_hw_interface2]: gripper = none [dsr_control_node2-4] [INFO] [1620281145.349119946] [dsr_hw_interface2]: name_space is dsr01, m1013

[dsr_control_node2-4] [INFO] [1620281145.379080906] [dsr_hw_interface2]: [dsr_hw_interface2] init() ==> setup callback fucntion [dsr_control_node2-4] [INFO] [1620281145.379123309] [dsr_hw_interface2]: joint_name = joint1 [dsr_control_node2-4] [WARN] [1620281145.379195931] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [dsr_control_node2-4] [INFO] [1620281145.379373639] [dsr_hw_interface2]: joint_name = joint2 [dsr_control_node2-4] [INFO] [1620281145.379413189] [dsr_hw_interface2]: joint_name = joint3 [dsr_control_node2-4] [INFO] [1620281145.379420127] [dsr_hw_interface2]: joint_name = joint4 [dsr_control_node2-4] [INFO] [1620281145.379434783] [dsr_hw_interface2]: joint_name = joint5 [dsr_control_node2-4] [INFO] [1620281145.379440504] [dsr_hw_interface2]: joint_name = joint6

[dsr_control_node2-4] [INFO] [1620281145.379450065] [dsr_hw_interface2]: init() ==> arm is standby [dsr_control_node2-4] [INFO] [1620281145.379464298] [dsr_hw_interface2]: host = 192.168.1.100 [dsr_control_node2-4] [INFO] [1620281145.379467214] [dsr_hw_interface2]: port = 12345 [dsr_control_node2-4] [INFO] [1620281145.379470162] [dsr_hw_interface2]: command = 1 [dsr_control_node2-4] [INFO] [1620281145.379477452] [dsr_hw_interface2]: mode = real [dsr_control_node2-4] [INFO] [1620281145.379480251] [dsr_hw_interface2]: host 192.168.1.100, port=12345 bCommand: 1, mode: real [dsr_control_node2-4] [INFO] [1620281145.380289923] [dsr_hw_interface2]: On Monitor State [dsr_control_node2-4] joint_name = joint1joint_name = joint2joint_name = joint3joint_name = joint4joint_name = joint5joint_name = joint6No Emul [dsr_control_node2-4] [callback OnMonitoringAccessControlCB] eAccCtrl: 2 [dsr_control_node2-4] access control granted [dsr_control_node2-4] [callback OnMonitoringStateCB] current state: (15) NOT_READY [dsr_control_node2-4] [callback OnTpInitializingCompletedCB] tp initializing completed [dsr_control_node2-4] [callback OnMonitoringStateCB] current state: (1) STANDBY [dsr_control_node2-4] [callback OnMonitoringAccessControlCB] eAccCtrl: 2 [dsr_control_node2-4] access control granted [dsr_control_node2-4] [callback OnMonitoringStateCB] current state: (1) STANDBY [dsr_control_node2-4] [INFO] [1620281145.380586787] [dsr_hw_interface2]: On Monitor State [dsr_control_node2-4] [INFO] [1620281145.380900195] [dsr_hw_interface2]: On Monitor State

[dsr_control_node2-4] [INFO] [1620281145.391484826] [dsr_hw_interface2]: Real Robot Mode [dsr_control_node2-4] [INFO] [1620281145.391488090] [dsr_hw_interface2]: DRCF version = GF120500 [dsr_control_node2-4] [INFO] [1620281145.391490960] [dsr_hw_interface2]: DRFL version = GL010106-beta [dsr_control_node2-4] [INFO] [1620281145.391493650] [dsr_hw_interface2]: m_nVersionDRCF = 120500

[dsr_control_node2-4] [INFO] [1620281145.393431535] [dsr_hw_interface2]: [init]::read 0-pos: 0.000 [dsr_control_node2-4] [INFO] [1620281145.393448087] [dsr_hw_interface2]: [init]::read 1-pos: 0.000 [dsr_control_node2-4] [INFO] [1620281145.393451739] [dsr_hw_interface2]: [init]::read 2-pos: 0.000 [dsr_control_node2-4] [INFO] [1620281145.393454656] [dsr_hw_interface2]: [init]::read 3-pos: 0.000 [dsr_control_node2-4] [INFO] [1620281145.393457564] [dsr_hw_interface2]: [init]::read 4-pos: 0.000 [dsr_control_node2-4] [INFO] [1620281145.393460589] [dsr_hw_interface2]: [init]::read 5-pos: 0.000 [dsr_control_node2-4] [WARN] [1620281145.393522178] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [dsr_control_node2-4] [INFO] [1620281145.400412262] [dsr_control_node2]: Loading controller 'dsr_joint_publisher' [dsr_control_node2-4] [dsr_control_node2-4] [WARN] [1620281145.401480714] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [dsr_control_node2-4] [ERROR] [1620281145.406620787] [joint handle]: handle with interface (joint1: velocity) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406675338] [joint handle]: handle with interface (joint1: effort) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406753357] [joint handle]: handle with interface (joint2: velocity) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406763076] [joint handle]: handle with interface (joint2: effort) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406795551] [joint handle]: handle with interface (joint3: velocity) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406802902] [joint handle]: handle with interface (joint3: effort) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406814823] [joint handle]: handle with interface (joint4: velocity) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406821487] [joint handle]: handle with interface (joint4: effort) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406831962] [joint handle]: handle with interface (joint5: velocity) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406838469] [joint handle]: handle with interface (joint5: effort) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406849923] [joint handle]: handle with interface (joint6: velocity) wasn't found! [dsr_control_node2-4] [ERROR] [1620281145.406857040] [joint handle]: handle with interface (joint6: effort) wasn't found! [dsr_control_node2-4] [WARN] [1620281145.408606584] [rcl_lifecycle]: No transition matching 1 found for current state inactive [dsr_control_node2-4] [ERROR] [1620281145.408628678] []: Unable to start transition 1 from current state inactive: Transition is not registered., at /tmp/binarydeb/ros-foxy-rcl-lifecycle-1.1.11/src/rcl_lifecycle.c:350 [dsr_control_node2-4] [INFO] [1620281145.408650219] [dsr_control_node2]: controller_manager is updating! [rviz2-3] [INFO] [1620281145.674222693] [rviz2]: Stereo is NOT SUPPORTED [rviz2-3] [INFO] [1620281145.674472795] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) [rviz2-3] [INFO] [1620281145.698326748] [rviz2]: Stereo is NOT SUPPORTED [rviz2-3] Parsing robot urdf xml string.

doosan-robotics commented 3 years ago

The DRCF emulator has nothing to do with the actual robot motion (the actual DRCF is running inside the controller). Please check the following points.

  1. Is the poco library properly installed?
  2. Have you reverted the version of the ros2_control / ros2_controller package to the previous version?

Last week, we added information related to poco library installation in README.md.