canopen_motor_node throws error after init
Hello,
I try to use the canopenmotornode package to run my Technosoft motor drivers (iPOS4808 BX-CAN). I am on Ubuntu 20.04 with ROS noetic
To start, I try with only one driver. However during the initialization phase, this happens:
process[maxon/canopen_motor-1]: started with pid [17497]
process[maxon/global_loc-2]: started with pid [17498]
process[maxon/velocity_controller-3]: started with pid [17499]
[ INFO] [1658754468.440480421]: Using fixed control period: 0.020000000
[ INFO] [1658754470.455133363]: Initializing...
[ INFO] [1658754470.456764586]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1658754470.460616386]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ INFO] [1658754480.515593384]: Current state: 2 device error: system:125 internal_error: 0 (OK)
[ INFO] [1658754480.515866958]: Current state: 1 device error: system:125 internal_error: 0 (OK)
[ INFO] [1658754480.517361849]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1658754480.517613478]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ INFO] [1658754480.517860294]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ERROR] [1658754480.518793128]: CAN not ready
[ERROR] [1658754480.525331152]: Initializing failed: Transition timeout; Could not enable motor; Transition timeout
[maxon/global_loc-2] process has finished cleanly
log file: /home/ubuntu/.ros/log/b4ce4d60-0c1a-11ed-80ba-45191d1ef4ce/maxon-global_loc-2*.log
So there is a problem. With candump, we can observe the requests made:
can0 000 [2] 82 01 master:Reset Communication
can0 701 [1] 7F driver: Start
can0 701 [1] 00
can0 601 [8] 2B 17 10 00 14 00 00 00 master:Set heartbeat time
can0 581 [8] 60 17 10 00 00 00 00 00 driver:response
can0 701 [1] 7F
can0 601 [8] 40 41 60 00 00 00 00 00 master:6041 status word
can0 581 [8] 4B 41 60 00 50 02 00 00
can0 601 [8] 40 61 60 00 00 00 00 00 master:6061 Modes of Operation display
can0 581 [8] 4F 61 60 00 00 00 00 00
can0 601 [8] 40 64 60 00 00 00 00 00 master:6064 Position actual value
can0 581 [8] 43 64 60 00 F3 1B 00 00
can0 601 [8] 40 6C 60 00 00 00 00 00 master:606C Velocity actual value
can0 581 [8] 43 6C 60 00 00 00 00 00
can0 601 [8] 40 40 60 00 00 00 00 00 master:6040 ControlWord
can0 581 [8] 4B 40 60 00 00 00 00 00
can0 601 [8] 40 60 60 00 00 00 00 00 master:6060 Modes of Operation
can0 581 [8] 4F 60 60 00 00 00 00 00
can0 601 [8] 40 7A 60 00 00 00 00 00 master:607A Target position
can0 581 [8] 43 7A 60 00 00 00 00 00
can0 601 [8] 40 FF 60 00 00 00 00 00 master:60FF Target velocity
can0 581 [8] 43 FF 60 00 00 00 00 00
can0 000 [2] 01 01 master:Start remote node
can0 181 [2] 50 02
can0 281 [3] 50 02 00
can0 701 [1] 05
can0 501 [6] 06 01 00 00 00 00
can0 080 [0]
can0 701 [1] 05
can0 281 [3] 31 02 00
can0 181 [2] 31 02
can0 080 [0]
can0 701 [1] 05
can0 080 [0]
can0 701 [1] 05
....
Being new to this, I tried to see what each request was supposed to do but I don't know the expected answer and therefore what is wrong. Here are my different files
launch file
<?xml version="1.0"?>
<launch>
<group ns="/maxon">
<!-- Load the URDF into ROS parameter server -->
<param name="/maxon/robot_description" command="$(find xacro)/xacro '$(find motors)/config/robot.xacro'"/>
<node name="canopen_motor" pkg="canopen_motor_node" type="canopen_motor_node" output="screen" clear_params="true" >
<rosparam command="load" file="$(find motors)/config/can.yaml" />
<rosparam command="load" file="$(find motors)/config/node.yaml" />
</node>
<!-- call driver init service -->
<node pkg="rosservice" type="rosservice" name="global_loc" args="call --wait /maxon/driver/init" />
<!-- start/spawn controller -->
<node name="velocity_controller" pkg="controller_manager"
type="controller_manager" args="spawn wheel_left_to_link_velocity_controller" respawn="false" output="screen"/>
</group>
</launch>
can.yaml
bus:
device: can0 # SocketCAN network interface
sync:
interval_ms: 20 # 10 ms is recommended for non real-time systems, set to 0 to disable sync
overflow: 0 # overflow sync counter at value or do not set it (0, default)
heartbeat: # simple heartbeat producer, optional!
rate: 20 # heartbeat rate
msg: "77f#05" # message to send, cansend format: heartbeat of node 127 with status 5=Started
node.yaml
nodes:
left_wheel_joint:
id: 1
eds_pkg: motors # optionals package name for relative path
eds_file: "config/iPOS.D.v1.04.eds" # path to EDS/DCF file
required_drive_mode: 3 # 3 means velocity mode
publish: ["6064"]
Asked by Deakox on 2022-07-25 08:14:52 UTC
Answers
hey did you manage to solve this issue, and also could you tell me how to read a candump output please
Asked by nigelbrucekhan on 2023-04-18 08:44:52 UTC
Comments