Robotics StackExchange | Archived questions

ros_canopen producing "Did not receive a response message" & "not operational"

I am trying to control (Delta Asda-A2) servo motor using the ros_canopen pkg (0.8.5). Using:

Node.yaml

nodes:
  node1:
    id: 2
    name: J0
    eds_pkg: servo_canopen # optionals package  name for relative path
    eds_file: "config/ASDA-A2.eds" # path to EDS/DCF file

# defaults: # optional, all defaults can be overwritten per node
#  eds_pkg: my_config_package # optional package  name for relative path
#  eds_file: "my_config.dcf" # path to EDS/DCF file
#   dcf_overlay: # "ObjectID": "ParameterValue" (both as strings)
#    "6098": "0" # No homing operation required
#    "1016sub1" : "0x7F0064" # heartbeat timeout of 100 ms for master at 127
#    "1017": "100" # heartbeat producer

# canopen_chain_node settings ..
  motor_allocator: canopen::Motor402::Allocator # select allocator for motor layer
#   motor_layer: settings passed to motor layer (plugin-specific)
  switching_state: 2 # (Operation_Enable), state for mode switching. Drive mode of operation from canopen_402 wiki
  pos_to_device: "pos" # inc
  pos_from_device: "obj6064" # inc 
  vel_to_device: "vel" # rpm
  vel_from_device: "obj606C" # rpm
  eff_to_device: "rint(eff)" # just round to integer
  eff_from_device: "0" # unset

can.yaml

bus:
  device: can0 # SocketCAN network interface
  loopback: true # Make the SocketCAN loop back messages
  # driver_plugin: can::SocketCANInterface
  master_allocator: canopen::SimpleMaster::Allocator
sync:
  interval_ms: 10 # 10 ms is recommended for non real-time systems, set to 0 to disable sync
  # update_ms: <interval_ms> # Update interval of control loop, must be set explicitly if sync is disabled
  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

controller.yaml

joint_names: [J0]

joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50

joint_group_position_controller:
  type: position_controllers/JointGroupPositionController
  joints:
    - J0
  required_drive_mode: 1

J0_position_controller:
  type: position_controllers/JointPositionController
  joint: J0
  required_drive_mode: 1

ros.yaml

defaults: # optional, all defaults can be overwritten per node
  publish: ["1A00"] # list of objects to be published (one topic per node)
nodes:
  node1:
    # ...
    #publish: ["1003sub0!"] # list of objects to be published (one topic per node)
  node2:
# ...

Launch File

<?xml version="1.0"?>
   <launch>
     <group ns="/Delta">
      <arg name="model" default="$(find servo_canopen)/urdf/Motor.urdf"/> 
       <!-- Load the URDF into ROS parameter server -->
       <param name="robot_description" command="cat $(arg model)"/>

       <node name="canopen_motor" pkg="canopen_motor_node" type="canopen_motor_node" output="screen" clear_params="true" >
         <rosparam command="load" file="$(find servo_canopen)/config/can.yaml" />
         <rosparam command="load" file="$(find servo_canopen)/config/controller.yaml" />
         <rosparam command="load" file="$(find servo_canopen)/config/node.yaml" />
       </node>

       <!-- load the controllers -->
       <node name="controller_spawner" pkg="controller_manager" type="controller_manager" respawn="false"
         output="screen" args="spawn 
         /Delta/canopen_motor/joint_state_controller
         /Delta/canopen_motor/J0_position_controller
         /Delta/canopen_motor/joint_group_position_controller"/>
     </group>
   </launch>

When running the launch file, I get these errors:

Did not receive a response message
not operational 

console output

roslaunch servo_canopen servo_canopen.launch
... logging to /home/karim/.ros/log/2604ccaa-38c8-11ed-a0dd-02429f8a3d69/roslaunch-karim-desktop-18018.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://karim-desktop:37617/

SUMMARY
========

CLEAR PARAMETERS
 * /Delta/canopen_motor/

PARAMETERS
 * /Delta/canopen_motor/J0_position_controller/joint: J0
 * /Delta/canopen_motor/J0_position_controller/required_drive_mode: 1
 * /Delta/canopen_motor/J0_position_controller/type: position_controll...
 * /Delta/canopen_motor/bus/device: can0
 * /Delta/canopen_motor/bus/loopback: True
 * /Delta/canopen_motor/bus/master_allocator: canopen::SimpleMa...
 * /Delta/canopen_motor/heartbeat/msg: 77f#05
 * /Delta/canopen_motor/heartbeat/rate: 20
 * /Delta/canopen_motor/joint_group_position_controller/joints: ['J0']
 * /Delta/canopen_motor/joint_group_position_controller/required_drive_mode: 1
 * /Delta/canopen_motor/joint_group_position_controller/type: position_controll...
 * /Delta/canopen_motor/joint_names: ['J0']
 * /Delta/canopen_motor/joint_state_controller/publish_rate: 50
 * /Delta/canopen_motor/joint_state_controller/type: joint_state_contr...
 * /Delta/canopen_motor/nodes/node1/eds_file: config/ASDA-A2 Dr...
 * /Delta/canopen_motor/nodes/node1/eds_pkg: servo_canopen
 * /Delta/canopen_motor/nodes/node1/eff_from_device: 0
 * /Delta/canopen_motor/nodes/node1/eff_to_device: rint(eff)
 * /Delta/canopen_motor/nodes/node1/id: 2
 * /Delta/canopen_motor/nodes/node1/motor_allocator: canopen::Motor402...
 * /Delta/canopen_motor/nodes/node1/name: J0
 * /Delta/canopen_motor/nodes/node1/pos_from_device: obj6064
 * /Delta/canopen_motor/nodes/node1/pos_to_device: pos
 * /Delta/canopen_motor/nodes/node1/switching_state: 2
 * /Delta/canopen_motor/nodes/node1/vel_from_device: obj606C
 * /Delta/canopen_motor/nodes/node1/vel_to_device: vel
 * /Delta/canopen_motor/sync/interval_ms: 10
 * /Delta/canopen_motor/sync/overflow: 0
 * /Delta/robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.13

NODES
  /Delta/
    canopen_motor (canopen_motor_node/canopen_motor_node)
    controller_spawner (controller_manager/controller_manager)

auto-starting new master
process[master]: started with pid [18037]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 2604ccaa-38c8-11ed-a0dd-02429f8a3d69
process[rosout-1]: started with pid [18053]
started core service [/rosout]
process[Delta/canopen_motor-2]: started with pid [18071]
process[Delta/controller_spawner-3]: started with pid [18072]
[ INFO] [1663666787.886979409]: Using fixed control period: 0.010000000
[ INFO] [1663666804.634352117]: Initializing...
[ INFO] [1663666804.635515922]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1663666804.639020462]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ERROR] [1663666815.647972636]: Did not receive a response message
[ERROR] [1663666815.648460159]: not operational
[ INFO] [1663666815.648779497]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ INFO] [1663666815.649301344]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ERROR] [1663666815.656013169]: Initializing failed: could not reset node '2'

Asked by Karim Mobarak on 2022-09-20 06:12:26 UTC

Comments

Answers