ethercat_driver_ros2: invalid tag ec_module

hi @mcbed, im trying your integration in my example code. I’ve tried to follow your guide in READ.ME but i haven’t the expected results.

  1. I add ethercat_driver_ros2 in my worskspace with my other packages to run my RViz simulation with my ethercat driver
  2. Everything compiled, even if put another digital output, it is an Beckhoff el2809 and i made its plugin following the others examples you previously add
  3. i have installed master Igh and it is all ok with it (personally tested)
  4. i had in my ros2_control file the the ethercat-driver as you explained
  5. added EcModule in ros2_control description file
  6. For interfacing controllers with EtherCAT Slave Modules i tried your example with an EtherCAT IO modules <gpio bane="MYGPIO"> etc. etc

in 4. it gives me this error ros2_control

[ros2_control_node-5] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-5]   what():  invalid tag name ec_module

it seems it doesn’t understand that it is Hardware resource

and when i don’t delete 6. it literally don’t start and stop with error on launch.

What is should modify?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

Congrats ! I am happy you could make it work !

  1. You can but this requires to develop your custom controller.
  2. In my applications I write a message array of 16 floats and use the gpio_controller to pass them as state_interfaces to the ec module plugin that read them according to the mapping you pass as module parameters.

Looks good to me. Just the state_interfaces tag is useless as not used by the controller

Did you write the plugin driver for your module inheriting from the ethercat_interface::EcSlave base class ?

In general you should:

  1. write the plugin for your module if not already available in the list. Example for Beckhoff 20xx modules here
  2. set up the description of your ec modules in your hardware components with ec_module tags and map the interfaces of ros2_control to the module channels. Also some modules reuire additional parameters that can be set in the description. This depends on how the plugin is written.
  3. run the gpio_command_controller to interact with the interfaces that are mapped to your module channels. You done need a specific node, you can just run it from command prompt with $ ros2 topic pub ...