ezWheelSAS / swd_ros_controllers

ROS nodes to control motors powered by the ez-Wheel Safety Wheel Drive (SWD®) technology.
https://www.ez-wheel.com/
GNU Lesser General Public License v2.1
5 stars 4 forks source link

SWD Core is stopped periodically. #46

Closed suguruhamada1003910 closed 2 years ago

suguruhamada1003910 commented 2 years ago

I bought Starter Kit and control it with Joy Controller. Then 1 SWD Core is stopped periodically. As for detail, please see movie and candump file.

movie

candump.txt

"OK" LED becomes read when SWD Core is stopped. Do you have any sollution?

GMezWheel commented 2 years ago

Hi @suguruhamada1003910 ,

This is a new StarterKit out of the box ? I will check your dump file...

Koma2yu commented 2 years ago

Yes, it is a new SWD Starter Kit out of the box.

suguruhamada1003910 commented 2 years ago

@GMezWheel

I think "Yes". Please check photos.

PXL_20221020_071941405 MP PXL_20221020_072012638

I did the commissioning with files on github. Then, speed is always limited with 560 rpm and the problem is not occurred.

[ INFO] [1666250190.282169171]: The target speed exceeds the MAX/SLS maximum speed limit (560 rpm). Set speed to (left, right) (-560, -560) rpm

If the maximum speed of SLS is changed to 75, both SWD Core stops periodically. Therefore, I think SLS is not running properly.

GMezWheel commented 2 years ago

The new commissioning files shall be used with ezw-smc-service 0.2.7:

ros-noetic-swd-robot-manager/focal,now 0.1.2-0focal armhf [installed]
ros-noetic-swd-ros-controllers/focal,now 3.3.0-0focal armhf [installed]
ros-noetic-swd-starter-kit-bringup/focal,now 1.0.0-0focal armhf [installed]
swd-services/focal,now 0.2.7 armhf [installed]
swd-starter-kit/now 0.1.5 armhf [installed]
suguruhamada1003910 commented 2 years ago

@GMezWheel

Thank you for reply. There are "SafetyHub12pts" and "SafetyHub17pts". Which is correct?

suguruhamada1003910 commented 2 years ago

I am using swd-services v0.2.7.

GMezWheel commented 2 years ago

OK. Can you send me the both remote.py log ?

suguruhamada1003910 commented 2 years ago
suguru@c-lati7280-076:/opt/ezw/usr/sbin$ python3 remote.py swd_left
SYSTEMCTL_dbus.id detected
DBUS Instance        : swd_left ..................................................................... [OK]
Node ID              : 0x4 .......................................................................... [OK]
RT activated         : True ......................................................................... [OK]
CAN device           : can0 ......................................................................... [OK]
Vendor-Id            : 0x515 ........................................................................ [OK]
Product code         : 0x10001 ...................................................................... [OK]
Serial number        : 22209SC001A17 ................................................................ [OK]
Revision number      : 4 ............................................................................ [OK]
SWVersion            : 1.0.1 ........................................................................ [OK]
HWVersion            : 3.0.0 ........................................................................ [OK]
Calibrated           : True ......................................................................... [OK]
SRDO validity        : True ......................................................................... [OK]
NMT state on error   : 1 ............................................................................ [OK]
NMT State            : PREOP  ....................................................................... [OK]
PDS State            : NOT_READY_TO_SWITCH_ON  ...................................................... [OK]
NbError              : 0 ............................................................................ [OK]
LastError            : 0 : Error_reset_or_no_error .................................................. [OK]
SystemError          : EZW_PROTECT_NONE EZW_PROTECT_NONE  ........................................... [OK]
SSW CAN1             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN2             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN3             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN4             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN5             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN6             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN7             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN8             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW SAFEOUT          : False, False, False, False, False, False, False, False  ...................... [OK]
SCW SAFEIN_1         : True, True, False, False, False, False, True, True  .......................... [OK]
Peripheral           : True, True, True, False, True, True  ......................................... [OK]
VelocityModeSW       : internal_limit_active: False ................................................. [OK]
VelocityModeCW       : enable_ramp: False, unlock_ramp: False, reference_ramp: False, halt: False ... [OK]
Polarity             : velocity_polarity: True, position_polarity: True ............................. [OK]
TargetVelocity       : 0 ............................................................................ [OK]
VelocityDemand       : 0 ............................................................................ [OK]
VelocityActualValue  : 0 ............................................................................ [OK]
PositionValue        : -2 ........................................................................... [OK]
OdometryValue        : -1 ........................................................................... [OK]
<COM> Connect NodeID = i Disconnect = d Restore param = j
<NMT> RESET_NODE = r Start all = m
<PDS> Go to OPERATION_ENABLED = o
<VL mode> target velocity (500) = +/- positive order = 8 negative order = 2 stop = *
<Param> STO_ACK off/on = f/n
<Mode> local = w remote = z
<Diagnostic> a
<EMCY> get full EMCY list = e, clear EMCY list = c
<SW> s
<quit> 0
suguru@c-lati7280-076:/opt/ezw/usr/sbin$ python3 remote.py swd_right
SYSTEMCTL_dbus.id detected
DBUS Instance        : swd_right .................................................................... [OK]
Node ID              : 0x5 .......................................................................... [OK]
RT activated         : True ......................................................................... [OK]
CAN device           : can0 ......................................................................... [OK]
Vendor-Id            : 0x515 ........................................................................ [OK]
Product code         : 0x10001 ...................................................................... [OK]
Serial number        : 22209SC001A13 ................................................................ [OK]
Revision number      : 4 ............................................................................ [OK]
SWVersion            : 1.0.1 ........................................................................ [OK]
HWVersion            : 3.0.0 ........................................................................ [OK]
Calibrated           : True ......................................................................... [OK]
SRDO validity        : True ......................................................................... [OK]
NMT state on error   : 1 ............................................................................ [OK]
NMT State            : PREOP  ....................................................................... [OK]
PDS State            : NOT_READY_TO_SWITCH_ON  ...................................................... [OK]
NbError              : 0 ............................................................................ [OK]
LastError            : 0 : Error_reset_or_no_error .................................................. [OK]
SystemError          : EZW_PROTECT_NONE EZW_PROTECT_NONE  ........................................... [OK]
SSW CAN1             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN2             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN3             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN4             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN5             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN6             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN7             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN8             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW SAFEOUT          : False, False, False, False, False, False, False, False  ...................... [OK]
SCW SAFEIN_1         : True, True, False, False, False, False, True, True  .......................... [OK]
Peripheral           : True, True, True, False, True, True  ......................................... [OK]
VelocityModeSW       : internal_limit_active: False ................................................. [OK]
VelocityModeCW       : enable_ramp: False, unlock_ramp: False, reference_ramp: False, halt: False ... [OK]
Polarity             : velocity_polarity: False, position_polarity: False ........................... [OK]
TargetVelocity       : 0 ............................................................................ [OK]
VelocityDemand       : 0 ............................................................................ [OK]
VelocityActualValue  : 0 ............................................................................ [OK]
PositionValue        : 2 ............................................................................ [OK]
OdometryValue        : 1 ............................................................................ [OK]
<COM> Connect NodeID = i Disconnect = d Restore param = j
<NMT> RESET_NODE = r Start all = m
<PDS> Go to OPERATION_ENABLED = o
<VL mode> target velocity (500) = +/- positive order = 8 negative order = 2 stop = *
<Param> STO_ACK off/on = f/n
<Mode> local = w remote = z
<Diagnostic> a
<EMCY> get full EMCY list = e, clear EMCY list = c
<SW> s
<quit> 0
GMezWheel commented 2 years ago

It seems that the SLS is always enabled. See remote.py left : SCW SAFEIN_1 : True, True, False, False, False, False, True, True => shall be True if no SLS active

AS A REMEMBER : during commissioning, the left drive is the drive at the right side when you look the StarterKit frontside.

suguruhamada1003910 commented 2 years ago

@GMezWheel

I did commissioning with "SafetyHub17pts". Then, the starter kit is running properly with my PC. However, the starter kit is not running with IPC and "OK" LEDs are flasing. And the results of remote.py are below.

swd_sk@SWDSK88093A:/opt/ezw/usr/sbin$ python3 remote.py swd_left
SYSTEMCTL_dbus.id detected
DBUS Instance        : swd_left ..................................................................... [OK]
Node ID              : 0x4 .......................................................................... [OK]
RT activated         : True ......................................................................... [OK]
CAN device           : can0 ......................................................................... [OK]
Vendor-Id            : 0x515 ........................................................................ [OK]
Product code         : 0x10001 ...................................................................... [OK]
Serial number        : 22209SC001P16 ................................................................ [OK]
Revision number      : 4 ............................................................................ [OK]
SWVersion            : 1.0.1 ........................................................................ [OK]
HWVersion            : 3.0.0 ........................................................................ [OK]
Calibrated           : True ......................................................................... [OK]
SRDO validity        : True ......................................................................... [OK]
NMT State            : OPER  ........................................................................ [OK]
PDS State            : SWITCH_ON_DISABLED  .......................................................... [OK]
NbError              : 0 ............................................................................ [OK]
LastError            : 0 : Error_reset_or_no_error .................................................. [OK]
SystemError          : EZW_PROTECT_NONE EZW_PROTECT_NONE  ........................................... [OK]
SSW CAN1             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN2             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN3             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN4             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN5             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN6             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN7             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN8             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW SAFEOUT          : False, False, False, False, False, False, False, False  ...................... [OK]
SCW SAFEIN_1         : True, True, True, True, False, False, True, True  ............................ [OK]
Peripheral           : True, True, True, False, True, True  ......................................... [OK]
VelocityModeSW       : internal_limit_active: False ................................................. [OK]
VelocityModeCW       : enable_ramp: False, unlock_ramp: False, reference_ramp: False, halt: False ... [OK]
Polarity             : velocity_polarity: True, position_polarity: True ............................. [OK]
TargetVelocity       : 0 ............................................................................ [OK]
VelocityDemand       : 0 ............................................................................ [OK]
VelocityActualValue  : 0 ............................................................................ [OK]
PositionValue        : -3 ........................................................................... [OK]
OdometryValue        : -2 ........................................................................... [OK]
HallEncoder          : 0 ............................................................................ [KO]
FineOdometryValue    : 0 ............................................................................ [KO]
swd_sk@SWDSK88093A:/opt/ezw/usr/sbin$ python3 remote.py swd_right
SYSTEMCTL_dbus.id detected
DBUS Instance        : swd_right .................................................................... [OK]
Node ID              : 0x5 .......................................................................... [OK]
RT activated         : True ......................................................................... [OK]
CAN device           : can0 ......................................................................... [OK]
Vendor-Id            : 0x515 ........................................................................ [OK]
Product code         : 0x10001 ...................................................................... [OK]
Serial number        : 22209SC001L12 ................................................................ [OK]
Revision number      : 4 ............................................................................ [OK]
SWVersion            : 1.0.1 ........................................................................ [OK]
HWVersion            : 3.0.0 ........................................................................ [OK]
Calibrated           : True ......................................................................... [OK]
SRDO validity        : True ......................................................................... [OK]
NMT State            : OPER  ........................................................................ [OK]
PDS State            : SWITCH_ON_DISABLED  .......................................................... [OK]
NbError              : 0 ............................................................................ [OK]
LastError            : 0 : Error_reset_or_no_error .................................................. [OK]
SystemError          : EZW_PROTECT_NONE EZW_PROTECT_NONE  ........................................... [OK]
SSW CAN1             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN2             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN3             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN4             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN5             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN6             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN7             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN8             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW SAFEOUT          : False, False, False, False, False, False, False, False  ...................... [OK]
SCW SAFEIN_1         : True, True, False, False, False, False, True, True  .......................... [OK]
Peripheral           : True, True, True, False, True, True  ......................................... [OK]
VelocityModeSW       : internal_limit_active: False ................................................. [OK]
VelocityModeCW       : enable_ramp: False, unlock_ramp: False, reference_ramp: False, halt: False ... [OK]
Polarity             : velocity_polarity: False, position_polarity: False ........................... [OK]
TargetVelocity       : 0 ............................................................................ [OK]
VelocityDemand       : 0 ............................................................................ [OK]
VelocityActualValue  : 0 ............................................................................ [OK]
PositionValue        : 0 ............................................................................ [OK]
OdometryValue        : 0 ............................................................................ [OK]
HallEncoder          : 0 ............................................................................ [KO]
FineOdometryValue    : 0 ............................................................................ [KO]
suguruhamada1003910 commented 2 years ago

The versions of package are below. I will try to upgrade packages.

swd_sk@SWDSK88093A:~$ dpkg -l | grep swd
ii  base-passwd                                3.5.47                              armhf        Debian base system master password and group files
ii  passwd                                     1:4.8.1-1ubuntu5.20.04.2            armhf        change and administer password and group data
ii  ros-noetic-swd-robot-manager               0.1.2-0focal                        armhf        The swd_robot_manager package
ii  ros-noetic-swd-ros-controllers             3.2.1-0focal                        armhf        Package which control 2 wheels in as a differential drive robot
ii  ros-noetic-swd-starter-kit-bringup         1.0.0-0focal                        armhf        The swd_starter_kit_bringup package
ii  swd-services                               0.2.6                               armhf        ez-Wheel SWD DBus services
ii  swd-starter-kit                            0.1.4                               armhf        ez-Wheel SWD Starter-kit configuration files
suguruhamada1003910 commented 2 years ago

@GMezWheel

Hi. I upgraded all packages for swd starter kit. Then, the starter kit is running properly! This problem is resolved.

GMezWheel commented 2 years ago

Hi @suguruhamada1003910 ,

I reopen this issue because if you have used the SafetyHub17pts for the commissioning, you will always have a SLS enabled: => see left remote.py log SCW SAFEIN_1 : True, True, True, True, False, False,

When no STO/SDI/SLS are enabled, the corresponding pair of safe inputs are True. SCW SAFEIN_1 : True, True, True, True, True, True, (STO1,STO2,SDI1,SDI2,SLS1,SLS2)

suguruhamada1003910 commented 2 years ago

@GMezWheel

Could you give me the correct commissioning files? I will try to do commissioning and send the result of it to you.

GMezWheel commented 2 years ago

You will find hereafter the latest commissioning files. commissioning.tar.gz

suguruhamada1003910 commented 2 years ago

Are there not commissioning files on github? I hope they are uploaded in swd-starter-kit-config. Is it possible?

GMezWheel commented 2 years ago

You're right. The attachement files are the same as swd-starter-kit-config. The commissioning files are also include in swd-starter-kit debian packages. => installed into : /opt/ezw/commissioning

suguruhamada1003910 commented 2 years ago

I executed remote.py again. The result is below. Is this correct? You are saying 6 status, SCW SAFEIN_1 : True, True, True, True, True, True but acctually 8 status is displayed. SCW SAFEIN_1 : True, True, True, True, False, False, True, True ............................ [OK]

DBUS Instance        : swd_left ..................................................................... [OK]
Node ID              : 0x4 .......................................................................... [OK]
RT activated         : True ......................................................................... [OK]
CAN device           : can0 ......................................................................... [OK]
Vendor-Id            : 0x515 ........................................................................ [OK]
Product code         : 0x10001 ...................................................................... [OK]
Serial number        : 22209SC001A17 ................................................................ [OK]
Revision number      : 4 ............................................................................ [OK]
SWVersion            : 1.0.1 ........................................................................ [OK]
HWVersion            : 3.0.0 ........................................................................ [OK]
Calibrated           : True ......................................................................... [OK]
SRDO validity        : True ......................................................................... [OK]
NMT state on error   : 1 ............................................................................ [OK]
NMT State            : OPER  ........................................................................ [OK]
PDS State            : OPERATION_ENABLED  ........................................................... [OK]
NbError              : 0 ............................................................................ [OK]
LastError            : 0 : Error_reset_or_no_error .................................................. [OK]
SystemError          : EZW_PROTECT_NONE EZW_PROTECT_NONE  ........................................... [OK]
SSW CAN1             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN2             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN3             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN4             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN5             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN6             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN7             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN8             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW SAFEOUT          : False, False, False, False, False, False, False, False  ...................... [OK]
SCW SAFEIN_1         : True, True, True, True, False, False, True, True  ............................ [OK]
Peripheral           : True, True, True, True, True, True  .......................................... [OK]
VelocityModeSW       : internal_limit_active: False ................................................. [OK]
VelocityModeCW       : enable_ramp: False, unlock_ramp: False, reference_ramp: False, halt: False ... [OK]
Polarity             : velocity_polarity: True, position_polarity: True ............................. [OK]
TargetVelocity       : 0 ............................................................................ [OK]
VelocityDemand       : 0 ............................................................................ [OK]
VelocityActualValue  : 0 ............................................................................ [OK]
PositionValue        : -8 ........................................................................... [OK]
OdometryValue        : -7 ........................................................................... [OK]
DBUS Instance        : swd_right .................................................................... [OK]
Node ID              : 0x5 .......................................................................... [OK]
RT activated         : True ......................................................................... [OK]
CAN device           : can0 ......................................................................... [OK]
Vendor-Id            : 0x515 ........................................................................ [OK]
Product code         : 0x10001 ...................................................................... [OK]
Serial number        : 22209SC001A13 ................................................................ [OK]
Revision number      : 4 ............................................................................ [OK]
SWVersion            : 1.0.1 ........................................................................ [OK]
HWVersion            : 3.0.0 ........................................................................ [OK]
Calibrated           : True ......................................................................... [OK]
SRDO validity        : True ......................................................................... [OK]
NMT state on error   : 1 ............................................................................ [OK]
NMT State            : OPER  ........................................................................ [OK]
PDS State            : OPERATION_ENABLED  ........................................................... [OK]
NbError              : 0 ............................................................................ [OK]
LastError            : 0 : Error_reset_or_no_error .................................................. [OK]
SystemError          : EZW_PROTECT_NONE EZW_PROTECT_NONE  ........................................... [OK]
SSW CAN1             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN2             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN3             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN4             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN5             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN6             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN7             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW CAN8             : False, False, False, False, False, False, False, False  ...................... [OK]
SSW SAFEOUT          : False, False, False, False, False, False, False, False  ...................... [OK]
SCW SAFEIN_1         : True, True, True, True, False, False, True, True  ............................ [OK]
Peripheral           : True, True, True, True, True, True  .......................................... [OK]
VelocityModeSW       : internal_limit_active: False ................................................. [OK]
VelocityModeCW       : enable_ramp: False, unlock_ramp: False, reference_ramp: False, halt: False ... [OK]
Polarity             : velocity_polarity: False, position_polarity: False ........................... [OK]
TargetVelocity       : 0 ............................................................................ [OK]
VelocityDemand       : 0 ............................................................................ [OK]
VelocityActualValue  : 0 ............................................................................ [OK]
PositionValue        : -2 ........................................................................... [OK]
OdometryValue        : -1 ........................................................................... [OK]
suguruhamada1003910 commented 2 years ago

You will find hereafter the latest commissioning files. commissioning.tar.gz

By the way, this file contains 12pts files only.

GMezWheel commented 2 years ago

You will find hereafter the latest commissioning files. commissioning.tar.gz

By the way, this file contains 12pts files only.

Indeed, I have remove manually 17pts files.

GMezWheel commented 2 years ago

I have a doubt with this StaterKit. I think it's a 17pts. Can you generate a SLS and send me the both remote.py log? If the right SAFEIN_1 bits 2&3 are False, then it's a 17pts. On a 17pts, SDI pair signals are wired on swd left and SLS pair signals are wired on swd right. => the SRDO mappings into the 17pts commissioning files take into account of this

In this case, you're right, you have to use 17pts commissioning files.

NOTA : the last two bits of SAFEIN_1 are not used

suguruhamada1003910 commented 2 years ago

My understanding is that the Safetyhub in the top image is 17pts and the Safetyhub in the bottom image is 12pts, is that wrong?

PXL_20221025_001932707 MP

I am sorry. The unit is not with me right now and I cannot confirm.

GMezWheel commented 2 years ago

In fact, a new Safetyhub with a 17 points connector (instead of 12 points) has been released this summer and all the starter kit are now equipped with it. But for now the same 12 points wiring has been maintained : SLS/SDI signals on the left safety input tanks to a small extension cable: image

I think your StarterKit has not this cable or the extension cable wiring is not the same as 12 points connector.

suguruhamada1003910 commented 2 years ago

@GMezWheel

Thank you for sharing information. It is too difficult that user judge which commissioning files are correct. The change of specs is not user-friendly...

I think it should be clear the difference between SWD Starterkit of 12 points and 17 points for users.

BTW, unfortunately, I cannot confirm information of the unit for now. Can we close this issue?