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

asked 2022-09-20 06:12:26 -0600

Karim Mobarak gravatar image

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

  • ros melodic
  • Jetson nano
  • mcp2515 module

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 ...
(more)
edit retag flag offensive close merge delete