Could not switch motor to enable state
Hello,
even though I could successfully initialize the motor by /driver/init service call in Profile Posiition and Profile Velocity modes, the motor does not reach the Enable state. ROS controllers are properly spawned, so there is a /command ready to accept commands, but since the motor's power stage is not enabled, the motor does not react. I tried to set switching state
to various values, for values 2 to 4, the result was the same. with state 1, the following warn and error appeared:
[WARN]: illegal transition 5 -> 1
[ERROR]: Could not switch to mode 1, reason: Could not set transition
Do you know what might cause the issue and shed some light on how the switching state
works? Big thanks!
driver.yaml
defaults:
eds_pkg: canopen_motor_interface
motor_allocator: canopen::Motor402::Allocator # select allocator for motor layer
motor_layer:
switching_state: 5 # (Operation_Enable), state for mode switching
#pos_to_device: "rint(rad2deg(pos)*1000)" # rad -> mdeg
#pos_from_device: "deg2rad(obj6064)/1000" # actual position [mdeg] -> rad
#vel_to_device: "rint(rad2deg(vel)*1000)" # rad/s -> mdeg/s
#vel_from_device: "deg2rad(obj606C)/1000" # actual velocity [mdeg/s] -> rad/s
nodes:
front_left_joint_2_skelet_segment_upper:
id: 1
eds_file: "config/f_A_5015_81.dcf"
publish: [6064!, 606C!, 607A!, 60FF!, 6040!, 6041!, 6061!]
can0.yaml
bus:
device: can0
baudrate: 500K
diagnostic_period: 10
sync:
interval_ms: 10
overflow: 0
heartbeat: # simple heartbeat producer, optional!
rate: 20 # heartbeat rate
msg: "1#05" # message to send, cansend format: heartbeat of node 127 with status 5=Started