ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros_canopen: Node 'eff_from_device' has no id

asked 2022-09-19 05:53:47 -0500

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 this error. I don't know what is producing this error!

console output

... logging to /home/karim/.ros/log/796865f4-37fc-11ed-8da5-00e04c49cd22/roslaunch-karim-desktop-21063.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:34509/

SUMMARY
========

CLEAR PARAMETERS
 * /Delta/canopen_motor/

PARAMETERS
 * /Delta/canopen_motor/J0_position_controller/joint: J0
 * /Delta/canopen_motor ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-19 06:01:16 -0500

Karim Mobarak gravatar image

I figured it out ! There was a missing indention in the Node.yaml file

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-09-19 05:53:47 -0500

Seen: 40 times

Last updated: Sep 19 '22